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
Rachel Fenichel
adc4c02abf
Fix lint
2021-07-27 16:39:44 -07:00
kozbial
5a5aabb7e7
clang-format core/zoom_controls.js
2021-07-27 09:05:27 -07:00
kozbial
40c095f496
Migrate core/zoom_controls.js named requires
2021-07-27 09:05:27 -07:00
kozbial
bc7c5115e1
Migrate core/zoom_controls.js to goog.module
2021-07-27 09:05:27 -07:00
kozbial
61bbffc29e
Migrate core/zoom_controls.js to ES6 const/let
2021-07-27 09:05:27 -07:00
Rachel Fenichel
cf7a8b95b8
Remove extra requires of Blockly.constants
2021-07-21 15:35:19 -07:00
Rachel Fenichel
cc7a263fb3
Replace references to SPRITE and SOUND_LIMIT with internalConstants versions
2021-07-21 15:33:55 -07:00
Monica Kozbial
7b286dbf82
Update the registered component ids ( #4898 )
2021-06-17 17:50:04 -07:00
Monica Kozbial
ff34e067f8
Update positionable jsdoc ( #4908 )
2021-06-14 13:14:01 -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
5344ad6c21
Add support for IAutoHideable ( #4855 )
2021-05-27 17:01:11 -07:00
Monica Kozbial
1cadbb94bd
Rename PluginManager and related elements ( #4857 )
...
* Rename PluginManager and related elements to use component instead of plugin
* Rename types to capabilities
2021-05-27 16:14:33 -07:00
Neil Fraser
dd0314bc0b
Normalize comments
2021-05-19 09:57:14 -07:00
Monica Kozbial
6259579c64
Add positioning helpers for trashcan and zoom controls ( #4807 )
2021-05-07 17:13:48 -07:00
Sam El-Husseini
0cc79b1366
Fix missing require - constructors ( #4676 )
...
* Fix missing constructors
2021-04-21 12:11:13 -07:00
Monica Kozbial
b6628da5bb
Always scroll center on zoom reset ( #4725 )
...
* Always scroll center on zoom reset
2021-03-24 10:08:42 -07:00
Monica Kozbial
8386566894
Update IPositionable position JSDoc ( #4705 )
2021-03-19 16:39:27 -07:00
Monica Kozbial
bea85cda1c
Positionables bugfix ( #4685 )
...
* Apply fixes to positionable logic
* Update variable name and add @private annotation
2021-03-08 11:20:30 -08:00
Rachel Fenichel
855185c6cf
Merge pull request #4682 from rachel-fenichel/toolbox_constants
...
Use Blockly.utils.toolbox.Position enum everywhere
2021-03-08 10:52:58 -08:00
Monica Kozbial
d4897061d7
Cleanup comment ( #4680 )
2021-03-05 15:47:00 -08:00
Monica Kozbial
f837f1e44e
Add zoom support for single-direction-scroll ( #4653 )
...
* Add zoom support for single-direction scroll
2021-03-05 14:37:41 -08: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
ef8a5a1fe1
Add PluginManager ( #4672 )
...
* Add PluginManager.
2021-03-04 16:51:06 -08:00
Monica Kozbial
f2cec81584
Adding Positionable interface ( #4669 )
...
* Adding IPositionable interface.
2021-03-02 16:17:17 -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
Rachel Fenichel
c9be2402bd
More missing requires
2021-01-12 12:38:21 -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
Sam El-Husseini
fba35d342c
Add missing require Blockly.constants ( #4366 )
2020-10-12 17:56:42 -04:00
Sam El-Husseini
db40e44b7c
Move Blockly.utils.dom.SvgElementType to Blockly.utils.Svg ( #4285 )
...
* Move SVGElementType to its own file shaving off 2.7KB
2020-09-16 14:42:58 -07:00
Monica Kozbial
f8f98831af
Add zoom controls tests. ( #4159 )
2020-08-12 18:39:35 -07:00
Sam El-Husseini
0f3db47fa5
Use generics to derive SVG element type ( #4036 )
...
* Encapsulate type in a generic to automatically derive type of SVG element when using createSvgElement
2020-07-13 10:40:31 -07:00
Monica Kozbial
40efb59a34
Unbind event handlers in dispose of zoom controls. ( #4031 )
...
* Unbind event handlers in dispose of zoom controls.
* Move event handler references to constructor.
2020-07-10 17:34:53 -07:00
Monica Kozbial
fdd0f4f25f
Emit UI event on zoom control clicks. ( #4025 )
...
* Emit UI event on zoom control clicks.
* Fix typo
* Update jsdoc for mouse event handlers.
2020-07-10 10:15:09 -07:00
Neil Fraser
4e2f8e6e02
Use SPDX licences.
...
This is a followup to #3127 .
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Sam El-Husseini
e5ec726253
Fix type, caught by typings
2019-10-03 14:41:15 -07:00
Rachel Fenichel
78dc82f7ac
Misc cleanup: annotations, and flyoutButton disposal.
2019-10-03 10:40:43 -07:00
Rachel Fenichel
79bedca5a7
Element -> SVGElement ( #3140 )
...
* Use SVGElement instead of Element for the results of createSvgElement
* More SVGElement annotations.
2019-10-02 16:12:31 -07:00
Neil Fraser
b46a4fe286
Bring our license format up to date ( #3127 )
...
* Google changed from an Inc to an LLC.
This happened back in 2017 but we didn’t notice. Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.
* Remove project description/titles from licenses
This is no longer part of Google’s header requirements. Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).
* License no longer requires URL.
* Fix license regexps.
2019-10-02 14:46:56 -07:00
Neil Fraser
6650ecf13f
Make dynamic variables be an optional module.
...
Also straighten out some dependencies.
2019-09-27 10:48:14 -07:00
Neil Fraser
75cf614104
Break CSS into modules. ( #3084 )
...
* Break CSS into modules.
Drops the compile test by 3 KB.
Remove obsolete .blocklyDraggable class stub (it used to be dynamically changed).
Remove unused menuseparator CSS.
2019-09-25 18:01:19 -07:00
Neil Fraser
096959fde9
Cleanup of last fortnight’s commits. ( #2865 )
...
No functional changes.
2019-08-19 14:07:48 -07:00
Neil Fraser
98a98bcce6
Add Blockly.utils.dom.XLINK_NS
...
And fix provide/require mixup.
2019-06-07 10:32:57 -07:00
Neil Fraser
848d3a3509
Move setCssTransform & createSvgElement to dom.
...
Also move SVG_NS and HTML_NS properties.
2019-06-07 10:32:57 -07:00