remove matcher_boolean_operation (not used)
This commit is contained in:
parent
37600d82f1
commit
702749303b
2 changed files with 0 additions and 61 deletions
|
|
@ -1,60 +0,0 @@
|
|||
export default {
|
||||
type: 'matcher_boolean_operation',
|
||||
bytecodeKey: "matcherBooleanOperation",
|
||||
name: "Compare Matcher",
|
||||
colour: 60,
|
||||
inputsInline: true,
|
||||
description: "Perform a logic operation between the triggering Feed value and a block diagram.",
|
||||
|
||||
connections: { mode: 'value', output: 'matcher' },
|
||||
|
||||
template: `is true %OP %B`,
|
||||
|
||||
fields: {
|
||||
OP: {
|
||||
options: [
|
||||
['and', 'AND'],
|
||||
['or', 'OR'],
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
inputs: {
|
||||
B: {
|
||||
check: "expression",
|
||||
shadow: 'io_logic_boolean'
|
||||
}
|
||||
},
|
||||
|
||||
generators: {
|
||||
json: (block, generator) => {
|
||||
const
|
||||
operator = block.getFieldValue('OP'),
|
||||
rightExp = generator.valueToCode(block, 'B', 0) || null,
|
||||
|
||||
blockPayload = JSON.stringify({
|
||||
matcherBooleanOperation: {
|
||||
comparator: operator?.toLowerCase() || null,
|
||||
right: JSON.parse(rightExp),
|
||||
},
|
||||
})
|
||||
|
||||
return [ blockPayload, 0 ]
|
||||
}
|
||||
},
|
||||
|
||||
regenerators: {
|
||||
json: (blockObject, helpers) => {
|
||||
const
|
||||
{ comparator, right } = blockObject.matcherBooleanOperation,
|
||||
fields = {
|
||||
OP: comparator?.toUpperCase()
|
||||
},
|
||||
inputs = {
|
||||
B: helpers.expressionToBlock(right, { shadow: 'io_logic_boolean' }),
|
||||
}
|
||||
|
||||
return { type: 'matcher_boolean_operation', fields, inputs }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,6 @@ const BYTECODE_BLOCK_TYPE_MAP = {
|
|||
whenDataMatchStateChanged: 'when_data_matching_state',
|
||||
matcherCompare: 'matcher_compare',
|
||||
matcherTextCompare: 'matcher_text_compare',
|
||||
matcherBooleanOperation: 'matcher_boolean_operation',
|
||||
logAction: 'action_log',
|
||||
conditional: 'io_controls_if',
|
||||
compare: 'io_logic_compare',
|
||||
|
|
|
|||
Loading…
Reference in a new issue