blockly-fluid 1.3.16 → 1.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -1
- package/package.json +1 -1
- package/utils/dedent.js +2 -0
package/index.js
CHANGED
|
@@ -156,7 +156,14 @@ module.exports = (Blockly, { generator: languageGeneratorFallback, generators: l
|
|
|
156
156
|
if (typeof field.options === "function") (field.options = field.options());
|
|
157
157
|
|
|
158
158
|
dummy.appendField(new Blockly.FieldDropdown(...[
|
|
159
|
-
((Array.isArray(field.options)) ? field.options.map((option) => [option, option]) : Object.entries(field.options)).map(([name, text]) =>
|
|
159
|
+
((Array.isArray(field.options)) ? field.options.map((option) => [option, option]) : Object.entries(field.options)).map(([name, text]) => (
|
|
160
|
+
((typeof name === "symbol") && (name.description.toLowerCase() === "separator"))
|
|
161
|
+
? "separator"
|
|
162
|
+
: [
|
|
163
|
+
translate((typeof text === "function") ? text() : text),
|
|
164
|
+
(typeof name === "function") ? name() : name
|
|
165
|
+
]
|
|
166
|
+
)),
|
|
160
167
|
...(field.validator) ? [field.validator] : []
|
|
161
168
|
]), token);
|
|
162
169
|
|
package/package.json
CHANGED