@windward/core 0.16.0 → 0.18.0

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/components/Content/Blocks/Accordion.vue +49 -39
  3. package/components/Content/Blocks/BlockQuote.vue +10 -1
  4. package/components/Content/Blocks/ClickableIcons.vue +55 -39
  5. package/components/Content/Blocks/Email.vue +11 -2
  6. package/components/Content/Blocks/FileDownload.vue +9 -1
  7. package/components/Content/Blocks/OpenResponse.vue +25 -12
  8. package/components/Content/Blocks/ScenarioChoice.vue +14 -5
  9. package/components/Content/Blocks/Tab.vue +15 -2
  10. package/components/Content/Blocks/UserUpload.vue +10 -1
  11. package/components/Content/Blocks/Video.vue +13 -4
  12. package/components/Navigation/Items/UserUploadNav.vue +4 -0
  13. package/components/Settings/AccordionSettings.vue +16 -30
  14. package/components/Settings/BlockQuoteSettings.vue +35 -48
  15. package/components/Settings/ClickableIconsSettings.vue +14 -27
  16. package/components/Settings/EmailSettings.vue +18 -28
  17. package/components/Settings/FileDownloadSettings.vue +14 -21
  18. package/components/Settings/OpenResponseSettings.vue +13 -27
  19. package/components/Settings/ScenarioChoiceSettings.vue +19 -29
  20. package/components/Settings/TabSettings.vue +22 -30
  21. package/components/Settings/TextEditorSettings.vue +1 -0
  22. package/components/Settings/UserUploadSettings.vue +12 -22
  23. package/components/Settings/VideoSettings.vue +12 -19
  24. package/components/utils/ContentViewer.vue +3 -0
  25. package/components/utils/FillInBlank/FillInBlankInput.vue +32 -28
  26. package/components/{Content/Blocks → utils}/GenerateAIQuestionButton.vue +117 -25
  27. package/components/utils/TinyMCEWrapper.vue +14 -57
  28. package/helpers/tinymce/WindwardPlugins.ts +36 -3
  29. package/models/Activity.ts +9 -0
  30. package/package.json +1 -1
  31. package/test/__mocks__/componentsMock.js +1 -0
  32. package/utils/index.js +1 -1
@@ -2,29 +2,10 @@
2
2
  <div>
3
3
  <v-container class="pa-0">
4
4
  <v-row class="pl-3 pr-3">
5
- <v-text-field
6
- id="block-settings-title"
7
- v-model="block.metadata.config.title"
8
- :autofocus="true"
9
- :rules="$Validation.getRule('block.title')"
10
- :counter="$Validation.getLimit('block.title')"
11
- outlined
12
- :label="
13
- $t(
14
- 'windward.core.components.settings.clickable_icon.title'
15
- )
16
- "
5
+ <BaseContentBlockSettings
6
+ v-model="block.metadata.config"
17
7
  :disabled="render"
18
- ></v-text-field>
19
- <v-textarea
20
- id="block-settings-instructions"
21
- v-model="block.metadata.config.instructions"
22
- :rules="$Validation.getRule('block.instructions')"
23
- :counter="$Validation.getLimit('block.instructions')"
24
- outlined
25
- :label="$t('components.content.settings.base.instructions')"
26
- :disabled="render"
27
- ></v-textarea>
8
+ ></BaseContentBlockSettings>
28
9
  </v-row>
29
10
  <v-divider class="my-4 primary"></v-divider>
30
11
  <p>
@@ -153,10 +134,11 @@
153
134
  import _ from 'lodash'
154
135
  import Crypto from '~/helpers/Crypto'
155
136
  import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
156
- import TextEditor from '~/components/Text/TextEditor'
157
137
  import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
158
138
  import Uuid from '~/helpers/Uuid'
159
139
  import ImageAssetSettings from '~/components/Content/Settings/ImageAssetSettings.vue'
140
+ import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
141
+ import TextEditor from '~/components/Text/TextEditor'
160
142
 
