blockly 9.2.1 → 9.3.0-beta.0
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/blockly.min.js +308 -356
- package/blockly_compressed.js +308 -356
- package/blockly_compressed.js.map +1 -1
- package/core/block_dragger.d.ts +1 -1
- package/core/block_svg.d.ts +4 -17
- package/core/blockly.d.ts +2 -4
- package/core/bubble.d.ts +2 -6
- package/core/bubble_dragger.d.ts +1 -2
- package/core/events/events.d.ts +2 -22
- package/core/events/events_abstract.d.ts +7 -0
- package/core/events/events_block_base.d.ts +2 -1
- package/core/events/events_block_change.d.ts +9 -1
- package/core/events/events_block_create.d.ts +6 -2
- package/core/events/events_block_delete.d.ts +7 -2
- package/core/events/events_block_drag.d.ts +7 -1
- package/core/events/events_block_move.d.ts +20 -1
- package/core/events/events_bubble_open.d.ts +3 -0
- package/core/events/events_click.d.ts +6 -1
- package/core/events/events_comment_base.d.ts +1 -0
- package/core/events/events_comment_change.d.ts +3 -1
- package/core/events/events_comment_create.d.ts +2 -1
- package/core/events/events_comment_delete.d.ts +2 -1
- package/core/events/events_comment_move.d.ts +4 -2
- package/core/events/events_marker_move.d.ts +10 -1
- package/core/events/events_selected.d.ts +6 -0
- package/core/events/events_theme_change.d.ts +2 -1
- package/core/events/events_toolbox_item_select.d.ts +3 -1
- package/core/events/events_trashcan_open.d.ts +5 -1
- package/core/events/events_var_base.d.ts +1 -0
- package/core/events/events_var_create.d.ts +3 -1
- package/core/events/events_var_delete.d.ts +4 -2
- package/core/events/events_var_rename.d.ts +4 -2
- package/core/events/events_viewport.d.ts +14 -1
- package/core/events/utils.d.ts +0 -16
- package/core/events/workspace_events.d.ts +2 -4
- package/core/field.d.ts +42 -9
- package/core/field_angle.d.ts +1 -1
- package/core/field_checkbox.d.ts +15 -8
- package/core/field_colour.d.ts +1 -4
- package/core/field_dropdown.d.ts +2 -2
- package/core/field_image.d.ts +1 -2
- package/core/field_input.d.ts +6 -15
- package/core/field_multilineinput.d.ts +2 -2
- package/core/field_textinput.d.ts +12 -0
- package/core/field_variable.d.ts +2 -2
- package/core/gesture.d.ts +1 -1
- package/core/interfaces/i_block_dragger.d.ts +1 -1
- package/core/interfaces/i_bubble.d.ts +2 -6
- package/core/interfaces/i_metrics_manager.d.ts +8 -6
- package/core/interfaces/i_procedure_block.d.ts +3 -0
- package/core/metrics_manager.d.ts +8 -6
- package/core/{procedures/observable_procedure_map.d.ts → observable_procedure_map.d.ts} +4 -5
- package/core/procedures.d.ts +6 -4
- package/core/serialization/procedures.d.ts +0 -7
- package/core/utils/sentinel.d.ts +5 -0
- package/core/workspace_comment_svg.d.ts +2 -15
- package/core/workspace_dragger.d.ts +0 -3
- package/core/workspace_svg.d.ts +1 -44
- package/package.json +6 -6
- package/core/block_drag_surface.d.ts +0 -135
- package/core/events/events_procedure_base.d.ts +0 -26
- package/core/events/events_procedure_change_return.d.ts +0 -40
- package/core/events/events_procedure_create.d.ts +0 -34
- package/core/events/events_procedure_delete.d.ts +0 -32
- package/core/events/events_procedure_enable.d.ts +0 -34
- package/core/events/events_procedure_parameter_base.d.ts +0 -26
- package/core/events/events_procedure_parameter_create.d.ts +0 -42
- package/core/events/events_procedure_parameter_delete.d.ts +0 -41
- package/core/events/events_procedure_parameter_rename.d.ts +0 -36
- package/core/events/events_procedure_rename.d.ts +0 -35
- package/core/procedures/observable_parameter_model.d.ts +0 -62
- package/core/procedures/observable_procedure_model.d.ts +0 -75
- package/core/procedures/update_procedures.d.ts +0 -13
- package/core/workspace_drag_surface_svg.d.ts +0 -74
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import './events/events_selected.js';
|
|
7
|
-
import type { BlockDragSurfaceSvg } from './block_drag_surface.js';
|
|
8
7
|
import type { IBoundedElement } from './interfaces/i_bounded_element.js';
|
|
9
8
|
import type { IBubble } from './interfaces/i_bubble.js';
|
|
10
9
|
import type { CopyData, ICopyable } from './interfaces/i_copyable.js';
|
|
@@ -47,7 +46,6 @@ export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBo
|
|
|
47
46
|
svgRect_: any;
|
|
48
47
|
/** Whether the comment is rendered onscreen and is a part of the DOM. */
|
|
49
48
|
private rendered_;
|
|
50
|
-
private readonly useDragSurface_;
|
|
51
49
|
/**
|
|
52
50
|
* @param workspace The block's workspace.
|
|
53
51
|
* @param content The content of this workspace comment.
|
|
@@ -149,23 +147,12 @@ export declare class WorkspaceCommentSvg extends WorkspaceComment implements IBo
|
|
|
149
147
|
*/
|
|
150
148
|
translate(x: number, y: number): void;
|
|
151
149
|
/**
|
|
152
|
-
* Move this comment
|
|
153
|
-
* positioning. Generally should be called at the same time as
|
|
154
|
-
* setDragging(true). Does nothing if useDragSurface_ is false.
|
|
150
|
+
* Move this comment during a drag.
|
|
155
151
|
*
|
|
156
|
-
* @internal
|
|
157
|
-
*/
|
|
158
|
-
moveToDragSurface(): void;
|
|
159
|
-
/**
|
|
160
|
-
* Move this comment during a drag, taking into account whether we are using a
|
|
161
|
-
* drag surface to translate blocks.
|
|
162
|
-
*
|
|
163
|
-
* @param dragSurface The surface that carries rendered items during a drag,
|
|
164
|
-
* or null if no drag surface is in use.
|
|
165
152
|
* @param newLoc The location to translate to, in workspace coordinates.
|
|
166
153
|
* @internal
|
|
167
154
|
*/
|
|
168
|
-
moveDuringDrag(
|
|
155
|
+
moveDuringDrag(newLoc: Coordinate): void;
|
|
169
156
|
/**
|
|
170
157
|
* Move the bubble group to the specified location in workspace coordinates.
|
|
171
158
|
*
|
|
@@ -8,9 +8,6 @@ import type { WorkspaceSvg } from './workspace_svg.js';
|
|
|
8
8
|
/**
|
|
9
9
|
* Class for a workspace dragger. It moves the workspace around when it is
|
|
10
10
|
* being dragged by a mouse or touch.
|
|
11
|
-
* Note that the workspace itself manages whether or not it has a drag surface
|
|
12
|
-
* and how to do translations based on that. This simply passes the right
|
|
13
|
-
* commands based on events.
|
|
14
11
|
*
|
|
15
12
|
* @alias Blockly.WorkspaceDragger
|
|
16
13
|
*/
|
package/core/workspace_svg.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import './events/events_block_create.js';
|
|
|
7
7
|
import './events/events_theme_change.js';
|
|
8
8
|
import './events/events_viewport.js';
|
|
9
9
|
import type { Block } from './block.js';
|
|
10
|
-
import type { BlockDragSurfaceSvg } from './block_drag_surface.js';
|
|
11
10
|
import type { BlockSvg } from './block_svg.js';
|
|
12
11
|
import * as browserEvents from './browser_events.js';
|
|
13
12
|
import { ComponentManager } from './component_manager.js';
|
|
@@ -40,7 +39,6 @@ import type { VariableModel } from './variable_model.js';
|
|
|
40
39
|
import { Workspace } from './workspace.js';
|
|
41
40
|
import { WorkspaceAudio } from './workspace_audio.js';
|
|
42
41
|
import { WorkspaceComment } from './workspace_comment.js';
|
|
43
|
-
import type { WorkspaceDragSurfaceSvg } from './workspace_drag_surface_svg.js';
|
|
44
42
|
import { ZoomControls } from './zoom_controls.js';
|
|
45
43
|
import { ContextMenuOption } from './contextmenu_registry.js';
|
|
46
44
|
/**
|
|
@@ -166,22 +164,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
166
164
|
* @internal
|
|
167
165
|
*/
|
|
168
166
|
currentGesture_: Gesture | null;
|
|
169
|
-
/** This workspace's surface for dragging blocks, if it exists. */
|
|
170
|
-
private readonly blockDragSurface;
|
|
171
|
-
/** This workspace's drag surface, if it exists. */
|
|
172
|
-
private readonly workspaceDragSurface;
|
|
173
|
-
/**
|
|
174
|
-
* Whether to move workspace to the drag surface when it is dragged.
|
|
175
|
-
* True if it should move, false if it should be translated directly.
|
|
176
|
-
*/
|
|
177
|
-
private readonly useWorkspaceDragSurface;
|
|
178
|
-
/**
|
|
179
|
-
* Whether the drag surface is actively in use. When true, calls to
|
|
180
|
-
* translate will translate the drag surface instead of the translating the
|
|
181
|
-
* workspace directly.
|
|
182
|
-
* This is set to true in setupDragSurface and to false in resetDragSurface.
|
|
183
|
-
*/
|
|
184
|
-
private isDragSurfaceActive;
|
|
185
167
|
/**
|
|
186
168
|
* The first parent div with 'injectionDiv' in the name, or null if not set.
|
|
187
169
|
* Access this with getInjectionDiv.
|
|
@@ -258,10 +240,8 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
258
240
|
zoomControls_: ZoomControls | null;
|
|
259
241
|
/**
|
|
260
242
|
* @param options Dictionary of options.
|
|
261
|
-
* @param opt_blockDragSurface Drag surface for blocks.
|
|
262
|
-
* @param opt_wsDragSurface Drag surface for the workspace.
|
|
263
243
|
*/
|
|
264
|
-
constructor(options: Options
|
|
244
|
+
constructor(options: Options);
|
|
265
245
|
/**
|
|
266
246
|
* Get the marker manager for this workspace.
|
|
267
247
|
*
|
|
@@ -547,29 +527,6 @@ export declare class WorkspaceSvg extends Workspace implements IASTNodeLocationS
|
|
|
547
527
|
* the Blockly div.
|
|
548
528
|
*/
|
|
549
529
|
translate(x: number, y: number): void;
|
|
550
|
-
/**
|
|
551
|
-
* Called at the end of a workspace drag to take the contents
|
|
552
|
-
* out of the drag surface and put them back into the workspace SVG.
|
|
553
|
-
* Does nothing if the workspace drag surface is not enabled.
|
|
554
|
-
*
|
|
555
|
-
* @internal
|
|
556
|
-
*/
|
|
557
|
-
resetDragSurface(): void;
|
|
558
|
-
/**
|
|
559
|
-
* Called at the beginning of a workspace drag to move contents of
|
|
560
|
-
* the workspace to the drag surface.
|
|
561
|
-
* Does nothing if the drag surface is not enabled.
|
|
562
|
-
*
|
|
563
|
-
* @internal
|
|
564
|
-
*/
|
|
565
|
-
setupDragSurface(): void;
|
|
566
|
-
/**
|
|
567
|
-
* Gets the drag surface blocks are moved to when a drag is started.
|
|
568
|
-
*
|
|
569
|
-
* @returns This workspace's block drag surface, if one is in use.
|
|
570
|
-
* @internal
|
|
571
|
-
*/
|
|
572
|
-
getBlockDragSurface(): BlockDragSurfaceSvg | null;
|
|
573
530
|
/**
|
|
574
531
|
* Returns the horizontal offset of the workspace.
|
|
575
532
|
* Intended for LTR/RTL compatibility in XML.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blockly",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0-beta.0",
|
|
4
4
|
"description": "Blockly is a library for building visual programming editors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blockly"
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"eslint": "^8.4.1",
|
|
44
44
|
"eslint-config-google": "^0.14.0",
|
|
45
45
|
"eslint-plugin-jsdoc": "^39.3.6",
|
|
46
|
-
"google-closure-compiler": "^
|
|
46
|
+
"google-closure-compiler": "^20221102.0.1",
|
|
47
47
|
"google-closure-deps": "^20221102.0.0",
|
|
48
48
|
"gulp": "^4.0.2",
|
|
49
49
|
"gulp-clang-format": "^1.0.27",
|
|
50
50
|
"gulp-concat": "^2.6.1",
|
|
51
|
-
"gulp-header": "^2.0.9",
|
|
52
51
|
"gulp-gzip": "^1.4.2",
|
|
52
|
+
"gulp-header": "^2.0.9",
|
|
53
53
|
"gulp-insert": "^0.5.0",
|
|
54
54
|
"gulp-rename": "^2.0.0",
|
|
55
55
|
"gulp-replace": "^1.0.0",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"gulp-sourcemaps": "^3.0.0",
|
|
59
59
|
"gulp-umd": "^2.0.0",
|
|
60
60
|
"http-server": "^14.0.0",
|
|
61
|
-
"js-green-licenses": "^
|
|
61
|
+
"js-green-licenses": "^4.0.0",
|
|
62
62
|
"json5": "^2.2.0",
|
|
63
63
|
"markdown-tables-to-json": "^0.1.7",
|
|
64
64
|
"mocha": "^10.0.0",
|
|
65
65
|
"patch-package": "^6.4.7",
|
|
66
66
|
"readline-sync": "^1.4.10",
|
|
67
|
-
"rimraf": "^
|
|
67
|
+
"rimraf": "^4.0.7",
|
|
68
68
|
"selenium-standalone": "^8.0.3",
|
|
69
69
|
"through2": "^4.0.2",
|
|
70
70
|
"typescript": "^4.3.2",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
"yargs": "^17.2.1"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"jsdom": "
|
|
75
|
+
"jsdom": "21.1.0"
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2016 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { Coordinate } from './utils/coordinate.js';
|
|
7
|
-
/**
|
|
8
|
-
* Class for a drag surface for the currently dragged block. This is a separate
|
|
9
|
-
* SVG that contains only the currently moving block, or nothing.
|
|
10
|
-
*
|
|
11
|
-
* @alias Blockly.BlockDragSurfaceSvg
|
|
12
|
-
*/
|
|
13
|
-
export declare class BlockDragSurfaceSvg {
|
|
14
|
-
private readonly container;
|
|
15
|
-
/**
|
|
16
|
-
* The root element of the drag surface.
|
|
17
|
-
*/
|
|
18
|
-
private svg;
|
|
19
|
-
/**
|
|
20
|
-
* This is where blocks live while they are being dragged if the drag
|
|
21
|
-
* surface is enabled.
|
|
22
|
-
*/
|
|
23
|
-
private dragGroup;
|
|
24
|
-
/**
|
|
25
|
-
* Cached value for the scale of the drag surface.
|
|
26
|
-
* Used to set/get the correct translation during and after a drag.
|
|
27
|
-
*/
|
|
28
|
-
private scale;
|
|
29
|
-
/**
|
|
30
|
-
* Cached value for the translation of the drag surface.
|
|
31
|
-
* This translation is in pixel units, because the scale is applied to the
|
|
32
|
-
* drag group rather than the top-level SVG.
|
|
33
|
-
*/
|
|
34
|
-
private surfaceXY;
|
|
35
|
-
/**
|
|
36
|
-
* Cached value for the translation of the child drag surface in pixel
|
|
37
|
-
* units. Since the child drag surface tracks the translation of the
|
|
38
|
-
* workspace this is ultimately the translation of the workspace.
|
|
39
|
-
*/
|
|
40
|
-
private readonly childSurfaceXY;
|
|
41
|
-
/** @param container Containing element. */
|
|
42
|
-
constructor(container: Element);
|
|
43
|
-
/**
|
|
44
|
-
* Create the drag surface and inject it into the container.
|
|
45
|
-
*
|
|
46
|
-
* @deprecated The DOM is automatically created by the constructor.
|
|
47
|
-
*/
|
|
48
|
-
createDom(): void;
|
|
49
|
-
/**
|
|
50
|
-
* Set the SVG blocks on the drag surface's group and show the surface.
|
|
51
|
-
* Only one block group should be on the drag surface at a time.
|
|
52
|
-
*
|
|
53
|
-
* @param blocks Block or group of blocks to place on the drag surface.
|
|
54
|
-
*/
|
|
55
|
-
setBlocksAndShow(blocks: SVGElement): void;
|
|
56
|
-
/**
|
|
57
|
-
* Translate and scale the entire drag surface group to the given position, to
|
|
58
|
-
* keep in sync with the workspace.
|
|
59
|
-
*
|
|
60
|
-
* @param x X translation in pixel coordinates.
|
|
61
|
-
* @param y Y translation in pixel coordinates.
|
|
62
|
-
* @param scale Scale of the group.
|
|
63
|
-
*/
|
|
64
|
-
translateAndScaleGroup(x: number, y: number, scale: number): void;
|
|
65
|
-
/**
|
|
66
|
-
* Translate the drag surface's SVG based on its internal state.
|
|
67
|
-
*
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
translateSurfaceInternal_(): void;
|
|
71
|
-
/**
|
|
72
|
-
* Translates the entire surface by a relative offset.
|
|
73
|
-
*
|
|
74
|
-
* @param deltaX Horizontal offset in pixel units.
|
|
75
|
-
* @param deltaY Vertical offset in pixel units.
|
|
76
|
-
*/
|
|
77
|
-
translateBy(deltaX: number, deltaY: number): void;
|
|
78
|
-
/**
|
|
79
|
-
* Translate the entire drag surface during a drag.
|
|
80
|
-
* We translate the drag surface instead of the blocks inside the surface
|
|
81
|
-
* so that the browser avoids repainting the SVG.
|
|
82
|
-
* Because of this, the drag coordinates must be adjusted by scale.
|
|
83
|
-
*
|
|
84
|
-
* @param x X translation for the entire surface.
|
|
85
|
-
* @param y Y translation for the entire surface.
|
|
86
|
-
*/
|
|
87
|
-
translateSurface(x: number, y: number): void;
|
|
88
|
-
/**
|
|
89
|
-
* Reports the surface translation in scaled workspace coordinates.
|
|
90
|
-
* Use this when finishing a drag to return blocks to the correct position.
|
|
91
|
-
*
|
|
92
|
-
* @returns Current translation of the surface.
|
|
93
|
-
*/
|
|
94
|
-
getSurfaceTranslation(): Coordinate;
|
|
95
|
-
/**
|
|
96
|
-
* Provide a reference to the drag group (primarily for
|
|
97
|
-
* BlockSvg.getRelativeToSurfaceXY).
|
|
98
|
-
*
|
|
99
|
-
* @returns Drag surface group element.
|
|
100
|
-
*/
|
|
101
|
-
getGroup(): SVGElement;
|
|
102
|
-
/**
|
|
103
|
-
* Returns the SVG drag surface.
|
|
104
|
-
*
|
|
105
|
-
* @returns The SVG drag surface.
|
|
106
|
-
*/
|
|
107
|
-
getSvgRoot(): SVGElement;
|
|
108
|
-
/**
|
|
109
|
-
* Get the current blocks on the drag surface, if any (primarily
|
|
110
|
-
* for BlockSvg.getRelativeToSurfaceXY).
|
|
111
|
-
*
|
|
112
|
-
* @returns Drag surface block DOM element, or null if no blocks exist.
|
|
113
|
-
*/
|
|
114
|
-
getCurrentBlock(): Element | null;
|
|
115
|
-
/**
|
|
116
|
-
* Gets the translation of the child block surface
|
|
117
|
-
* This surface is in charge of keeping track of how much the workspace has
|
|
118
|
-
* moved.
|
|
119
|
-
*
|
|
120
|
-
* @returns The amount the workspace has been moved.
|
|
121
|
-
*/
|
|
122
|
-
getWsTranslation(): Coordinate;
|
|
123
|
-
/**
|
|
124
|
-
* Clear the group and hide the surface; move the blocks off onto the provided
|
|
125
|
-
* element.
|
|
126
|
-
* If the block is being deleted it doesn't need to go back to the original
|
|
127
|
-
* surface, since it would be removed immediately during dispose.
|
|
128
|
-
*
|
|
129
|
-
* @param opt_newSurface Surface the dragging blocks should be moved to, or
|
|
130
|
-
* null if the blocks should be removed from this surface without being
|
|
131
|
-
* moved to a different surface.
|
|
132
|
-
*/
|
|
133
|
-
clearAndHide(opt_newSurface?: Element): void;
|
|
134
|
-
}
|
|
135
|
-
//# sourceMappingURL=block_drag_surface.d.ts.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { Abstract as AbstractEvent, AbstractEventJson } from './events_abstract.js';
|
|
7
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
8
|
-
import type { Workspace } from '../workspace.js';
|
|
9
|
-
/**
|
|
10
|
-
* The base event for an event associated with a procedure.
|
|
11
|
-
*/
|
|
12
|
-
export declare abstract class ProcedureBase extends AbstractEvent {
|
|
13
|
-
readonly model: IProcedureModel;
|
|
14
|
-
isBlank: boolean;
|
|
15
|
-
constructor(workspace: Workspace, model: IProcedureModel);
|
|
16
|
-
/**
|
|
17
|
-
* Encode the event as JSON.
|
|
18
|
-
*
|
|
19
|
-
* @returns JSON representation.
|
|
20
|
-
*/
|
|
21
|
-
toJson(): ProcedureBaseJson;
|
|
22
|
-
}
|
|
23
|
-
export interface ProcedureBaseJson extends AbstractEventJson {
|
|
24
|
-
procedureId: string;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=events_procedure_base.d.ts.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
7
|
-
import type { Workspace } from '../workspace.js';
|
|
8
|
-
import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
|
|
9
|
-
/**
|
|
10
|
-
* Represents a procedure's return type/status changing.
|
|
11
|
-
*/
|
|
12
|
-
export declare class ProcedureChangeReturn extends ProcedureBase {
|
|
13
|
-
readonly oldTypes: string[] | null;
|
|
14
|
-
/** A string used to check the type of the event. */
|
|
15
|
-
type: string;
|
|
16
|
-
/** The new type(s) the procedure's return has been set to. */
|
|
17
|
-
private newTypes;
|
|
18
|
-
/**
|
|
19
|
-
* @param oldTypes The type(s) the procedure's return was set to before it
|
|
20
|
-
* changed.
|
|
21
|
-
*/
|
|
22
|
-
constructor(workpace: Workspace, model: IProcedureModel, oldTypes: string[] | null);
|
|
23
|
-
run(forward: boolean): void;
|
|
24
|
-
/**
|
|
25
|
-
* Encode the event as JSON.
|
|
26
|
-
*
|
|
27
|
-
* @returns JSON representation.
|
|
28
|
-
*/
|
|
29
|
-
toJson(): ProcedureChangeReturnJson;
|
|
30
|
-
/**
|
|
31
|
-
* Deserializes the JSON event.
|
|
32
|
-
*
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
static fromJson(json: ProcedureChangeReturnJson, workspace: Workspace): ProcedureChangeReturn;
|
|
36
|
-
}
|
|
37
|
-
export interface ProcedureChangeReturnJson extends ProcedureBaseJson {
|
|
38
|
-
oldTypes: string[] | null;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=events_procedure_change_return.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
7
|
-
import { State as ProcedureState } from '../serialization/procedures.js';
|
|
8
|
-
import type { Workspace } from '../workspace.js';
|
|
9
|
-
import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
|
|
10
|
-
/**
|
|
11
|
-
* Represents a procedure data model being created.
|
|
12
|
-
*/
|
|
13
|
-
export declare class ProcedureCreate extends ProcedureBase {
|
|
14
|
-
/** A string used to check the type of the event. */
|
|
15
|
-
type: string;
|
|
16
|
-
constructor(workspace: Workspace, model: IProcedureModel);
|
|
17
|
-
run(forward: boolean): void;
|
|
18
|
-
/**
|
|
19
|
-
* Encode the event as JSON.
|
|
20
|
-
*
|
|
21
|
-
* @returns JSON representation.
|
|
22
|
-
*/
|
|
23
|
-
toJson(): ProcedureCreateJson;
|
|
24
|
-
/**
|
|
25
|
-
* Deserializes the JSON event.
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
static fromJson(json: ProcedureCreateJson, workspace: Workspace): ProcedureCreate;
|
|
30
|
-
}
|
|
31
|
-
export interface ProcedureCreateJson extends ProcedureBaseJson {
|
|
32
|
-
model: ProcedureState;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=events_procedure_create.d.ts.map
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
7
|
-
import type { Workspace } from '../workspace.js';
|
|
8
|
-
import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
|
|
9
|
-
/**
|
|
10
|
-
* Represents a procedure data model being deleted.
|
|
11
|
-
*/
|
|
12
|
-
export declare class ProcedureDelete extends ProcedureBase {
|
|
13
|
-
/** A string used to check the type of the event. */
|
|
14
|
-
type: string;
|
|
15
|
-
constructor(workspace: Workspace, model: IProcedureModel);
|
|
16
|
-
run(forward: boolean): void;
|
|
17
|
-
/**
|
|
18
|
-
* Encode the event as JSON.
|
|
19
|
-
*
|
|
20
|
-
* @returns JSON representation.
|
|
21
|
-
*/
|
|
22
|
-
toJson(): ProcedureDeleteJson;
|
|
23
|
-
/**
|
|
24
|
-
* Deserializes the JSON event.
|
|
25
|
-
*
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
static fromJson(json: ProcedureDeleteJson, workspace: Workspace): ProcedureDelete;
|
|
29
|
-
}
|
|
30
|
-
export interface ProcedureDeleteJson extends ProcedureBaseJson {
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=events_procedure_delete.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
7
|
-
import type { Workspace } from '../workspace.js';
|
|
8
|
-
import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
|
|
9
|
-
/**
|
|
10
|
-
* Represents a procedure data model being enabled or disabled.
|
|
11
|
-
*/
|
|
12
|
-
export declare class ProcedureEnable extends ProcedureBase {
|
|
13
|
-
/** A string used to check the type of the event. */
|
|
14
|
-
type: string;
|
|
15
|
-
private oldState;
|
|
16
|
-
private newState;
|
|
17
|
-
constructor(workspace: Workspace, model: IProcedureModel);
|
|
18
|
-
run(forward: boolean): void;
|
|
19
|
-
/**
|
|
20
|
-
* Encode the event as JSON.
|
|
21
|
-
*
|
|
22
|
-
* @returns JSON representation.
|
|
23
|
-
*/
|
|
24
|
-
toJson(): ProcedureEnableJson;
|
|
25
|
-
/**
|
|
26
|
-
* Deserializes the JSON event.
|
|
27
|
-
*
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
static fromJson(json: ProcedureEnableJson, workspace: Workspace): ProcedureEnable;
|
|
31
|
-
}
|
|
32
|
-
export interface ProcedureEnableJson extends ProcedureBaseJson {
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=events_procedure_enable.d.ts.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { IParameterModel } from '../interfaces/i_parameter_model.js';
|
|
7
|
-
import { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
8
|
-
import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
|
|
9
|
-
import type { Workspace } from '../workspace.js';
|
|
10
|
-
/**
|
|
11
|
-
* The base event for an event associated with a procedure parameter.
|
|
12
|
-
*/
|
|
13
|
-
export declare abstract class ProcedureParameterBase extends ProcedureBase {
|
|
14
|
-
readonly parameter: IParameterModel;
|
|
15
|
-
constructor(workspace: Workspace, model: IProcedureModel, parameter: IParameterModel);
|
|
16
|
-
/**
|
|
17
|
-
* Encode the event as JSON.
|
|
18
|
-
*
|
|
19
|
-
* @returns JSON representation.
|
|
20
|
-
*/
|
|
21
|
-
toJson(): ProcedureParameterBaseJson;
|
|
22
|
-
}
|
|
23
|
-
export interface ProcedureParameterBaseJson extends ProcedureBaseJson {
|
|
24
|
-
parameterId: string;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=events_procedure_parameter_base.d.ts.map
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IParameterModel } from '../interfaces/i_parameter_model.js';
|
|
7
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
8
|
-
import { ParameterState } from '../serialization/procedures.js';
|
|
9
|
-
import type { Workspace } from '../workspace.js';
|
|
10
|
-
import { ProcedureParameterBase, ProcedureParameterBaseJson } from './events_procedure_parameter_base.js';
|
|
11
|
-
/**
|
|
12
|
-
* Represents a parameter being added to a procedure.
|
|
13
|
-
*/
|
|
14
|
-
export declare class ProcedureParameterCreate extends ProcedureParameterBase {
|
|
15
|
-
readonly index: number;
|
|
16
|
-
/** A string used to check the type of the event. */
|
|
17
|
-
type: string;
|
|
18
|
-
/**
|
|
19
|
-
* @param parameter The parameter model that was just added to the procedure.
|
|
20
|
-
* @param index The index the parameter was inserted at.
|
|
21
|
-
*/
|
|
22
|
-
constructor(workspace: Workspace, procedure: IProcedureModel, parameter: IParameterModel, index: number);
|
|
23
|
-
run(forward: boolean): void;
|
|
24
|
-
parameterMatches(param: IParameterModel): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Encode the event as JSON.
|
|
27
|
-
*
|
|
28
|
-
* @returns JSON representation.
|
|
29
|
-
*/
|
|
30
|
-
toJson(): ProcedureParameterCreateJson;
|
|
31
|
-
/**
|
|
32
|
-
* Deserializes the JSON event.
|
|
33
|
-
*
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
36
|
-
static fromJson(json: ProcedureParameterCreateJson, workspace: Workspace): ProcedureParameterCreate;
|
|
37
|
-
}
|
|
38
|
-
export interface ProcedureParameterCreateJson extends ProcedureParameterBaseJson {
|
|
39
|
-
parameter: ParameterState;
|
|
40
|
-
index: number;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=events_procedure_parameter_create.d.ts.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IParameterModel } from '../interfaces/i_parameter_model.js';
|
|
7
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
8
|
-
import type { Workspace } from '../workspace.js';
|
|
9
|
-
import { ProcedureParameterBase, ProcedureParameterBaseJson } from './events_procedure_parameter_base.js';
|
|
10
|
-
/**
|
|
11
|
-
* Represents a parameter being removed from a procedure.
|
|
12
|
-
*/
|
|
13
|
-
export declare class ProcedureParameterDelete extends ProcedureParameterBase {
|
|
14
|
-
readonly index: number;
|
|
15
|
-
/** A string used to check the type of the event. */
|
|
16
|
-
type: string;
|
|
17
|
-
/**
|
|
18
|
-
* @param parameter The parameter model that was just removed from the
|
|
19
|
-
* procedure.
|
|
20
|
-
* @param index The index the parameter was at before it was removed.
|
|
21
|
-
*/
|
|
22
|
-
constructor(workspace: Workspace, procedure: IProcedureModel, parameter: IParameterModel, index: number);
|
|
23
|
-
run(forward: boolean): void;
|
|
24
|
-
parameterMatches(param: IParameterModel): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Encode the event as JSON.
|
|
27
|
-
*
|
|
28
|
-
* @returns JSON representation.
|
|
29
|
-
*/
|
|
30
|
-
toJson(): ProcedureParameterDeleteJson;
|
|
31
|
-
/**
|
|
32
|
-
* Deserializes the JSON event.
|
|
33
|
-
*
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
36
|
-
static fromJson(json: ProcedureParameterDeleteJson, workspace: Workspace): ProcedureParameterDelete;
|
|
37
|
-
}
|
|
38
|
-
export interface ProcedureParameterDeleteJson extends ProcedureParameterBaseJson {
|
|
39
|
-
index: number;
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=events_procedure_parameter_delete.d.ts.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IParameterModel } from '../interfaces/i_parameter_model.js';
|
|
7
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
8
|
-
import type { Workspace } from '../workspace.js';
|
|
9
|
-
import { ProcedureParameterBase, ProcedureParameterBaseJson } from './events_procedure_parameter_base.js';
|
|
10
|
-
/**
|
|
11
|
-
* Represents a parameter of a procedure being renamed.
|
|
12
|
-
*/
|
|
13
|
-
export declare class ProcedureParameterRename extends ProcedureParameterBase {
|
|
14
|
-
readonly oldName: string;
|
|
15
|
-
/** A string used to check the type of the event. */
|
|
16
|
-
type: string;
|
|
17
|
-
private readonly newName;
|
|
18
|
-
constructor(workspace: Workspace, procedure: IProcedureModel, parameter: IParameterModel, oldName: string);
|
|
19
|
-
run(forward: boolean): void;
|
|
20
|
-
/**
|
|
21
|
-
* Encode the event as JSON.
|
|
22
|
-
*
|
|
23
|
-
* @returns JSON representation.
|
|
24
|
-
*/
|
|
25
|
-
toJson(): ProcedureParameterRenameJson;
|
|
26
|
-
/**
|
|
27
|
-
* Deserializes the JSON event.
|
|
28
|
-
*
|
|
29
|
-
* @internal
|
|
30
|
-
*/
|
|
31
|
-
static fromJson(json: ProcedureParameterRenameJson, workspace: Workspace): ProcedureParameterRename;
|
|
32
|
-
}
|
|
33
|
-
export interface ProcedureParameterRenameJson extends ProcedureParameterBaseJson {
|
|
34
|
-
oldName: string;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=events_procedure_parameter_rename.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2022 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import type { IProcedureModel } from '../interfaces/i_procedure_model.js';
|
|
7
|
-
import type { Workspace } from '../workspace.js';
|
|
8
|
-
import { ProcedureBase, ProcedureBaseJson } from './events_procedure_base.js';
|
|
9
|
-
/**
|
|
10
|
-
* Represents a procedure being renamed.
|
|
11
|
-
*/
|
|
12
|
-
export declare class ProcedureRename extends ProcedureBase {
|
|
13
|
-
readonly oldName: string;
|
|
14
|
-
/** A string used to check the type of the event. */
|
|
15
|
-
type: string;
|
|
16
|
-
private newName;
|
|
17
|
-
constructor(workspace: Workspace, model: IProcedureModel, oldName: string);
|
|
18
|
-
run(forward: boolean): void;
|
|
19
|
-
/**
|
|
20
|
-
* Encode the event as JSON.
|
|
21
|
-
*
|
|
22
|
-
* @returns JSON representation.
|
|
23
|
-
*/
|
|
24
|
-
toJson(): ProcedureRenameJson;
|
|
25
|
-
/**
|
|
26
|
-
* Deserializes the JSON event.
|
|
27
|
-
*
|
|
28
|
-
* @internal
|
|
29
|
-
*/
|
|
30
|
-
static fromJson(json: ProcedureRenameJson, workspace: Workspace): ProcedureRename;
|
|
31
|
-
}
|
|
32
|
-
export interface ProcedureRenameJson extends ProcedureBaseJson {
|
|
33
|
-
oldName: string;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=events_procedure_rename.d.ts.map
|