Files
blockly/tests/compile/test_blocks.js
Christopher Allen 5078dcbc6d refactor(blocks)!: Rename Blockly.blocks.* modules to Blockly.libraryBlocks.* (#5953)
...and rename Blockly.blocks.all (blocks/all.js) to
Blockly.libraryBlocks (blocks/blocks.js

BREAKING CHANGE: (only) because the exports object from the
`blocks_compressed.js` chunk will be accessed as
`Blockly.libraryBlocks` instead of `Blockly.blocks.all` when the
chunk is loaded in a browser via a `<script>` tag.  There will
be no changes visible when the chunk is loaded via ES module
`import` or CJS `require`.
2022-02-23 21:25:52 +00:00

49 lines
988 B
JavaScript

/**
* @license
* Copyright 2021 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @fileoverview Test blocks for advanced compilation.
*/
'use strict';
goog.provide('Blockly.libraryBlocks.testBlocks');
goog.require('Blockly');
Blockly.defineBlocksWithJsonArray([
{
'type': 'test_style_hex1',
'message0': 'Block color: Bright purple %1 %2 %3 %4',
'args0': [
{
'type': 'field_input',
'name': 'TEXT',
'text': '#992aff',
},
{
'type': 'field_dropdown',
'name': 'DROPDOWN',
'options': [
['option', 'ONE'],
['option', 'TWO'],
],
},
{
'type': 'field_checkbox',
'name': 'NAME',
'checked': true,
},
{
'type': 'input_value',
'name': 'NAME',
},
],
'previousStatement': null,
'nextStatement': null,
'colour': '#992aff',
}
]);