Commit Graph

3790 Commits

Author SHA1 Message Date
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
Christopher Allen
16b6d4526a refactor: Rename Blockly.Blocks, migrate to named exports (#5515)
* 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.
2021-09-24 19:12:03 +01:00
Christopher Allen
f931b2eb36 Reexport global.globalThis as Blockly.utils.global (#5534)
Fixes #5503

This makes the value of Blockly.utils.global the same as it was
before PR #5451.
2021-09-24 18:47:43 +01:00
Christopher Allen
8ab8536739 refactor: Migrate Blockly.ConnectionType to named exports (#5533)
* refactor: Migrate Blockly.ConnectionType to named exports
* Add corresponding information to renamings.js
2021-09-24 17:38:08 +01:00
kozbial
757878c646 chore: Remove declareLegacyNamespace() from files under interfaces/* 2021-09-24 09:05:17 -07:00
kozbial
10485dd838 Fix typo 2021-09-24 09:02:14 -07:00
Aaron Dodson
6b07ccab96 chore: Remove declareLegacyNamespace from renderers (#5528)
* chore: Remove declareLegacyNamespace from Geras renderer

* chore: Remove declareLegacyNamespace from minimalist renderer

* chore: Remove declareLegacyNamespace from thrasos renderer

* chore: Remove declareLegacyNamespace from zelos renderer

* fix: Move debugger functionality out of Blockly.blockRendering to avoid dependency cycle when re-exporting submodules

* chore: Remove declareLegacyNamespace from Blockly.blockRendering.*
2021-09-24 08:33:35 -07:00
Himanshu
3629ed5f65 refactor: Rename Blockly.connectionTypes to Blockly.ConnectionType (#5407)
* Renamed Blockly.connectionTypes to Blockly.ConnectionType
* Renamed core/connection_types.js to connection_type.js
* Add entry to renamings.js for renaming of Blockly.connectionTypes

Co-authored-by: Christopher Allen <cpcallen+git@google.com>
2021-09-24 12:45:10 +01:00
kozbial
de330c8874 chore: Remove declareLegacyNamespace() from theme files 2021-09-23 15:32:28 -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
Aaron Dodson
9f09d50df4 Merge pull request #5522 from gonfunko/field_namespace
chore: Remove declareLegacyNamespace() from field_* files
2021-09-23 14:34:09 -07:00
Aaron Dodson
ede7e8c18d chore: Remove declareLegacyNamespace() from field_* files 2021-09-23 14:29:56 -07:00
kozbial
d7d74f4fba Remove usage of deprecated method in onKeyDown handler 2021-09-23 12:31:55 -07:00
kozbial
8bd2e8c9e2 chore: Remove declareLegacyNamespace() from toolbox/ files 2021-09-23 11:23:02 -07:00
Neil Fraser
fd917f42b8 Migrate core/field_angle.js to to goog.module syntax (#5521)
Move angle picker field to goog module and ES6.
2021-09-23 09:37:23 -07:00
Aaron Dodson
e1310b6464 fix: JSDoc generation for modules without classes 2021-09-22 14:37:55 -07:00
kozbial
61a0773427 Merge branch 'goog_module' into merge-develop-to-goog_module 2021-09-22 13:27:33 -07:00
alschmiedt
73580b0ddb chore: named exports for keyboard_nav* files (#5517) 2021-09-22 11:25:38 -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
b956fa758f Remove duplicate declaration 2021-09-22 10:09:27 -07:00
kozbial
900dfc7c68 Remove references to fully qualified namespace 2021-09-22 09:37:47 -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
alschmiedt
cf091351d8 chore: remove deprecateLegacyNamespace from keyboard nav files
* chore: Remove deprecateLegacyNamespace & fix tests

* chore: export from the blockly file
2021-09-21 17:18:34 -07:00
kozbial
6fc90213a6 Merge branch 'develop' into merge-develop-to-goog_module 2021-09-21 16:04:33 -07:00
Aaron Dodson
556a2422e2 Merge pull request #5511 from gonfunko/legacyNamespace
chore: Remove declareLegacyNamespace from block-related files
2021-09-21 13:50:23 -07:00
Rachel Fenichel
d83eb1364b fix: enable missingRequire in build_tasks (#5510) 2021-09-21 13:19:55 -07:00
Aaron Dodson
d6c9423bdf Remove declareLegacyNamespace from block-related files. 2021-09-21 13:18:07 -07:00
Rachel Fenichel
953e3b67b1 chore: remove deprecated functions (#5509) 2021-09-21 13:10:33 -07:00
kozbial
7454d2f2c9 Fix jsdoc in core/serialization/variables.js 2021-09-21 09:55:38 -07:00
kozbial
bbf26e5e6b Fix jsdoc in core/utils/useragent.js 2021-09-21 09:55:38 -07:00
Christopher Allen
e7955084ae refactor: Remove remaining references to Blockly.* from goog.modules (#5505) 2021-09-21 17:51:35 +01:00
Aaron Dodson
66e6b6218a Make several exported private fields/methods TEST_ONLY (#5479) 2021-09-21 08:13:38 -07:00
Beka Westberg
7451644055 fix: remove eslit disables 2021-09-20 13:08:35 -07:00
Beka Westberg
e954193009 fix: project cereal cleanup (#5398)
* fix: make exception constructors package

* fix: rename blocks.load to blocks.append

* fix: inline docs

* fix: consistency in block serialization

* fix: remove unexported functions

* fix: interface requires

* fix: tag TODO with issue number
2021-09-20 13:08:35 -07:00
Beka Westberg
0e0c5fea0e fix: dragging variables from flyout (#5434)
* fix: dragging variables from flyout

* fix: rename positionBlock_ to positionNewBlock_

* fix: type

* fix: try alternative method for handling variables in flyout
2021-09-20 13:08:35 -07:00
Beka Westberg
84514efb09 fix: create and delete events, and the trashcan (#5425)
* fix: create and delete events with JSON serialization

* fix: trashcan with JSON serialization

* fix: build

* fix: tests

* fix: PR comments

* fix: types

* fix: tests
2021-09-20 13:08:35 -07:00
Beka Westberg
17f9f4f689 fix: loading blocks in RTL 2021-09-20 13:08:35 -07:00
Beka Westberg
a4d84e57f8 fix: dragging blocks from the flyout that only have XML hooks (#5422)
* fix: positioning of flyout blocks

* fix: move flyout to JSON system

* cleanup: remove test code from playground
2021-09-20 13:08:35 -07:00
Beka Westberg
e7541cb315 fix: copy paste with json system (#5423)
* fix: copy paste w/ json system

* fix: pr comments
2021-09-20 13:08:35 -07:00
Beka Westberg
96935c2502 fix: cereal backwards compatibility (#5421)
* fix: remove duplicate serialization hook implementations

* feat: add backwards compatibility to field serialization

* feat: add support for serializing old mutator hooks

* fix: build

* fix: refactor field changes into helpers

* fix: typo

* fix: removing xmlns

* tests: add tests for serialization and deserialization of mutator hooks

* fix: switch to early returns
2021-09-20 13:08:35 -07:00
Beka Westberg
448c433abe fix: serializing edited shadows (#5424)
* fix: serializing shadows

* tests: add tests for serializing editted shadows
2021-09-20 13:08:35 -07:00
Beka Westberg
410365f4a1 feat: add support for defining toolboxes using pure json (#5392)
* feat: add recycling to core

* feat: add support for json block definitions in flyout

* tests: reorganize tests

* tests: add tests for generating contents

* Fixup reycling

* tests: add tests for recycling

* fix: types

* fix: lint

* fix: PR comments

* fix: creating blocks from flyout

* test: add test block to playground

* fix: types

* feat: add support for enabled
2021-09-20 13:08:35 -07:00
Beka Westberg
6d87b85e6c fix: not being able to specifying variable names in toolbox (#5408)
* fix: not being able to specifying variable names in toolbox

* fix: id -> ID
2021-09-20 13:08:35 -07:00
Beka Westberg
4f890d73a5 fix: redo disconnect from shadow bug 2021-09-20 13:08:35 -07:00
Beka Westberg
fd12dcf1e7 feat: add throwing errors for bad shadows (#5330)
* fix: add throwing errors for bad shadows

* tests: add tests for setShadowDom
2021-09-20 13:08:35 -07:00
Beka Westberg
9aecac3339 fix: remove some attributes from the JSO system (#5356)
* fix: remove some attributes from the JSO system

Remove the deletable, movable, and editable attributes.
Normally this would be a breaking change, but because this isn't
released yet it's just a patch.

* fixup: serializer tests
2021-09-20 13:08:35 -07:00
Beka Westberg
07057d087c feat: adds hooks for serializing plugins (#5276)
* Reformat registry tests

* Add tests for plugin hooks

* Add plugin hooks for serialization

* Switch PluginSerializer to IPluginSerializer

* fix: types

* fix: PR comments

* fix: tests

* cleanup: formatting

* fix: types

* feat: add respecting case in registry

* feat: add separate registry for serializers

* fix: rename serialiation registry alias

* fix: move serializer interface into interface dir
2021-09-20 13:08:35 -07:00
Beka Westberg
486123e4ff fix: insertion markers and change events to work with JSO hooks (#5378)
* fix: add tests for fixing change events

* fix: change events and insertion markers

* fix: build:

* fix: remove duplicate code

* fix: requires
2021-09-20 13:08:35 -07:00
Beka Westberg
1d4cbd1ab6 Add serializing shadows as JSOs for the JSO system (#5246)
* Move existing tests into new suite

* Add tests for setShadowState

* Add assertions for serialization

* Unskip serialization tests

* Add logic to handle shadows in both systems

* Uncomment tests

* fix: add access modifiers to new comment funcs

* fix: fixup types

* fix: remove addNextBlocks = true

* feat: add real child of shadow errors

* fix: types
2021-09-20 13:08:35 -07:00