* Rename Blockly.Blocks to Blockly.blocks
Because it does not export a type as its default export.
Part of #5073.
* Name default export of Blockly.blocks Blocks.
Use named exports in Blockly.blocks by giving the former default
export the name Blocks.
Part of #5153.
* Reexport Blockly.blocks from blockly.js
* Document the format of renamings.js better.
* Use goog.module in mocha tests
* Fix compiler warnings
* Make test helpers a module
* Name test modules Blockly.test.*
This is to be more consistent with how non-test modules are named.
Also remove top-level goog.require of TestHelpers (now
Blockly.test.helpers) since requiring a side-effect-less module does
nothing.
* Convert block_test.js and comment_test.js to goog.module syntax
* Address PR comments
* Goog modulify tests
* Goog modulify toolbox helpers
* Fixes imports and moves common tests from workspace_test.js to a helper file.
* Update test deps after rebase
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
* Fix error conditions for setParent #4989
* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fix error conditions for setParent #4989
* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Error now thrown when calling `a.setParent(null)` if a is connected to a superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fix error conditions for setParent #4989
* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fixed lint errors.
* Fix error conditions for setParent google#4989
* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fixed lint errors.
* Adjusted comment.
* Removed unnecessary set to null/added tests
* One is failing (commented out), will investigate later
* Lint fix
* Removed failing test that correctly fails
* Update comments to conform to style guide
Capitalize first letter, period at end
* Now throws error for getField/getFieldValue/setFieldValue if provided name is not a string
* Changed error to more specific TypeError
* Type checking and error message moved up to getField
* Tests added/modified to check that non-string types for field names produce type errors
* Added tests for getting/setting field (values) when names are not supplied and test for getting a field value, setting it to a new value, and getting it again.
* Added more user-friendly error message for setFieldValue telling the developer that he/she is missing the name rather than Field "undefined" not found.
* Refactor block type cleanup into shared cleanup.
* Use shared cleanup for block type cleanup.
* Remove overwriting of core Blockly block in test.
* Rename cleanup arrays for clarity
* Add blocks to cleanup array when defined in shared helpers
* Refactor logic for adding to shared cleanup.
* Add helper for defining block and adding block type to cleanup.
* Fix jsdocs
* Simplifying helpers for adding to cleanup.
* Add missing semicolons
* Update jsdoc for sharedTestSetup
* Use stub to wrap cleanup with defineBlocksWithJsonArray
* Remove unused helper from lint ignore
* 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.
* Disconnecting child block even if it cannot be connected to parent block.
* Bump disconnected child block.
* Added method for behavior on failed connection and updated expected behavior of unplug in unit tests.
* Removing obsolete TODO and calling new helper method in tests.
* Moved comment icons to use a model-based system. The block holds the model of the comment, and the comment icon holds a reference to it.
* Reorganized the setVisible function.
* Changed how xml.js serializes and deserializes comments.