Skip to content

Commit d5eef63

Browse files
committed
Fix workflow expression editor popup not showing
1 parent a036786 commit d5eef63

6 files changed

Lines changed: 21 additions & 82 deletions

File tree

client/web/workflow/src/components/Configurator/Delay.vue

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@
2121
label-class="text-primary"
2222
class="mb-0"
2323
>
24-
<c-ace-editor
24+
<expression-editor
2525
v-model="item.config.arguments[0].expr"
2626
lang="javascript"
2727
font-size="18px"
2828
show-line-numbers
29-
auto-complete
30-
:show-popout="false"
31-
:auto-complete-suggestions="expressionAutoCompleteValues"
3229
@input="valueChanged"
3330
/>
3431
</b-form-group>
@@ -39,24 +36,15 @@
3936

4037
<script>
4138
import base from './base'
42-
import { components } from '@cortezaproject/corteza-vue'
43-
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
44-
45-
const { CAceEditor } = components
39+
import ExpressionEditor from '../ExpressionEditor'
4640
4741
export default {
4842
components: {
49-
CAceEditor,
43+
ExpressionEditor,
5044
},
5145
5246
extends: base,
5347
54-
data () {
55-
return {
56-
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
57-
}
58-
},
59-
6048
watch: {
6149
'item.config.stepID': {
6250
immediate: true,

client/web/workflow/src/components/Configurator/Error.vue

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@
2020
label-class="text-primary"
2121
class="mb-0"
2222
>
23-
<c-ace-editor
23+
<expression-editor
2424
v-model="item.config.arguments[0].expr"
2525
lang="javascript"
2626
font-size="18px"
2727
show-line-numbers
28-
auto-complete
29-
:show-popout="false"
30-
:auto-complete-suggestions="expressionAutoCompleteValues"
3128
@open="openInEditor"
3229
@input="valueChanged"
3330
/>
@@ -47,31 +44,26 @@
4744
@ok="saveExpression"
4845
@hidden="resetExpression"
4946
>
50-
<c-ace-editor
47+
<expression-editor
5148
v-model="expressionEditor.currentExpression"
5249
lang="javascript"
5350
height="500"
5451
font-size="18px"
55-
auto-complete
5652
show-line-numbers
5753
:border="false"
5854
:show-popout="false"
59-
:auto-complete-suggestions="expressionAutoCompleteValues"
6055
/>
6156
</b-modal>
6257
</b-card>
6358
</template>
6459

6560
<script>
6661
import base from './base'
67-
import { components } from '@cortezaproject/corteza-vue'
68-
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
69-
70-
const { CAceEditor } = components
62+
import ExpressionEditor from '../ExpressionEditor.vue'
7163
7264
export default {
7365
components: {
74-
CAceEditor,
66+
ExpressionEditor,
7567
},
7668
7769
extends: base,
@@ -81,7 +73,6 @@ export default {
8173
expressionEditor: {
8274
currentExpression: undefined,
8375
},
84-
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
8576
}
8677
},
8778

client/web/workflow/src/components/Configurator/Expressions.vue

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,14 @@
6262
@ok="saveExpression"
6363
@hidden="resetExpression"
6464
>
65-
<c-ace-editor
65+
<expression-editor
6666
v-model="currentExpressionValue"
6767
height="500"
6868
lang="javascript"
6969
font-size="18px"
7070
show-line-numbers
71-
auto-complete
7271
:border="false"
7372
:show-popout="false"
74-
:auto-complete-suggestions="expressionAutoCompleteValues"
7573
/>
7674
</b-modal>
7775
</div>
@@ -80,14 +78,11 @@
8078
<script>
8179
import base from './base'
8280
import ExpressionTable from '../ExpressionTable.vue'
83-
import { components } from '@cortezaproject/corteza-vue'
84-
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
85-
86-
const { CAceEditor } = components
81+
import ExpressionEditor from '../ExpressionEditor.vue'
8782
8883
export default {
8984
components: {
90-
CAceEditor,
85+
ExpressionEditor,
9186
ExpressionTable,
9287
},
9388
@@ -101,8 +96,6 @@ export default {
10196
currentIndex: undefined,
10297
currentExpression: undefined,
10398
},
104-
105-
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
10699
}
107100
},
108101

client/web/workflow/src/components/Configurator/Function.vue

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -157,23 +157,19 @@
157157
{{ a.target }}
158158
</b-form-checkbox>
159159

160-
<c-ace-editor
160+
<expression-editor
161161
v-else
162162
v-model="a.value"
163-
auto-complete
164-
:auto-complete-suggestions="expressionAutoCompleteValues"
165163
@open="openInEditor(index)"
166164
@input="$root.$emit('change-detected')"
167165
/>
168166
</div>
169167

170-
<c-ace-editor
168+
<expression-editor
171169
v-else-if="a.valueType === 'expr'"
172170
v-model="a.expr"
173171
lang="javascript"
174172
show-line-numbers
175-
auto-complete
176-
:auto-complete-suggestions="expressionAutoCompleteValues"
177173
@open="openInEditor(index)"
178174
@input="$root.$emit('change-detected')"
179175
/>
@@ -309,16 +305,14 @@
309305
@ok="saveExpression"
310306
@hidden="resetExpression"
311307
>
312-
<c-ace-editor
308+
<expression-editor
313309
v-model="currentExpressionValue"
314310
:lang="expressionEditor.lang"
315311
height="500"
316312
font-size="18px"
317313
show-line-numbers
318-
auto-complete
319314
:border="false"
320315
:show-popout="false"
321-
:auto-complete-suggestions="expressionAutoCompleteValues"
322316
/>
323317
</b-modal>
324318
</div>
@@ -327,15 +321,12 @@
327321
<script>
328322
import base from './base'
329323
import ExpressionTable from '../ExpressionTable.vue'
324+
import ExpressionEditor from '../ExpressionEditor.vue'
330325
import { objectSearchMaker, stringSearchMaker } from '../../lib/filter'
331-
import { components } from '@cortezaproject/corteza-vue'
332-
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
333-
334-
const { CAceEditor } = components
335326
336327
export default {
337328
components: {
338-
CAceEditor,
329+
ExpressionEditor,
339330
ExpressionTable,
340331
},
341332
@@ -363,8 +354,6 @@ export default {
363354
currentExpression: undefined,
364355
lang: 'javascript',
365356
},
366-
367-
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
368357
}
369358
},
370359

client/web/workflow/src/components/Configurator/Gateway.vue

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,12 @@
3333
:label="edge.value"
3434
label-class="text-primary"
3535
>
36-
<c-ace-editor
36+
<expression-editor
3737
v-model="edge.expr"
3838
lang="javascript"
3939
height="100"
4040
show-line-numbers
41-
auto-complete
4241
:show-popout="false"
43-
:auto-complete-suggestions="expressionAutoCompleteValues"
4442
@input="updateEdge(edge.id, $event)"
4543
/>
4644
</b-form-group>
@@ -52,24 +50,15 @@
5250

5351
<script>
5452
import base from './base'
55-
import { components } from '@cortezaproject/corteza-vue'
56-
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../../lib/editor-auto-complete.js'
57-
58-
const { CAceEditor } = components
53+
import ExpressionEditor from '../ExpressionEditor.vue'
5954
6055
export default {
6156
components: {
62-
CAceEditor,
57+
ExpressionEditor,
6358
},
6459
6560
extends: base,
6661
67-
data () {
68-
return {
69-
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
70-
}
71-
},
72-
7362
computed: {
7463
gatewayKind () {
7564
return this.item.config.ref

client/web/workflow/src/components/ExpressionTable.vue

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,10 @@
9797
<b-form-group
9898
class="mb-0"
9999
>
100-
<c-ace-editor
100+
<expression-editor
101101
v-model="item[valueField]"
102102
lang="javascript"
103103
show-line-numbers
104-
auto-complete
105-
:auto-complete-suggestions="expressionAutoCompleteValues"
106104
@open="$emit('open-editor', index)"
107105
@input="$root.$emit('change-detected')"
108106
/>
@@ -116,16 +114,13 @@
116114
</template>
117115

118116
<script>
119-
import { EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES } from '../lib/editor-auto-complete.js'
120-
import { components } from '@cortezaproject/corteza-vue'
117+
import ExpressionEditor from './ExpressionEditor.vue'
121118
import { objectSearchMaker } from '../lib/filter'
122119
import draggable from 'vuedraggable'
123120
124-
const { CAceEditor } = components
125-
126121
export default {
127122
components: {
128-
CAceEditor,
123+
ExpressionEditor,
129124
draggable,
130125
},
131126
@@ -151,12 +146,6 @@ export default {
151146
},
152147
},
153148
154-
data () {
155-
return {
156-
expressionAutoCompleteValues: EXPRESSION_EDITOR_AUTO_COMPLETE_VALUES,
157-
}
158-
},
159-
160149
methods: {
161150
varFilter: objectSearchMaker('text'),
162151

0 commit comments

Comments
 (0)