Commit Graph

70 Commits

Author SHA1 Message Date
Rachel Fenichel df2eafb8dd refactor: move properties into constructors and convert to classes (#5822)
* refactor: move properties to constructor in block_drag_surface.js

* refactor: move properties to constructor in block_svg.js

* refactor: move properties to constructor in block.js

* refactor: move properties to constructor in bubble.js

* refactor: move properties to constructor in connection.js

* refactor: move properties to constructor in flyout_base.js

* refactor: move properties to constructor in flyout_button.js

* refactor: move properties to constructor in generator.js

* refactor: move properties to constructor in grid.js

* refactor: move properties to constructor in input.js

* refactor: move properties to constructor in mutator.js

* refactor: move properties to constructor in scrollbar.js

* refactor: move properties to constructor in trashcan.js

* refactor: move properties to constructor in warning.js

* refactor: move properties to constructor in workspace_audio.js

* refactor: move properties to constructor in workspace_drag_surface_svg.js

* refactor: move properties to constructor in workspace_svg.js

* refactor: move properties to constructor in workspace.js

* refactor: move properties to constructor in zoom_controls.js

* chore: rebuild

* refactor: convert zoom_controls.js to es6 class and format

* refactor: convert workspace_audio.js to es6 class and format

* refactor: convert workspace_dragger.js to es6 class and format

* refactor: convert workspace_drag_surface_svg.js to es6 class and format

* refactor: convert variable_model.js to es6 class and format

* refactor: convert variable_map.js to es6 class and format

* refactor: convert theme.js to es6 class and format

* chore: remove bad comment
2022-01-06 13:13:40 -08:00
Christopher Allen da16a66f33 refactor: msg.js: use named export, remove declareLegacyNamespace (#5768) 2021-12-02 16:47:27 +00:00
Rachel Fenichel 075385c87c chore: move remaining functions out of utils.js (#5714)
* chore: move arrayRemove to a new utils.array namespace

* chore: move getBlockTypeCounts out of utils.js

* chore: remove last functions from utils.js

* chore: reorder imports

* chore: add re-export for runAfterPageLoad
2021-11-15 18:12:45 -08:00
Rachel Fenichel f14a1c8034 chore: fix more lint (#5676)
* chore: fix assorted lint

* chore: clang-format

* chore: clang-format
2021-11-08 16:41:52 -08:00
Aaron Dodson 3851b14627 refactor: Migrate to named exports (#5623)
* refactor: Migrate to named exports

* fix: Sort requires

* fix: Remove duplicate deps
2021-10-20 15:53:23 -07:00
Neil Fraser 90b3f75d82 Remove @author tags (#5601)
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.

Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00
Neil Fraser c929b3015b chore: Convert == to === and != to !== where possible. (#5599) 2021-10-15 09:17:04 -07:00
Rachel Fenichel b25e24fd02 chore: Run clang-format on core/*.js (#5589)
* Run clang-format on core/*.js

* Revert changes for css formatting
2021-10-07 10:32:02 -07:00
Monica Kozbial 49bc2b1ae4 Replace namespace annotation with class annotation in files that define a class (#5566) 2021-09-28 15:57:09 -07:00
Monica Kozbial d8fbe1b05b Add namespace and alias annotations to jsdoc (#5550)
* Add annotations to files under core/events

* Add annotations to files under core/interfaces

* Add annotations to files under core/keyboard_nav

* Add annotations to files under core/renderers

* Add annotations to files under core/serialization

* Add annotations to files under core/theme

* Add annotations to files under core/toolbox

* Add annotations to files under core/utils

* Add annotations to files under core
2021-09-27 14:42:54 -07:00
alschmiedt 2b34748e0e chore: remove declareLegacyNamespace from events (#5532)
- Adds an extra events/utils.js file to hold helper methods related to events.
2021-09-24 14:20:32 -07:00
Aaron Dodson e0693a65d2 chore: Remove declareLegacyNamespace() from files in core (#5525)
* chore: Remove declareLegacyNamespace() from files in core

* fix: Update missing/errant re-exports in blockly.js
2021-09-23 14:48:52 -07:00
kozbial d614f5859d Fix bug in variable_map that was introduced during merge conflict resolving 2021-09-22 10:28:06 -07:00
kozbial fd251dae22 Merge branch 'goog_module' into merge-develop-to-goog_module 2021-09-22 09:27:52 -07:00
Rachel Fenichel 3adfaaf6d9 chore: named exports for block* files (#5512)
* chore: named export for block.js

* chore: named export for block_drag_surface.js

* chore: named export for block_dragger.js

* chore: named export for block_svg.js

* Fix import ordering

* chore: fix imports using requireType

* Remove extra require
2021-09-22 08:46:19 -07:00
kozbial 6fc90213a6 Merge branch 'develop' into merge-develop-to-goog_module 2021-09-21 16:04:33 -07:00
Aaron Dodson ce8e7921a2 Move alert/confirm/prompt to a new file, dialog.js (#5457)
* Migrate prompt/alert/confirm to dedicated module

* Update core/blockly.js to pass through calls to prompt/alert/confirm to core/dialog.js

* Update calls to Blockly.prompt/alert/confirm to dialog.prompt/alert/confirm

* Fix typo and errant redeclaration of Blockly.prompt

* Clarify JSDoc on customizing Blockly.dialog.alert/confirm/prompt
2021-09-14 08:19:53 -07:00
Christopher Allen a6471c4276 Rename Blockly.utils.IdGenerator to idGenerator and move Blockly.utils.genUid to there (#5441)
* Rename Blockly.utils.IdGenerator -> idGenerator
* Move genUid from Blockly.utils to Blockly.utils.idGenerator
2021-09-09 17:08:44 +01:00
Neil Fraser 49fcbc8411 Use Blockly.utils.arrayRemove (#5420)
Recently added code doesn't use existing utility function.
2021-09-03 11:40:55 -07:00
Aaron Dodson 78646eae51 clang-format core/variable_map.js 2021-07-29 12:47:51 -07:00
Aaron Dodson 9847b8c027 Migrate core/variable_map.js to named requires 2021-07-29 12:39:58 -07:00
Aaron Dodson 959d976723 Migrate core/variable_map.js to goog.module 2021-07-29 12:34:37 -07:00
Aaron Dodson 1d9c9359f9 Migrate core/variable_map.js to ES6 const/let 2021-07-29 12:30:44 -07:00
Neil Fraser e661c92a36 More JSDoc improvements 2021-05-27 21:30:26 -07:00
Neil Fraser d919b0af21 Update JSDoc from Array.<> to Array<>
Same with Object.
2021-05-27 21:30:26 -07:00
Sam El-Husseini 63d26dc186 Add extra requires check (#4677)
* Add extra requires check
2021-03-05 09:50:51 -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 107181d6f5 Missing requires, r through v 2021-02-17 14:52:06 -08:00
Sam El-Husseini fd916fdb9b Bounding Box interface (#3906)
* Add an interface describing a bounding box registered on the workspace

* Clear the bounding box array

* PR comments

* Update chromedriver
2020-05-19 18:06:11 -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 180926ee77 Fix duplicate variable model type (#3594)
* Resolve duplicate empty var type when returning list of variableModel's types.
2020-01-14 13:10:34 -08:00
Beka Westberg 6d1bb201f7 feat: Improved procedure arg interaction. (#3527)
* feat: Improved procedure arg interaction.

* Added docs.

* Fixed typos and typings.

* Fixed typings?

* Changed visibility to private.
2020-01-07 13:55:46 -08:00
Neil Fraser 123f436e04 Add parens around inline assignments (#3381) 2019-10-31 15:17:35 -07:00
Sam El-Husseini 90ad0789f6 Fix 11 warnings related to variables and variable_model. (#3278)
* Fix 10 warnings related to variables and variable_model.
2019-10-22 14:26:59 -04:00
Sam El-Husseini 664cc3d6cd Fix warnings related to number of arguments passed. (#3270) 2019-10-17 11:47:30 -05: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 76af463ec4 Removing require for Blockly.FlyoutButton
Should have been in the previous PR, since that’s the point.

Also, a recompile given all the recent dependency changes.
2019-09-24 12:15:03 -07:00
Neil Fraser 2d3b514425 Ensure last variable category is last variable added.
Resolves #2050.
2019-07-15 14:37:27 -07:00
Neil Fraser 2ac3447383 Create null objects properly.
new Object(null) doesn’t do anything, that’s just broken.
And the for loop with keys is silly.
2019-07-15 14:37:27 -07:00
Neil Fraser 829dcc207c Make type and variabletype attributes optional
If a variable doesn’t have a type, then don’t add these empty attributes in the XML.
2019-07-15 14:37:27 -07:00
alschmiedt 35341959d3 Fixes eslint error 2019-07-09 11:28:36 -07:00
alschmiedt f30d79fbc8 Fixes bug with using dynamic variable in toolbox 2019-07-09 11:02:02 -07:00
Neil Fraser 9f528922a7 Fix some dependencies 2019-05-24 15:45:05 -07:00
Neil Fraser aa09ad9175 Line wrap at 80. 2018-10-16 11:34:10 -07:00
Rachel Fenichel 6092e4c517 Calls to getAllBlocks should pass a value for _ordered_ 2018-09-13 16:06:19 -07:00
Neil Fraser dce60fd152 Replace ReferenceError with Error.
Change to 4-space indentation rather than aligning with parent structure.
2018-07-11 12:20:02 -07:00
Neil Fraser 284b79407e Require Blockly.utils where needed. 2018-07-11 12:20:02 -07:00
Neil Fraser 4cb4b42f8d Use named properties on Msg. 2018-04-27 11:50:51 -07:00
Rachel Fenichel 4c9b602523 Move event classes into separate files, and update requires accordingly 2018-02-27 17:47:33 -08:00
Rachel Fenichel 1e3450a051 Indentation lint that blocks moving to eslint 4.0 2018-01-23 17:27:35 -08:00