Christopher Allen
79b814018e
Migrate core/utils.js to goog.module syntax ( #5446 )
...
* Add missing requires for Blockly.utils.*
- Blockly.utils.svgPaths in core/rendered_connection.js
- Blockly.utils.colour in core/toolbox/category.js
- Blockly.utils.KeyCodes in core/toolbox/toolbox.js
* Migrate core/utils.js to ES6 const/let
* Migrate core/utils.js to goog.module
* Migrate core/utils.js named requires
* clang-format core/utils.js
2021-09-09 17:25:53 +01:00
Christopher Allen
c31895dc60
fix: Add missing require for Blockly.utils.object, .Size ( #5427 )
...
Some files were using Blockly.utils.object.inherits (or .mixin) without
having imported Blockly.utils.object.
Similarly, trashcan.js tried to use utils.Size as a constructor
instead of importing Size from Blockly.utils.Size.
2021-09-03 22:45:54 +01:00
Christopher Allen
4c40378b9a
Use goog.requireType when importing interfaces (etc.) ( #5343 )
...
* Use goog.requireType when importing I* interfaces
Interfaces have no code, so should never be referred to outside of
(JSDoc) comments, and so the modules that define only interfaces never
need to be goog.require'd - goog.requireType is always sufficient.
This commit fixes imports of all modules whose name matches
/(.*\.)?I[A-Z]*/ - i.e., the hungarian-notation named ones in
core/interfaces/.
* Use goog.requireType when only using import for type specifications
Where a module is imported only to used in JSDoc comments it can
(and should) be goog.requireType'd instead of goog.require'd.
* Remove spurious eslint-disable no-unused-vars
There were a few cases where modules were being imported with
goog.require (because they are referred to in code, not just JSDoc
comments) but were prefaced by a spurious eslint suppress.
Remove these, restoring the invariant that an import gets an eslint
if and only if it is a requireType.
* Remove obsolete Closure Compiler error group
stricterMissingRequire has been superceded by missingRequire, and now
causes a Java null pointer exception if supplied.
2021-08-11 18:50:45 +01:00
kozbial
6ad723afbc
Add eslint disable
2021-08-09 18:53:11 -07:00
kozbial
6863d7fa08
clang-format core/toolbox/toolbox.js
2021-08-09 18:53:11 -07:00
kozbial
a2e9509542
Migrate core/toolbox/toolbox.js named requires
2021-08-09 18:53:11 -07:00
kozbial
ec1567020b
Migrate core/toolbox/toolbox.js to goog.module
2021-08-09 18:53:11 -07:00
kozbial
8875dbd50c
Migrate core/toolbox/toolbox.js to ES6 const/let
2021-08-09 18:53:11 -07:00
kozbial
ef0fcdbcdd
Split Blockly.BlocklyOptions into a separate file
2021-08-05 10:50:44 -07:00
Monica Kozbial
7b286dbf82
Update the registered component ids ( #4898 )
2021-06-17 17:50:04 -07:00
Monica Kozbial
7d45b531ac
Update toolbox drag target when visibility changes ( #4919 )
2021-06-17 15:17:36 -07:00
alschmiedt
a46dbb37e7
Fixes workspace scroll bug ( #4921 )
2021-06-16 08:18:28 -07:00
Monica Kozbial
34fce2c1cb
Moves toolbox cursor styling out of block_dragger ( #4896 )
2021-06-11 18:02:40 -07:00
Monica Kozbial
a17cb7f12e
Adding parameter to dragEnter and dragExit ( #4890 )
...
* introduce IDraggable interface
* Add parameter to drag methods in IDragTarget
* combines bubble/drag methods on IDragTarget and IDeleteArea to take an IDraggable element
2021-06-11 12:58:26 -07:00
Monica Kozbial
2005576036
Add onDragOver and wouldDelete_ to DeleteArea ( #4888 )
...
* keep track of state for whether the block or bubble would be deleted for use with drag enter exit
* Check if block and bubble is deletable in IDeleteArea
* Add to jsdoc of IDeleteArea
2021-06-10 16:27:04 -07:00
Monica Kozbial
0014ad3257
Add id to component interface ( #4887 )
2021-06-10 16:03:43 -07:00
Monica Kozbial
d2579a7369
Add removeComponent to ComponentManager ( #4884 )
2021-06-09 22:29:33 -07:00
Monica Kozbial
11390341b1
Adding IDragTarget support. ( #4852 )
2021-06-09 13:59:22 -07:00
Neil Fraser
cff7b359f4
Make comments more consistent.
2021-06-09 11:41:42 -07:00
Neil Fraser
76b5517008
Use null-prototype objects for maps
...
A {} has a bunch of names already defined on it (like ‘toString’). When using an object as a map with arbitrary keys, it should not inherit from Object.prototype.
2021-06-09 11:41:42 -07:00
Monica Kozbial
5344ad6c21
Add support for IAutoHideable ( #4855 )
2021-05-27 17:01:11 -07:00
Neil Fraser
dd0314bc0b
Normalize comments
2021-05-19 09:57:14 -07:00
Sam El-Husseini
f2f878db8c
Fix multiple strict require warnings ( #4793 )
2021-04-21 16:46:04 -07:00
Sam El-Husseini
0cc79b1366
Fix missing require - constructors ( #4676 )
...
* Fix missing constructors
2021-04-21 12:11:13 -07:00
alschmiedt
d58c80db76
Refactor flyout and toolbox metrics ( #4648 )
2021-03-15 12:37:23 -07:00
Rachel Fenichel
f7e0d5f4ea
Use existing toolbox position enum
2021-03-05 14:16:43 -08:00
Rachel Fenichel
59084a043c
TOOLBOX_AT_TOP and friends -> constants.toolboxPosition.TOP, etc
2021-03-05 13:48:45 -08:00
Sam El-Husseini
63d26dc186
Add extra requires check ( #4677 )
...
* Add extra requires check
2021-03-05 09:50:51 -08:00
Monica Kozbial
57749e6eb8
Updating bump logic to support single-direction scrollbars ( #4652 )
...
* Updating bump logic to support single-direction scrollbars
2021-03-01 12:20:12 -08:00
Sam El-Husseini
5780399750
Use registry for creating the no-category flyout ( #4659 )
...
* Use registry for creating the horizontal / vertical flyout
2021-03-01 10:00:47 -08:00
Sam El-Husseini
f97730e83c
Sort requires ( #4658 )
...
* Cleanup gulp method to sort requires
2021-02-25 17:17:42 -08:00
Sam El-Husseini
ab8a11784d
Fix event related missing requires ( #4656 )
...
* Fix event related missing requires
2021-02-25 14:28:11 -08:00
Rachel Fenichel
1d8c234d33
Update uses of bindEvent_, bindEventWithChecks_, and unbindEvent_. Add missing requires for Blockly.browserEvents.
2021-02-23 11:23:28 -08:00
Rachel Fenichel
54c4e8de39
Rename Blockly.eventHandling->Blockly.browserEvents and replace all Blockly.EventData annotations
2021-02-22 13:23:19 -08:00
alschmiedt
a3adc42e8a
Remove keyboard navigation from core ( #4593 )
2021-01-19 11:50:51 -08:00
alschmiedt
1043257f87
Fix ios12 bug ( #4517 )
...
* Changes mousedown to click event
2020-12-11 09:47:35 -08:00
Monica Kozbial
40ef586260
Refactoring Ui events in core ( #4418 )
...
* Ui events base (#4370 )
* Add constants for new ui event types
* Add property to indicate an event as UI event
* Click events (#4372 )
* Creating new ui base class.
* Refactor theme event (#4391 )
* Add themeName property to theme event
* Refactor marker move events. (#4389 )
* Refactor trashcan open event (#4392 )
* Refactor selected event (#4387 )
* Refactor toolbox item change event (#4394 )
* Refactor bubble open events (#4390 )
* Refactor block drag event (#4388 )
* Viewport events (#4395 )
* Fix event filtering for ui events (#4401 )
* Move events to new directory and rename Ui events base (#4400 )
* Move events to new directory and rename Ui events base
* Add missing fromJson implementation for click event (#4410 )
* Adding serialization tests for events
* Zoom controls event (#4407 )
* Refactor zoom event
* Rename IS_UI_EVENT to isUiEvent
2020-11-04 14:43:54 -08:00
alschmiedt
f1498e7f07
Keyboard shortcuts ( #4421 )
...
* Adds shortcut registry and removes action and key map (#4398 )
* Adds Shortcut tests and refactored navigation tests (#4412 )
* Adds shortcut items (#4408 )
* Add shortcuts for navigation (#4409 )
* Add final keyboard shortcut cleanup (#4413 )
2020-11-02 13:30:05 -08:00
alschmiedt
edbd6991b4
Small fixes to the toolbox ( #4380 )
2020-10-19 09:43:41 -07:00
Sam El-Husseini
fba35d342c
Add missing require Blockly.constants ( #4366 )
2020-10-12 17:56:42 -04:00
alschmiedt
a0c0b86679
Fix toolbox types ( #4355 )
2020-10-07 11:04:10 -07:00
alschmiedt
64fe425944
Fix toolbox resize problem ( #4340 )
2020-09-30 12:55:27 -07:00
Maribeth Bottorff
f6688d0339
Convert toolbox position to enum ( #4284 )
...
Convert toolbox position to enum
2020-09-16 10:54:17 -07:00
alschmiedt
d01169fa79
Toolbox Rewrite ( #4223 )
...
Rewrite the toolbox in order to get rid of old closure code and make it easier to extend.
Co-authored-by: Maribeth Bottorff <maribethb@google.com >
2020-09-02 08:13:07 -07:00