Skip to content

Commit

Permalink
Fix workflow expression editor popup not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
Fajfa committed Oct 8, 2024
1 parent 86347a0 commit a48155e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 82 deletions.
18 changes: 3 additions & 15 deletions client/web/workflow/src/components/Configurator/Delay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@
label-class="text-primary"
class="mb-0"
>
<c-ace-editor
<expression-editor
v-model="item.config.arguments[0].expr"
lang="javascript"
font-size="18px"
show-line-numbers
auto-complete
:show-popout="false"
:auto-complete-suggestions="expressionAutoCompleteValues"
@input="valueChanged"
/>
</b-form-group>
Expand All @@ -39,24 +36,15 @@

<script>
import base from './base'
import { components } from '@cortezaproject/corteza-vue'
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
const { CAceEditor } = components
import ExpressionEditor from '../ExpressionEditor'
export default {
components: {
CAceEditor,
ExpressionEditor,
},
extends: base,
data () {
return {
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
}
},
watch: {
'item.config.stepID': {
immediate: true,
Expand Down
17 changes: 4 additions & 13 deletions client/web/workflow/src/components/Configurator/Error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
label-class="text-primary"
class="mb-0"
>
<c-ace-editor
<expression-editor
v-model="item.config.arguments[0].expr"
lang="javascript"
font-size="18px"
show-line-numbers
auto-complete
:show-popout="false"
:auto-complete-suggestions="expressionAutoCompleteValues"
@open="openInEditor"
@input="valueChanged"
/>
Expand All @@ -47,31 +44,26 @@
@ok="saveExpression"
@hidden="resetExpression"
>
<c-ace-editor
<expression-editor
v-model="expressionEditor.currentExpression"
lang="javascript"
height="500"
font-size="18px"
auto-complete
show-line-numbers
:border="false"
:show-popout="false"
:auto-complete-suggestions="expressionAutoCompleteValues"
/>
</b-modal>
</b-card>
</template>

<script>
import base from './base'
import { components } from '@cortezaproject/corteza-vue'
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
const { CAceEditor } = components
import ExpressionEditor from '../ExpressionEditor.vue'
export default {
components: {
CAceEditor,
ExpressionEditor,
},
extends: base,
Expand All @@ -81,7 +73,6 @@ export default {
expressionEditor: {
currentExpression: undefined,
},
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
}
},
Expand Down
13 changes: 3 additions & 10 deletions client/web/workflow/src/components/Configurator/Expressions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,14 @@
@ok="saveExpression"
@hidden="resetExpression"
>
<c-ace-editor
<expression-editor
v-model="currentExpressionValue"
height="500"
lang="javascript"
font-size="18px"
show-line-numbers
auto-complete
:border="false"
:show-popout="false"
:auto-complete-suggestions="expressionAutoCompleteValues"
/>
</b-modal>
</div>
Expand All @@ -80,14 +78,11 @@
<script>
import base from './base'
import ExpressionTable from '../ExpressionTable.vue'
import { components } from '@cortezaproject/corteza-vue'
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
const { CAceEditor } = components
import ExpressionEditor from '../ExpressionEditor.vue'
export default {
components: {
CAceEditor,
ExpressionEditor,
ExpressionTable,
},
Expand All @@ -101,8 +96,6 @@ export default {
currentIndex: undefined,
currentExpression: undefined,
},
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
}
},
Expand Down
21 changes: 5 additions & 16 deletions client/web/workflow/src/components/Configurator/Function.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,23 +157,19 @@
{{ a.target }}
</b-form-checkbox>

<c-ace-editor
<expression-editor
v-else
v-model="a.value"
auto-complete
:auto-complete-suggestions="expressionAutoCompleteValues"
@open="openInEditor(index)"
@input="$root.$emit('change-detected')"
/>
</div>

<c-ace-editor
<expression-editor
v-else-if="a.valueType === 'expr'"
v-model="a.expr"
lang="javascript"
show-line-numbers
auto-complete
:auto-complete-suggestions="expressionAutoCompleteValues"
@open="openInEditor(index)"
@input="$root.$emit('change-detected')"
/>
Expand Down Expand Up @@ -309,16 +305,14 @@
@ok="saveExpression"
@hidden="resetExpression"
>
<c-ace-editor
<expression-editor
v-model="currentExpressionValue"
:lang="expressionEditor.lang"
height="500"
font-size="18px"
show-line-numbers
auto-complete
:border="false"
:show-popout="false"
:auto-complete-suggestions="expressionAutoCompleteValues"
/>
</b-modal>
</div>
Expand All @@ -327,15 +321,12 @@
<script>
import base from './base'
import ExpressionTable from '../ExpressionTable.vue'
import ExpressionEditor from '../ExpressionEditor.vue'
import { objectSearchMaker, stringSearchMaker } from '../../lib/filter'
import { components } from '@cortezaproject/corteza-vue'
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
const { CAceEditor } = components
export default {
components: {
CAceEditor,
ExpressionEditor,
ExpressionTable,
},
Expand Down Expand Up @@ -363,8 +354,6 @@ export default {
currentExpression: undefined,
lang: 'javascript',
},
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
}
},
Expand Down
17 changes: 3 additions & 14 deletions client/web/workflow/src/components/Configurator/Gateway.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@
:label="edge.value"
label-class="text-primary"
>
<c-ace-editor
<expression-editor
v-model="edge.expr"
lang="javascript"
height="100"
show-line-numbers
auto-complete
:show-popout="false"
:auto-complete-suggestions="expressionAutoCompleteValues"
@input="updateEdge(edge.id, $event)"
/>
</b-form-group>
Expand All @@ -52,24 +50,15 @@

<script>
import base from './base'
import { components } from '@cortezaproject/corteza-vue'
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
const { CAceEditor } = components
import ExpressionEditor from '../ExpressionEditor.vue'
export default {
components: {
CAceEditor,
ExpressionEditor,
},
extends: base,
data () {
return {
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
}
},
computed: {
gatewayKind () {
return this.item.config.ref
Expand Down
17 changes: 3 additions & 14 deletions client/web/workflow/src/components/ExpressionTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,10 @@
<b-form-group
class="mb-0"
>
<c-ace-editor
<expression-editor
v-model="item[valueField]"
lang="javascript"
show-line-numbers
auto-complete
:auto-complete-suggestions="expressionAutoCompleteValues"
@open="$emit('open-editor', index)"
@input="$root.$emit('change-detected')"
/>
Expand All @@ -116,16 +114,13 @@
</template>

<script>
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../lib/editor-auto-complete.js'
import { components } from '@cortezaproject/corteza-vue'
import ExpressionEditor from './ExpressionEditor.vue'
import { objectSearchMaker } from '../lib/filter'
import draggable from 'vuedraggable'
const { CAceEditor } = components
export default {
components: {
CAceEditor,
ExpressionEditor,
draggable,
},
Expand All @@ -151,12 +146,6 @@ export default {
},
},
data () {
return {
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
}
},
methods: {
varFilter: objectSearchMaker('text'),
Expand Down

0 comments on commit a48155e

Please sign in to comment.