161
143
  export default {
162
144
  name: 'AccordionSettings',
@@ -164,8 +146,15 @@ export default {
164
146
  TextEditor,
165
147
  SortableExpansionPanel,
166
148
  ImageAssetSettings,
149
+ BaseContentBlockSettings,
167
150
  },
168
151
  extends: BaseContentSettings,
152
+ data() {
153
+ return {
154
+ expansionPanelKey: '0',
155
+ loading: false,
156
+ }
157
+ },
169
158
  beforeMount() {
170
159
  if (_.isEmpty(this.block)) {
171
160
  this.block = {}
@@ -179,6 +168,9 @@ export default {
179
168
  if (_.isEmpty(this.block.metadata.config.title)) {
180
169
  this.block.metadata.config.title = ''
181
170
  }
171
+ if (!_.isBoolean(this.block.metadata.config.display_title)) {
172
+ this.$set(this.block.metadata.config, 'display_title', true)
173
+ }
182
174
  if (
183
175
  _.isEmpty(this.block.metadata.config.instructions) &&
184
176
  this.block.id &&
@@ -212,12 +204,6 @@ export default {
212
204
  'windward.core.shared.content_blocks.title.accordion'
213
205
  )
214
206
  },
215
- data() {
216
- return {
217
- expansionPanelKey: '0',
218
- loading: false,
219
- }
220
- },
221
207
  beforeDestroy() {
222
208
  if (this.debouncer) {
223
209
  clearTimeout(this.debouncer)
@@ -251,7 +237,7 @@ export default {
251
237
  },
252
238
  onUpdatePanel($event) {
253
239
  if ($event !== this.block.metadata.config.selectedPanels) {
254
- //catch click event to open selected panel to edit
240
+ // catch click event to open selected panel to edit
255
241
  this.block.metadata.config.selectedPanels = $event
256
242
  } else {
257
243
  // if user clicks same panel again expansion panel closes
@@ -1,27 +1,10 @@
1
1
  <template>
2
2
  <div>
3
3
  <v-container class="pa-0">
4
- <v-text-field
5
- id="block-settings-title"
6
- ref="title"
7
- v-model="block.metadata.config.title"
8
- :autofocus="true"
9
- outlined
10
- :counter="$Validation.getLimit('block.title')"
11
- :rules="$Validation.getRule('block.title')"
12
- :label="$t('components.content.settings.base.title')"
13
- :disabled="render"
14
- ></v-text-field>
15
- <v-textarea
16
- id="block-settings-instructions"
17
- v-model="block.metadata.config.instructions"
18
- outlined
19
- auto-grow
20
- :rules="$Validation.getRule('block.instructions')"
21
- :counter="$Validation.getLimit('block.instructions')"
22
- :label="$t('components.content.settings.base.instructions')"
4
+ <BaseContentBlockSettings
5
+ v-model="block.metadata.config"
23
6
  :disabled="render"
24
- ></v-textarea>
7
+ ></BaseContentBlockSettings>
25
8
  </v-container>
26
9
  <v-divider class="my-4 primary"></v-divider>
27
10
  <v-container class="pa-0">
@@ -121,13 +104,41 @@
121
104
  </template>
122
105
  <script>
123
106
  import _ from 'lodash'
107
+ import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
124
108
  import TextEditor from '~/components/Text/TextEditor.vue'
125
109
  import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
126
110
 
127
111
  export default {
128
112
  name: 'BlockQuoteSettings',
113
+ components: { TextEditor, BaseContentBlockSettings },
129
114
  extends: BaseContentSettings,
130
- components: { TextEditor },
115
+ data() {
116
+ return {
117
+ valid: true,
118
+ loading: false,
119
+ sourceTypes: [
120
+ {
121
+ text: this.$t(
122
+ 'windward.core.components.settings.block_quote.source_types.none'
123
+ ),
124
+ value: '',
125
+ },
126
+
127
+ {
128
+ text: this.$t(
129
+ 'windward.core.components.settings.block_quote.source_types.book'
130
+ ),
131
+ value: 'book',
132
+ },
133
+ {
134
+ text: this.$t(
135
+ 'windward.core.components.settings.block_quote.source_types.online_journal'
136
+ ),
137
+ value: 'online_journal',
138
+ },
139
+ ],
140
+ }
141
+ },
131
142
  beforeMount() {
132
143
  if (_.isEmpty(this.block)) {
133
144
  this.block = {}
@@ -141,6 +152,9 @@ export default {
141
152
  if (_.isEmpty(this.block.metadata.config.title)) {
142
153
  this.block.metadata.config.title = ''
143
154
  }
155
+ if (!_.isBoolean(this.block.metadata.config.display_title)) {
156
+ this.$set(this.block.metadata.config, 'display_title', true)
157
+ }
144
158
  if (_.isEmpty(this.block.metadata.config.instructions)) {
145
159
  this.block.metadata.config.instructions = ''
146
160
  }
@@ -159,33 +173,6 @@ export default {
159
173
  'windward.core.components.content.blocks.block_quote.body'
160
174
  )
161
175
  },
162
- data() {
163
- return {
164
- valid: true,
165
- loading: false,
166
- sourceTypes: [
167
- {
168
- text: this.$t(
169
- 'windward.core.components.settings.block_quote.source_types.none'
170
- ),
171
- value: '',
172
- },
173
-
174
- {
175
- text: this.$t(
176
- 'windward.core.components.settings.block_quote.source_types.book'
177
- ),
178
- value: 'book',
179
- },
180
- {
181
- text: this.$t(
182
- 'windward.core.components.settings.block_quote.source_types.online_journal'
183
- ),
184
- value: 'online_journal',
185
- },
186
- ],
187
- }
188
- },
189
176
  methods: {},
190
177
  }
191
178
  </script>
@@ -1,30 +1,14 @@
1
1
  <template>
2
2
  <div>
3
3
  <v-container class="pa-0">
4
- <v-col class="pa-0">
5
- <v-text-field
6
- id="block-settings-title"
7
- v-model="block.metadata.config.title"
8
- :autofocus="true"
9
- :rules="$Validation.getRule('block.title')"
10
- :counter="$Validation.getLimit('block.title')"
11
- outlined
12
- :label="
13
- $t(
14
- 'windward.core.components.settings.clickable_icon.title'
15
- )
16
- "
4
+ <v-container class="pa-0">
5
+ <BaseContentBlockSettings
6
+ v-model="block.metadata.config"
17
7
  :disabled="render"
18
- ></v-text-field>
19
- <v-textarea
20
- id="block-settings-instructions"
21
- v-model="block.metadata.config.description"
22
- :rules="$Validation.getRule('block.instructions')"
23
- :counter="$Validation.getLimit('block.instructions')"
24
- outlined
25
- :label="$t('components.content.settings.base.instructions')"
26
- :disabled="render"
27
- ></v-textarea>
8
+ ></BaseContentBlockSettings>
9
+ </v-container>
10
+ <v-container class="pa-0">
11
+ <v-divider class="my-4 primary"></v-divider>
28
12
  <v-switch
29
13
  v-model="block.metadata.config.display.show_title"
30
14
  :label="
@@ -79,7 +63,7 @@
79
63
  "
80
64
  :disabled="render"
81
65
  ></v-switch>
82
- </v-col>
66
+ </v-container>
83
67
  <v-col class="pa-0">
84
68
  <SortableExpansionPanel
85
69
  v-model="block.metadata.config.items"
@@ -238,12 +222,12 @@
238
222
  <script>
239
223
  import _ from 'lodash'
240
224
  import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
241
- import TextEditor from '~/components/Text/TextEditor'
242
225
  import TextIconPicker from '~/components/Core/TextIconPicker.vue'
243
226
  import ColorPicker from '~/components/Core/ColorPicker.vue'
244
227
  import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
245
- import ContentBlockAsset from '~/components/Content/ContentBlockAsset.vue'
246
228
  import ImageAssetSettings from '~/components/Content/Settings/ImageAssetSettings.vue'
229
+ import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
230
+ import TextEditor from '~/components/Text/TextEditor'
247
231
 
248
232
  export default {
249
233
  name: 'ClickableIconsSettings',
@@ -252,8 +236,8 @@ export default {
252
236
  TextEditor,
253
237
  TextIconPicker,
254
238
  ColorPicker,
255
- ContentBlockAsset,
256
239
  ImageAssetSettings,
240
+ BaseContentBlockSettings,
257
241
  },
258
242
  extends: BaseContentSettings,
259
243
  data() {
@@ -299,6 +283,9 @@ export default {
299
283
  if (_.isEmpty(this.block.metadata.config.title)) {
300
284
  this.block.metadata.config.title = ''
301
285
  }
286
+ if (!_.isBoolean(this.block.metadata.config.display_title)) {
287
+ this.$set(this.block.metadata.config, 'display_title', true)
288
+ }
302
289
  if (_.isEmpty(this.block.metadata.config.display)) {
303
290
  this.block.metadata.config.display = {
304
291
  show_title: false,
@@ -1,25 +1,10 @@
1
1
  <template>
2
2
  <div>
3
3
  <v-container class="pa-0">
4
- <v-text-field
5
- v-model="block.metadata.config.title"
6
- :autofocus="true"
7
- ref="title"
8
- outlined
9
- :rules="$Validation.getRule('block.title')"
10
- :counter="$Validation.getLimit('block.title')"
11
- :label="$t('components.content.settings.base.title')"
4
+ <BaseContentBlockSettings
5
+ v-model="block.metadata.config"
12
6
  :disabled="render"
13
- ></v-text-field>
14
- <v-textarea
15
- v-model="block.metadata.config.instructions"
16
- outlined
17
- :rules="$Validation.getRule('block.instructions')"
18
- :counter="$Validation.getLimit('block.instructions')"
19
- auto-grow
20
- :label="$t('components.content.settings.base.instructions')"
21
- :disabled="render"
22
- ></v-textarea>
7
+ ></BaseContentBlockSettings>
23
8
  </v-container>
24
9
  <v-divider class="my-4 primary"></v-divider>
25
10
  <v-container class="pa-0">
@@ -160,17 +145,27 @@
160
145
  <script>
161
146
  import _ from 'lodash'
162
147
  import Crypto from '~/helpers/Crypto'
148
+ import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
163
149
  import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
164
- import TextEditor from '~/components/Text/TextEditor'
165
150
  import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
151
+ import TextEditor from '~/components/Text/TextEditor'
166
152
 
167
153
  export default {
168
154
  name: 'EmailSettings',
169
155
  components: {
170
156
  SortableExpansionPanel,
171
157
  TextEditor,
158
+ BaseContentBlockSettings,
172
159
  },
173
160
  extends: BaseContentSettings,
161
+ data() {
162
+ return {
163
+ valid: true,
164
+ loading: false,
165
+ expansionPanelKey: 0,
166
+ editingPanel: 0,
167
+ }
168
+ },
174
169
  beforeMount() {
175
170
  if (_.isEmpty(this.block)) {
176
171
  this.block = {}
@@ -184,6 +179,9 @@ export default {
184
179
  if (_.isEmpty(this.block.metadata.config.title)) {
185
180
  this.block.metadata.config.title = ''
186
181
  }
182
+ if (!_.isBoolean(this.block.metadata.config.display_title)) {
183
+ this.$set(this.block.metadata.config, 'display_title', true)
184
+ }
187
185
  if (_.isEmpty(this.block.metadata.config.instructions)) {
188
186
  this.block.metadata.config.instructions = ''
189
187
  }
@@ -207,14 +205,6 @@ export default {
207
205
  'windward.core.components.content.blocks.email.title'
208
206
  )
209
207
  },
210
- data() {
211
- return {
212
- valid: true,
213
- loading: false,
214
- expansionPanelKey: 0,
215
- editingPanel: 0,
216
- }
217
- },
218
208
  beforeDestroy() {
219
209
  if (this.debouncer) {
220
210
  clearTimeout(this.debouncer)
@@ -226,7 +216,7 @@ export default {
226
216
  methods: {
227
217
  onUpdatePanel($event) {
228
218
  if ($event !== this.block.metadata.config.selectedPanels) {
229
- //catch click event to open selected panel to edit
219
+ // catch click event to open selected panel to edit
230
220
  this.block.metadata.config.selectedPanels = $event
231
221
  } else {
232
222
  // if user clicks same panel again expansion panel closes
@@ -1,24 +1,11 @@
1
1
  <template>
2
2
  <div>
3
- <v-text-field
4
- id="block-settings-title"
5
- v-model="block.metadata.config.title"
6
- outlined
7
- :rules="$Validation.getRule('block.title')"
8
- :counter="$Validation.getLimit('block.title')"
9
- :autofocus="true"
10
- :label="$t('components.content.settings.base.title')"
11
- :disabled="render"
12
- ></v-text-field>
13
- <v-textarea
14
- id="block-settings-instructions"
15
- v-model="block.metadata.config.instructions"
16
- outlined
17
- :rules="$Validation.getRule('block.instructions')"
18
- :counter="$Validation.getLimit('block.instructions')"
19
- :disabled="render"
20
- :label="$t('components.content.settings.base.instructions')"
21
- ></v-textarea>
3
+ <v-container class="pa-0">
4
+ <BaseContentBlockSettings
5
+ v-model="block.metadata.config"
6
+ :disabled="render"
7
+ ></BaseContentBlockSettings>
8
+ </v-container>
22
9
  <v-switch
23
10
  v-model="block.metadata.config.display_detailed"
24
11
  :label="
@@ -91,14 +78,17 @@
91
78
  </template>
92
79
  <script>
93
80
  import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
94
- import TextEditor from '~/components/Text/TextEditor'
95
81
  import _ from 'lodash'
96
82
  import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
83
+ import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
97
84
 
98
85
  export default {
99
86
  name: 'FileDownloadSettings',
87
+ components: {
88
+ SortableExpansionPanel,
89
+ BaseContentBlockSettings,
90
+ },
100
91
  extends: BaseContentSettings,
101
- components: { TextEditor, SortableExpansionPanel },
102
92
  data() {
103
93
  return {}
104
94
  },
@@ -141,6 +131,9 @@ export default {
141
131
  if (_.isEmpty(this.block.metadata.config.title)) {
142
132
  this.block.metadata.config.title = ''
143
133
  }
134
+ if (!_.isBoolean(this.block.metadata.config.display_title)) {
135
+ this.$set(this.block.metadata.config, 'display_title', true)
136
+ }
144
137
  if (_.isEmpty(this.block.metadata.config.instructions)) {
145
138
  this.block.metadata.config.instructions = ''
146
139
  }
@@ -1,27 +1,10 @@
1
1
  <template>
2
2
  <v-container>
3
- <v-row class="pl-3 pr-3">
4
- <v-text-field
5
- id="block-settings-title"
6
- v-model="block.metadata.config.title"
7
- :autofocus="true"
8
- :rules="$Validation.getRule('block.title')"
9
- :counter="$Validation.getLimit('block.title')"
10
- outlined
11
- :label="
12
- $t('windward.core.components.settings.clickable_icon.title')
13
- "
3
+ <v-row>
4
+ <BaseContentBlockSettings
5
+ v-model="block.metadata.config"
14
6
  :disabled="render"
15
- ></v-text-field>
16
- <v-textarea
17
- id="block-settings-instructions"
18
- v-model="block.metadata.config.instructions"
19
- :rules="$Validation.getRule('block.instructions')"
20
- :counter="$Validation.getLimit('block.instructions')"
21
- outlined
22
- :label="$t('components.content.settings.base.instructions')"
23
- :disabled="render"
24
- ></v-textarea>
7
+ ></BaseContentBlockSettings>
25
8
  </v-row>
26
9
  <p>
27
10
  {{ $t('windward.core.components.settings.open_response.question') }}
@@ -63,17 +46,21 @@
63
46
 
64
47
  <script>
65
48
  import _ from 'lodash'
66
- import TextEditor from '~/components/Text/TextEditor'
67
49
  import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
50
+ import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
51
+ import TextEditor from '~/components/Text/TextEditor'
68
52
 
69
53
  export default {
70
54
  name: 'ImageSettings',
55
+ components: { TextEditor, BaseContentBlockSettings },
71
56
  extends: BaseContentSettings,
72
- components: { TextEditor },
73
57
  props: {
74
58
  settings: { type: Object, required: false, default: null },
75
59
  context: { type: String, required: false, default: 'block' },
76
60
  },
61
+ data() {
62
+ return {}
63
+ },
77
64
  beforeMount() {
78
65
  if (_.isEmpty(this.block)) {
79
66
  this.block = {}
@@ -90,6 +77,9 @@ export default {
90
77
  if (_.isEmpty(this.block.metadata.config.title)) {
91
78
  this.block.metadata.config.title = ''
92
79
  }
80
+ if (!_.isBoolean(this.block.metadata.config.display_title)) {
81
+ this.$set(this.block.metadata.config, 'display_title', true)
82
+ }
93
83
  if (_.isEmpty(this.block.metadata.config.instructions)) {
94
84
  this.block.metadata.config.instructions = ''
95
85
  }
@@ -100,10 +90,6 @@ export default {
100
90
  this.block.metadata.config.starting_text = ''
101
91
  }
102
92
  },
103
- data() {
104
- return {}
105
- },
106
- watch: {},
107
93
  mounted() {},
108
94
  methods: {},
109
95
  }
@@ -2,28 +2,13 @@
2
2
  <div>
3
3
  <v-container class="pa-0">
4
4
  <v-col class="pa-0">
5
- <v-text-field
6
- id="block-settings-title"
7
- v-model="block.metadata.config.title"
8
- :rules="$Validation.getRule('block.title')"
9
- :counter="$Validation.getLimit('block.title')"
10
- outlined
11
- :label="
12
- $t(
13
- 'windward.core.components.settings.scenario_choice.title'
14
- )
15
- "
16
- :disabled="render"
17
- ></v-text-field>
18
- <v-textarea
19
- id="block-settings-instructions"
20
- v-model="block.metadata.config.description"
21
- :rules="$Validation.getRule('block.instructions')"
22
- :counter="$Validation.getLimit('block.instructions')"
23
- outlined
24
- :label="$t('components.content.settings.base.instructions')"
5
+ <BaseContentBlockSettings
6
+ v-model="block.metadata.config"
25
7
  :disabled="render"
26
- ></v-textarea>
8
+ ></BaseContentBlockSettings>
9
+ </v-col>
10
+ <v-col class="pa-0">
11
+ <v-divider class="my-4 primary"></v-divider>
27
12
  <v-select
28
13
  v-model="block.metadata.config.display_style"
29
14
  :items="displayStyles"
@@ -204,12 +189,13 @@
204
189
  </template>
205
190
  <script>
206
191
  import _ from 'lodash'
192
+ import BaseContentBlockSettings from '~/components/Content/Settings/BaseContentBlockSettings.vue'
207
193
  import { mapGetters } from 'vuex'
208
194
  import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
209
- import TextEditor from '~/components/Text/TextEditor'
210
195
  import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
211
196
  import DialogBox from '~/components/Core/DialogBox.vue'
212
197
  import Uuid from '~/helpers/Uuid'
198
+ import TextEditor from '~/components/Text/TextEditor'
213
199
 
214
200
  export default {
215
201
  name: 'ScenarioChoiceSettings',
@@ -217,13 +203,9 @@ export default {
217
203
  SortableExpansionPanel,
218
204
  TextEditor,
219
205
  DialogBox,
206
+ BaseContentBlockSettings,
220
207
  },
221
208
  extends: BaseContentSettings,
222
- computed: {
223
- ...mapGetters({
224
- contentTree: 'content/getTree',
225
- }),
226
- },
227
209
  data() {
228
210
  return {
229
211
  isLinked: false,
@@ -255,6 +237,11 @@ export default {
255
237
  ],
256
238
  }
257
239
  },
240
+ computed: {
241
+ ...mapGetters({
242
+ contentTree: 'content/getTree',
243
+ }),
244
+ },
258
245
  beforeMount() {
259
246
  if (_.isEmpty(this.block)) {
260
247
  this.block = {}
@@ -273,12 +260,15 @@ export default {
273
260
  if (_.isEmpty(this.block.metadata.config.title)) {
274
261
  this.block.metadata.config.title = ''
275
262
  }
263
+ if (!_.isBoolean(this.block.metadata.config.display_title)) {
264
+ this.$set(this.block.metadata.config, 'display_title', true)
265
+ }
276
266
  if (
277
- _.isEmpty(this.block.metadata.config.description) &&
267
+ _.isEmpty(this.block.metadata.config.instructions) &&
278
268
  this.block.id &&
279
269
  !Uuid.test(this.block.id)
280
270
  ) {
281
- this.block.metadata.config.description = this.$t(
271
+ this.block.metadata.config.instructions = this.$t(
282
272
  'windward.core.components.content.blocks.scenario_choice.information'
283
273
  )
284
274
  }