@windward/core 0.1.2 → 0.1.4

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 (30) hide show
  1. package/components/Content/Blocks/ClickableIcons.vue +6 -5
  2. package/components/Content/Blocks/Email.vue +65 -13
  3. package/components/Content/Blocks/HorizontalRule.vue +52 -0
  4. package/components/Content/Blocks/Image.vue +84 -40
  5. package/components/Content/Blocks/UserUpload.vue +48 -12
  6. package/components/Settings/ClickableIconsSettings.vue +56 -41
  7. package/components/Settings/HorizontalRuleSettings.vue +42 -0
  8. package/components/Settings/ImageSettings.vue +7 -0
  9. package/components/utils/FillInBlank/FillInBlankInput.vue +2 -2
  10. package/components/utils/assets/tinymce/css/content.scss +2 -2
  11. package/i18n/en-US/components/content/blocks/feedback.ts +2 -2
  12. package/i18n/en-US/components/settings/horizontal_rule.ts +3 -0
  13. package/i18n/en-US/components/settings/image.ts +1 -0
  14. package/i18n/en-US/components/settings/index.ts +2 -0
  15. package/i18n/en-US/shared/content_blocks.ts +1 -0
  16. package/i18n/en-US/shared/settings.ts +1 -0
  17. package/i18n/es-ES/components/settings/horizontal_rule.ts +3 -0
  18. package/i18n/es-ES/components/settings/image.ts +1 -0
  19. package/i18n/es-ES/components/settings/index.ts +2 -0
  20. package/i18n/es-ES/shared/content_blocks.ts +1 -0
  21. package/i18n/es-ES/shared/settings.ts +1 -0
  22. package/i18n/sv-SE/components/settings/horizontal_rule.ts +3 -0
  23. package/i18n/sv-SE/components/settings/image.ts +1 -0
  24. package/i18n/sv-SE/components/settings/index.ts +2 -0
  25. package/i18n/sv-SE/shared/content_blocks.ts +1 -0
  26. package/i18n/sv-SE/shared/settings.ts +1 -0
  27. package/package.json +1 -1
  28. package/plugin.js +22 -20
  29. package/test/Components/Settings/EmailSettings.spec.js +2 -2
  30. package/test/helpers/MathHelper.spec.js +1 -1
@@ -20,12 +20,11 @@
20
20
  no-gutters
21
21
  :class="rowClass(itemIndex)"
22
22
  >
23
- <v-col cols="2">
23
+ <v-col cols="12" xl="2" lg="3" md="3" sm="3">
24
24
  <v-btn
25
- class="pt-8 pb-8 outlined-button mb-4"
25
+ class="button-icon pa-1 mb-4"
26
26
  :color="itemColor(itemIndex)"
27
27
  :fab="block.metadata.config.display.round_icon"
28
- x-large
29
28
  outlined
30
29
  @click="item.active = !item.active"
31
30
  >
@@ -37,7 +36,7 @@
37
36
  }}</span>
38
37
  </v-btn>
39
38
  </v-col>
40
- <v-col cols="10">
39
+ <v-col cols="12" xl="10" lg="9" md="9" sm="9">
41
40
  <h4
42
41
  v-if="
43
42
  block.metadata.config.display.show_title ||
@@ -185,9 +184,11 @@ export default {
185
184
  .option-container {
186
185
  border-radius: 1rem;
187
186
  }
188
- .outlined-button {
187
+ .button-icon {
189
188
  border-width: 4px;
190
189
  background: #fff;
190
+ height: 74px !important;
191
+ width: 74px;
191
192
  }
192
193
  .text-icon {
193
194
  font-size: 1.5rem;
@@ -46,8 +46,15 @@
46
46
  elevation="0"
47
47
  >
48
48
  <v-expansion-panel-header>
49
- <v-row>
50
- <v-col class="pa-0 d-flex align-center">
49
+ <v-row class="container-header">
50
+ <v-col
51
+ xl="1"
52
+ lg="1"
53
+ md="1"
54
+ sm="2"
55
+ xs="2"
56
+ class="pa-0 d-flex align-center"
57
+ >
51
58
  <v-btn fab x-small class="primary" elevation="0"
52
59
  >{{ item.initials ? item.initials : '' }}
53
60
  </v-btn>
@@ -66,26 +73,54 @@
66
73
  color="secondary"
67
74
  >mdi-circle-medium</v-icon
68
75
  >
76
+ </v-col>
77
+ <v-col
78
+ xl="1"
79
+ lg="3"
80
+ md="11"
81
+ sm="10"
82
+ xs="10"
83
+ class="d-flex align-center"
84
+ >
69
85
  <span class="span-details"
70
86
  >{{ item.from ? item.from : 'From' }}
71
87
  </span>
72
88
  </v-col>
73
- <v-col> </v-col>
89
+ <v-col
90
+ v-if="selectedPanels !== index"
91
+ xl="10"
92
+ lg="8"
93
+ class="d-flex align-center container-body-preview"
94
+ >
95
+ <div class="div-preview">
96
+ {{ onRemoveTags(item.body) }}
97
+ </div>
98
+ </v-col>
74
99
  </v-row>
75
100
  </v-expansion-panel-header>
76
101
  <v-expansion-panel-content>
77
- <v-container class="pa-0 container-details">
102
+ <v-container class="pa-0">
78
103
  <v-row>
79
- <v-col cols="1"></v-col>
80
- <v-col class="pa-0 div-details">
81
- <div class="div-details-to pl-4">
104
+ <v-col
105
+ cols="1"
106
+ xl="1"
107
+ lg="1"
108
+ md="1"
109
+ sm="2"
110
+ xs="2"
111
+ ></v-col>
112
+ <v-col
113
+ class="div-details"
114
+ v-if="item.to || item.cc"
115
+ >
116
+ <div class="div-details-to">
82
117
  {{
83
118
  $t(
84
119
  'windward.core.components.content.blocks.email.to'
85
120
  )
86
121
  }}: {{ item.to }}
87
122
  </div>
88
- <div class="div-details-cc pl-4">
123
+ <div class="div-details-cc">
89
124
  {{
90
125
  $t(
91
126
  'windward.core.components.content.blocks.email.cc'
@@ -218,7 +253,11 @@ export default {
218
253
  mounted() {
219
254
  this.selectedPanels = this.block.metadata.config.emails.length - 1
220
255
  },
221
- methods: {},
256
+ methods: {
257
+ onRemoveTags(body) {
258
+ return body.replace(/(<([^>]+)>)/gi, '')
259
+ },
260
+ },
222
261
  }
223
262
  </script>
224
263
  <style scoped>
@@ -228,12 +267,10 @@ export default {
228
267
  .column-simulation {
229
268
  font-size: 12px;
230
269
  }
231
- .container-details {
232
- font-size: 10px;
233
- margin-top: -26px;
234
- }
235
270
  .div-details {
236
271
  color: grey;
272
+ font-size: 10px;
273
+ margin-top: -25px;
237
274
  }
238
275
  .div-details-cc {
239
276
  margin-top: -9px;
@@ -245,4 +282,19 @@ export default {
245
282
  .v-expansion-panel {
246
283
  border: 1px solid var(--v-primary-base);
247
284
  }
285
+ @media only screen and (max-width: 1264px) {
286
+ .container-body-preview {
287
+ display: none !important;
288
+ }
289
+ }
290
+ .div-preview {
291
+ overflow: hidden;
292
+ text-overflow: ellipsis;
293
+ white-space: nowrap;
294
+ margin-top: auto;
295
+ margin-bottom: auto;
296
+ }
297
+ .container-header {
298
+ width: 100%;
299
+ }
248
300
  </style>
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <div>
3
+ <hr :class="isDashed" />
4
+ </div>
5
+ </template>
6
+ <script>
7
+ import _ from 'lodash'
8
+ import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
9
+ export default {
10
+ name: 'HorizontalRule',
11
+ extends: BaseContentBlock,
12
+ beforeMount() {
13
+ if (_.isEmpty(this.block)) {
14
+ this.block = {}
15
+ }
16
+ if (_.isEmpty(this.block.metadata)) {
17
+ this.block.metadata = {}
18
+ }
19
+ if (_.isEmpty(this.block.metadata.config)) {
20
+ this.block.metadata.config = {}
21
+ }
22
+ if (_.isEmpty(this.block.metadata.config)) {
23
+ this.block.metadata.config = {}
24
+ }
25
+ if (_.isEmpty(this.block.metadata.config.dashed)) {
26
+ this.block.metadata.config.dashed = false
27
+ }
28
+ },
29
+ data() {
30
+ return {
31
+ isDashed: 'solid',
32
+ }
33
+ },
34
+ watch: {
35
+ value(newValue) {
36
+ if (newValue.metadata.config.dashed) {
37
+ this.isDashed = 'dashed'
38
+ } else if (newValue.metadata.config.dashed === false) {
39
+ this.isDashed = 'solid'
40
+ }
41
+ },
42
+ },
43
+ }
44
+ </script>
45
+ <style>
46
+ .solid {
47
+ border-bottom: solid 1px var(--v-primary-base);
48
+ }
49
+ .dashed {
50
+ border-bottom: dashed 1px var(--v-primary-base);
51
+ }
52
+ </style>
@@ -1,50 +1,84 @@
1
1
  <template>
2
2
  <div>
3
- <div v-if="!block.body" class="img-holder">
4
- <v-skeleton-loader
5
- height="300px"
6
- :elevation="2"
7
- type="image"
8
- ></v-skeleton-loader>
3
+ <v-container class="pa-0 ma-0">
4
+ <div v-if="!block.body" class="img-holder">
5
+ <v-skeleton-loader
6
+ height="300px"
7
+ :elevation="2"
8
+ type="image"
9
+ ></v-skeleton-loader>
9
10
 
10
- <div class="no-source-overlay">
11
- <v-icon x-large>mdi-file-question</v-icon><br />
12
- {{
13
- $t(
14
- 'windward.core.components.content.blocks.image.no_image_url'
15
- )
16
- }}
11
+ <div class="no-source-overlay">
12
+ <v-icon x-large>mdi-file-question</v-icon><br />
13
+ {{
14
+ $t(
15
+ 'windward.core.components.content.blocks.image.no_image_url'
16
+ )
17
+ }}
18
+ </div>
17
19
  </div>
18
- </div>
19
- <v-responsive :aspect-ratio="aspectRatio">
20
- <v-img
21
- v-if="block.body"
22
- :alt="block.metadata.config.alt"
23
- :aria-describedby="block.metadata.config.aria_described_by"
24
- :class="imageClass"
25
- :src="block.body"
26
- contain
27
- >
28
- <template #placeholder>
29
- <v-skeleton-loader
30
- type="image, image, list-item-avatar"
31
- height="100%"
32
- width="100%"
33
- ></v-skeleton-loader>
34
- </template>
35
- </v-img>
36
- </v-responsive>
37
- <TextViewer
38
- v-if="describedById"
39
- v-model="describedByText"
40
- :id="describedById"
41
- class="sr-only"
42
- ></TextViewer>
20
+ <v-responsive :aspect-ratio="aspectRatio">
21
+ <v-img
22
+ v-if="block.body"
23
+ :alt="block.metadata.config.alt"
24
+ :aria-describedby="block.metadata.config.aria_described_by"
25
+ :class="imageClass"
26
+ :src="block.body"
27
+ contain
28
+ @click="onHandleModal"
29
+ >
30
+ <template #placeholder>
31
+ <v-skeleton-loader
32
+ type="image, image, list-item-avatar"
33
+ height="100%"
34
+ width="100%"
35
+ ></v-skeleton-loader>
36
+ </template>
37
+ </v-img>
38
+ </v-responsive>
39
+ <TextViewer
40
+ v-if="describedById"
41
+ v-model="describedByText"
42
+ :id="describedById"
43
+ class="sr-only"
44
+ ></TextViewer>
45
+ </v-container>
46
+ <Dialog v-model="dialog" persistent :trigger="false">
47
+ <template #title></template>
48
+ <template #form="{ on, attrs }">
49
+ <v-responsive
50
+ :aspect-ratio="aspectRatio"
51
+ v-bind="attrs"
52
+ v-on="on"
53
+ >
54
+ <v-img
55
+ v-if="block.body"
56
+ :alt="block.metadata.config.alt"
57
+ :aria-describedby="
58
+ block.metadata.config.aria_described_by
59
+ "
60
+ :class="imageClass"
61
+ :src="block.body"
62
+ contain
63
+ @click="onHandleModal"
64
+ >
65
+ <template #placeholder>
66
+ <v-skeleton-loader
67
+ type="image, image, list-item-avatar"
68
+ height="100%"
69
+ width="100%"
70
+ ></v-skeleton-loader>
71
+ </template>
72
+ </v-img>
73
+ </v-responsive>
74
+ </template>
75
+ </Dialog>
43
76
  </div>
44
77
  </template>
45
78
 
46
79
  <script>
47
80
  import _ from 'lodash'
81
+ import Dialog from '~/components/Dialog'
48
82
  import TextViewer from '~/components/Text/TextViewer'
49
83
  import Crypto from '~/helpers/Crypto'
50
84
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
@@ -53,12 +87,14 @@ export default {
53
87
  name: 'ContentBlockImage',
54
88
  extends: BaseContentBlock,
55
89
  components: {
90
+ Dialog,
56
91
  TextViewer,
57
92
  },
58
93
  data() {
59
94
  return {
60
95
  id: 'image_' + Crypto.id(),
61
96
  aspectRatio: undefined,
97
+ dialog: false,
62
98
  }
63
99
  },
64
100
  beforeMount() {
@@ -71,6 +107,9 @@ export default {
71
107
  if (!_.isBoolean(this.block.metadata.config.hide_background)) {
72
108
  this.block.metadata.config.hide_background = false
73
109
  }
110
+ if (!_.isBoolean(this.block.metadata.config.modal)) {
111
+ this.block.metadata.config.modal = false
112
+ }
74
113
  if (_.isEmpty(this.block.metadata.config.aria_describedby)) {
75
114
  this.block.metadata.config.aria_describedby = ''
76
115
  }
@@ -111,8 +150,13 @@ export default {
111
150
  }
112
151
  },
113
152
  },
114
- mounted() {},
115
- methods: {},
153
+ methods: {
154
+ onHandleModal() {
155
+ if (this.block.metadata.config.modal) {
156
+ this.dialog = true
157
+ }
158
+ },
159
+ },
116
160
  }
117
161
  </script>
118
162
 
@@ -38,7 +38,7 @@
38
38
  :enrollment="enrollment"
39
39
  ></DisplayUserFilesTable>
40
40
  </v-col>
41
- <v-col cols="12">
41
+ <v-col cols="12" v-if="showUpload">
42
42
  <div v-if="blockExists">
43
43
  <v-form
44
44
  ref="form"
@@ -149,6 +149,7 @@ export default {
149
149
  uploadFiles: [],
150
150
  userFileAsset: {},
151
151
  studentUpload: null,
152
+ maxFileLimit: 10,
152
153
  }
153
154
  },
154
155
  computed: {
@@ -160,17 +161,27 @@ export default {
160
161
  },
161
162
  canUpload() {
162
163
  if (this.valid) {
164
+ const currentFiles = _.get(
165
+ this.userFileAsset,
166
+ 'file_assets',
167
+ []
168
+ )
169
+
163
170
  // Multiple disabled, single file selected
164
171
  if (
165
172
  !Array.isArray(this.uploadFiles) &&
166
173
  !this.block.metadata.config.uploadSettings.multiple &&
167
- this.uploadFiles
174
+ this.uploadFiles &&
175
+ currentFiles.length === 0
168
176
  ) {
169
177
  return true
170
178
  } else if (
171
179
  // Multi enabled, one or more files selected
180
+ this.block.metadata.config.uploadSettings.multiple &&
172
181
  Array.isArray(this.uploadFiles) &&
173
- this.uploadFiles.length > 0
182
+ this.uploadFiles.length > 0 &&
183
+ this.uploadFiles.length + currentFiles.length <=
184
+ this.maxFileLimit
174
185
  ) {
175
186
  return true
176
187
  } else {
@@ -180,6 +191,26 @@ export default {
180
191
  }
181
192
  return false
182
193
  },
194
+ showUpload() {
195
+ const currentFiles = _.get(this.userFileAsset, 'file_assets', [])
196
+
197
+ // Multiple disabled, confirm there's no current files
198
+ if (
199
+ !this.block.metadata.config.uploadSettings.multiple &&
200
+ currentFiles.length === 0
201
+ ) {
202
+ return true
203
+ } else if (
204
+ // Multi enabled, make sure we're not over our max limit
205
+ this.block.metadata.config.uploadSettings.multiple &&
206
+ currentFiles.length < this.maxFileLimit
207
+ ) {
208
+ return true
209
+ } else {
210
+ // Hide the uploader
211
+ return false
212
+ }
213
+ },
183
214
  },
184
215
  mounted() {
185
216
  if (this.blockExists) {
@@ -202,19 +233,24 @@ export default {
202
233
  }
203
234
 
204
235
  // Create a new UserFileAsset if we don't have an instance yet
205
- if (!Uuid.test(this.userFileAsset.id)) {
206
- this.userFileAsset = new UserFileAsset({
207
- file: uploadFiles,
208
- }).for(
209
- new Enrollment(this.enrollment),
210
- new ContentBlock({ id: this.block.id })
211
- )
236
+ let userFileAssetRequest = new UserFileAsset({
237
+ file: uploadFiles,
238
+ }).for(
239
+ new Enrollment(this.enrollment),
240
+ new ContentBlock({ id: this.block.id })
241
+ )
242
+
243
+ // Apply the existing id if we already have an instance
244
+ if (Uuid.test(this.userFileAsset.id)) {
245
+ userFileAssetRequest.id = this.userFileAsset.id
212
246
  }
213
247
 
214
- this.userFileAsset.file = uploadFiles
248
+ // Add our files to upload
249
+ userFileAssetRequest.file = uploadFiles
215
250
 
216
251
  try {
217
- this.userFileAsset = await this.userFileAsset.save()
252
+ // Apply the response back to the reactive this.userFileAsset
253
+ this.userFileAsset = await userFileAssetRequest.save()
218
254
  } catch (e) {
219
255
  this.$toast.error(this.$t('shared.forms.errors.unknown'))
220
256
  console.log(e)
@@ -1,9 +1,10 @@
1
1
  <template>
2
2
  <div>
3
- <v-container>
3
+ <v-container class="pa-0">
4
4
  <v-col class="pa-0">
5
5
  <v-text-field
6
6
  v-model="block.metadata.config.title"
7
+ outlined
7
8
  id="title"
8
9
  :label="
9
10
  $t(
@@ -13,6 +14,7 @@
13
14
  ></v-text-field>
14
15
  <v-text-field
15
16
  v-model="block.metadata.config.description"
17
+ outlined
16
18
  id="description"
17
19
  :label="
18
20
  $t(
@@ -60,12 +62,8 @@
60
62
  )
61
63
  "
62
64
  ></v-switch>
63
- <v-btn color="primary" outlined block @click="onAddElement"
64
- ><v-icon>mdi-plus</v-icon
65
- >{{ $t('shared.forms.add') }}</v-btn
66
- >
67
65
  </v-col>
68
- <v-col>
66
+ <v-col class="pa-0">
69
67
  <SortableExpansionPanel
70
68
  v-model="block.metadata.config.items"
71
69
  @click:close="onRemoveElement"
@@ -86,47 +84,64 @@
86
84
  </span>
87
85
  </template>
88
86
  <template #body="{ index }">
89
- <TextIconPicker
90
- v-model="block.metadata.config.items[index].icon"
91
- :label="
92
- $t(
93
- 'windward.core.components.settings.clickable_icon.item_icon',
94
- [index + 1]
95
- )
96
- "
97
- ></TextIconPicker>
98
- <v-text-field
99
- v-model="block.metadata.config.items[index].title"
100
- :id="'item-' + index + '-title'"
101
- :label="
102
- $t(
103
- 'windward.core.components.settings.clickable_icon.item_title'
104
- )
105
- "
106
- ></v-text-field>
87
+ <v-container>
88
+ <TextIconPicker
89
+ v-model="
90
+ block.metadata.config.items[index].icon
91
+ "
92
+ :label="
93
+ $t(
94
+ 'windward.core.components.settings.clickable_icon.item_icon',
95
+ [index + 1]
96
+ )
97
+ "
98
+ ></TextIconPicker>
99
+ <v-text-field
100
+ v-model="
101
+ block.metadata.config.items[index].title
102
+ "
103
+ :id="'item-' + index + '-title'"
104
+ outlined
105
+ :label="
106
+ $t(
107
+ 'windward.core.components.settings.clickable_icon.item_title'
108
+ )
109
+ "
110
+ ></v-text-field>
107
111
 
108
- <ColorPicker
109
- v-if="!block.metadata.config.display.autocolor"
110
- v-model="block.metadata.config.items[index].color"
111
- :label="
112
+ <ColorPicker
113
+ v-if="!block.metadata.config.display.autocolor"
114
+ v-model="
115
+ block.metadata.config.items[index].color
116
+ "
117
+ :label="
118
+ $t(
119
+ 'windward.core.components.settings.clickable_icon.item_color'
120
+ )
121
+ "
122
+ ></ColorPicker>
123
+ <v-divider class="mt-3 mb-3" />
124
+ <span>{{
112
125
  $t(
113
- 'windward.core.components.settings.clickable_icon.item_color'
126
+ 'windward.core.components.settings.clickable_icon.item_text'
114
127
  )
115
- "
116
- ></ColorPicker>
117
- <v-divider class="mt-3 mb-3" />
118
- <span>{{
119
- $t(
120
- 'windward.core.components.settings.clickable_icon.item_text'
121
- )
122
- }}</span>
123
- <TextEditor
124
- v-model="block.metadata.config.items[index].body"
125
- :height="200"
126
- ></TextEditor>
128
+ }}</span>
129
+ <TextEditor
130
+ v-model="
131
+ block.metadata.config.items[index].body
132
+ "
133
+ :height="200"
134
+ ></TextEditor>
135
+ </v-container>
127
136
  </template>
128
137
  </SortableExpansionPanel>
129
138
  </v-col>
139
+ <v-row justify="center" class="my-4">
140
+ <v-btn color="primary" @click="onAddElement"
141
+ ><v-icon>mdi-plus</v-icon
142
+ >{{ $t('shared.forms.add') }}</v-btn
143
+ >
144
+ </v-row>
130
145
  </v-container>
131
146
  </div>
132
147
  </template>
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <div>
3
+ <v-switch
4
+ v-model="block.metadata.config.dashed"
5
+ :label="
6
+ $t('windward.core.components.settings.horizontal_rule.dashed')
7
+ "
8
+ ></v-switch>
9
+ </div>
10
+ </template>
11
+
12
+ <script>
13
+ import _ from 'lodash'
14
+ import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
15
+
16
+ export default {
17
+ name: 'HorizontalRuleSettings',
18
+ extends: BaseContentSettings,
19
+ components: {},
20
+ beforeMount() {
21
+ if (_.isEmpty(this.block)) {
22
+ this.block = {}
23
+ }
24
+ if (_.isEmpty(this.block.metadata)) {
25
+ this.block.metadata = {}
26
+ }
27
+ if (_.isEmpty(this.block.metadata.config)) {
28
+ this.block.metadata.config = {}
29
+ }
30
+ if (_.isEmpty(this.block.metadata.config)) {
31
+ this.block.metadata.config = {}
32
+ }
33
+ if (!_.isBoolean(this.block.metadata.config.dashed)) {
34
+ this.block.metadata.config.dashed = false
35
+ }
36
+ },
37
+ data() {
38
+ return {}
39
+ },
40
+ }
41
+ </script>
42
+ <style></style>
@@ -23,6 +23,10 @@
23
23
  $t('windward.core.components.settings.image.hide_background')
24
24
  "
25
25
  ></v-switch>
26
+ <v-switch
27
+ v-model="block.metadata.config.modal"
28
+ :label="$t('windward.core.components.settings.image.modal')"
29
+ ></v-switch>
26
30
 
27
31
  <v-form>
28
32
  <v-text-field
@@ -79,6 +83,9 @@ export default {
79
83
  if (!_.isBoolean(this.block.metadata.config.hide_background)) {
80
84
  this.block.metadata.config.hide_background = false
81
85
  }
86
+ if (!_.isBoolean(this.block.metadata.config.modal)) {
87
+ this.block.metadata.config.modal = false
88
+ }
82
89
  if (_.isEmpty(this.block.metadata.config.aria_describedby)) {
83
90
  this.block.metadata.config.aria_describedby = ''
84
91
  }
@@ -139,8 +139,8 @@ export default {
139
139
  computed: {
140
140
  answerIsCorrect() {
141
141
  if (
142
- _.trim(_.toLower(this.answer)) ===
143
- _.trim(_.toLower(this.userInput))
142
+ _.replace(_.trim(_.toLower(this.answer)),new RegExp(' ','g'), '', ) ===
143
+ _.replace(_.trim(_.toLower(this.userInput)),new RegExp(' ','g'), '', )
144
144
  ) {
145
145
  return true
146
146
  }
@@ -1,11 +1,11 @@
1
1
 
2
2
  table {
3
3
  max-width: 100%;
4
- border: 1px solid black;
4
+ border: 1px solid var(--v-primary-base) !important;
5
5
  border-spacing: 0;
6
6
 
7
7
  th, td {
8
- border: 1px solid black;
8
+ border: 1px solid var(--v-primary-base) !important;
9
9
  padding: 3px;
10
10
  }
11
11
 
@@ -22,10 +22,10 @@ export default {
22
22
  sent_feedback:
23
23
  'Thank you for submitting feedback. Your input is very important and valuable to us. If you suggested improvements in your comments, we will consider those suggestions seriously. Course quality and usability are our highest priorities.',
24
24
  scale: {
25
- strongly_agree: 'Stronly Agree',
25
+ strongly_agree: 'Strongly Agree',
26
26
  agree: 'Agree',
27
27
  neutral: 'Neutral',
28
28
  disagree: 'Disagree',
29
- strongly_disagree: 'Strong Disagree',
29
+ strongly_disagree: 'Strongly Disagree',
30
30
  },
31
31
  }
@@ -0,0 +1,3 @@
1
+ export default {
2
+ dashed: 'Make line dashed',
3
+ }
@@ -1,3 +1,4 @@
1
1
  export default {
2
2
  hide_background: 'Hide Background',
3
+ modal: 'Click to open in modal',
3
4
  }
@@ -10,6 +10,7 @@ import accordion from './accordion'
10
10
  import tab from './tab'
11
11
  import email from './email'
12
12
  import block_quote from './block_quote'
13
+ import horizontal_rule from './horizontal_rule'
13
14
 
14
15
  export default {
15
16
  accordion,
@@ -24,4 +25,5 @@ export default {
24
25
  scenario_choice: scenarioChoice,
25
26
  email,
26
27
  block_quote,
28
+ horizontal_rule,
27
29
  }
@@ -16,6 +16,7 @@ export default {
16
16
  feedback: 'Feedback',
17
17
  email: 'Email',
18
18
  block_quote: 'Block Quote',
19
+ horizontal_rule: 'Divider',
19
20
  },
20
21
  grouping: {
21
22
  basic: 'Basic Components',
@@ -14,6 +14,7 @@ export default {
14
14
  table: 'Table Settings',
15
15
  math: 'Math Settings',
16
16
  feedback: 'Feedback Settings',
17
+ horizontal_line: 'Divider Settings',
17
18
  email: 'Ajustes del correo electrónico',
18
19
  click_to_enter: 'Click here to enter text',
19
20
  block_quote: 'Block Quote Settings',
@@ -0,0 +1,3 @@
1
+ export default {
2
+ dashed: 'Hacer línea discontinua',
3
+ }
@@ -1,3 +1,4 @@
1
1
  export default {
2
2
  hide_background: 'Ocultar fondo',
3
+ modal: 'Haga clic para abrir en modal',
3
4
  }
@@ -10,6 +10,7 @@ import accordion from './accordion'
10
10
  import tab from './tab'
11
11
  import block_quote from './block_quote'
12
12
  import email from './email'
13
+ import horizontal_rule from './horizontal_rule'
13
14
 
14
15
  export default {
15
16
  accordion,
@@ -24,4 +25,5 @@ export default {
24
25
  scenario_choice: scenarioChoice,
25
26
  block_quote,
26
27
  email,
28
+ horizontal_rule,
27
29
  }
@@ -16,6 +16,7 @@ export default {
16
16
  feedback: 'Comentarios',
17
17
  email: 'Correo Electrónico',
18
18
  block_quote: 'Cotización en bloque',
19
+ horizontal_rule: 'Divisor',
19
20
  },
20
21
  grouping: {
21
22
  basic: 'Componentes básicos',
@@ -16,6 +16,7 @@ export default {
16
16
  table: 'Configuración de la tabla',
17
17
  math: 'Configuración matemática',
18
18
  feedback: 'Configuración de comentarios',
19
+ horizontal_line: 'Configuración del divisor',
19
20
  email: 'Ajustes del correo electrónico',
20
21
  click_to_enter: 'Haga clic para ingresar texto',
21
22
  block_quote: 'Configuración de cotización en bloque',
@@ -0,0 +1,3 @@
1
+ export default {
2
+ dashed: 'Göra streckad linje',
3
+ }
@@ -1,3 +1,4 @@
1
1
  export default {
2
2
  hide_background: 'Dölj bakgrund',
3
+ modal: 'Klicka för att öppna i modal',
3
4
  }
@@ -10,6 +10,7 @@ import accordion from './accordion'
10
10
  import tab from './tab'
11
11
  import block_quote from './block_quote'
12
12
  import email from './email'
13
+ import horizontal_rule from './horizontal_rule'
13
14
 
14
15
  export default {
15
16
  accordion,
@@ -24,4 +25,5 @@ export default {
24
25
  scenario_choice: scenarioChoice,
25
26
  block_quote,
26
27
  email,
28
+ horizontal_rule,
27
29
  }
@@ -16,6 +16,7 @@ export default {
16
16
  feedback: 'Feedback',
17
17
  email: 'E-Post',
18
18
  block_quote: 'Block citat',
19
+ horizontal_rule: 'Delare',
19
20
  },
20
21
  grouping: {
21
22
  basic: 'Basic Components',
@@ -14,6 +14,7 @@ export default {
14
14
  table: 'Tabellinställningar',
15
15
  math: 'Matematiska inställningar',
16
16
  feedback: 'Feedback-inställningar',
17
+ horizontal_line: 'Inställningar för avdelare',
17
18
  email: 'E-postinställningar',
18
19
  click_to_enter: 'Klicka för att skriva in text',
19
20
  block_quote: 'Blockera offertinställningar',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windward/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Windward UI Core Plugins",
5
5
  "main": "plugin.js",
6
6
  "scripts": {
package/plugin.js CHANGED
@@ -11,6 +11,7 @@ import ClickableIcons from './components/Content/Blocks/ClickableIcons'
11
11
  import ScenarioChoice from './components/Content/Blocks/ScenarioChoice'
12
12
  import Email from './components/Content/Blocks/Email'
13
13
  import BlockQuote from './components/Content/Blocks/BlockQuote.vue'
14
+ import HorizontalRule from './components/Content/Blocks/HorizontalRule.vue'
14
15
 
15
16
  import UserUploadNav from './components/Navigation/Items/UserUploadNav.vue'
16
17
 
@@ -37,6 +38,7 @@ import TabSettings from './components/Settings/TabSettings.vue'
37
38
  import FeedbackSettings from './components/Settings/FeedbackSettings.vue'
38
39
  import EmailSettings from './components/Settings/EmailSettings.vue'
39
40
  import BlockQuoteSettigns from './components/Settings/BlockQuoteSettings.vue'
41
+ import HorizontalRuleSettings from './components/Settings/HorizontalRuleSettings.vue'
40
42
 
41
43
  import UserUploadPage from './pages/userUpload.vue'
42
44
  import GlossaryToolTip from './components/utils/glossary/GlossaryToolTip.vue'
@@ -165,16 +167,6 @@ export default {
165
167
  'windward.core.shared.content_blocks.grouping.basic',
166
168
  },
167
169
  },
168
- {
169
- tag: 'core-math',
170
- template: Math,
171
- metadata: {
172
- icon: 'mdi-math-integral',
173
- name: 'windward.core.shared.content_blocks.title.math',
174
- grouping:
175
- 'windward.core.shared.content_blocks.grouping.basic',
176
- },
177
- },
178
170
  {
179
171
  tag: 'core-accordion',
180
172
  template: Accordion,
@@ -262,7 +254,7 @@ export default {
262
254
  icon: 'mdi-email',
263
255
  name: 'windward.core.shared.content_blocks.title.email',
264
256
  grouping:
265
- 'windward.core.shared.content_blocks.grouping.basic',
257
+ 'windward.core.shared.content_blocks.grouping.basic',
266
258
  },
267
259
  },
268
260
  {
@@ -275,6 +267,16 @@ export default {
275
267
  'windward.core.shared.content_blocks.grouping.basic',
276
268
  },
277
269
  },
270
+ {
271
+ tag: 'core-horizontal-rule',
272
+ template: HorizontalRule,
273
+ metadata: {
274
+ icon: 'mdi-minus',
275
+ name: 'windward.core.shared.content_blocks.title.horizontal_rule',
276
+ grouping:
277
+ 'windward.core.shared.content_blocks.grouping.basic',
278
+ },
279
+ },
278
280
  ],
279
281
  settings: [
280
282
  {
@@ -376,15 +378,6 @@ export default {
376
378
  name: 'windward.core.shared.settings.title.text_editor',
377
379
  },
378
380
  },
379
- {
380
- tag: 'core-math-settings',
381
- template: MathSettings,
382
- context: ['block.core-math'],
383
- metadata: {
384
- icon: 'mdi-notebook-outline',
385
- name: 'windward.core.shared.settings.title.math',
386
- },
387
- },
388
381
  {
389
382
  tag: 'core-feedback-settings',
390
383
  template: FeedbackSettings,
@@ -412,6 +405,15 @@ export default {
412
405
  name: 'windward.core.shared.settings.title.block_quote',
413
406
  },
414
407
  },
408
+ {
409
+ tag: 'core-horizontal-rule-settings',
410
+ template: HorizontalRuleSettings,
411
+ context: ['block.core-horizontal-rule'],
412
+ metadata: {
413
+ icon: 'mdi-cog',
414
+ name: 'windward.core.shared.settings.title.horizontal_line',
415
+ },
416
+ },
415
417
  ],
416
418
  },
417
419
  }
@@ -27,8 +27,8 @@ describe('EmailSettings', () => {
27
27
  })
28
28
  wrapper.vm.onAddElement()
29
29
  expect(wrapper.vm.$data.block.metadata.config.emails).toEqual([
30
- { from: '', to: '', cc: '', body: '', expand: false },
31
- { from: '', to: '', cc: '', body: '', expand: false },
30
+ { from: '', to: '', cc: '', body: '', expand: false, initials: '' },
31
+ { from: '', to: '', cc: '', body: '', expand: false, initials: '' },
32
32
  ])
33
33
  })
34
34
 
@@ -7,7 +7,7 @@ const text =
7
7
  ' Et inventore hic aut.'
8
8
  const mathML =
9
9
  '<math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>1</mn><mn>2</mn></mfrac><mo>+</mo><mfrac><mn>3</mn><mn>4</mn></mfrac></math>'
10
- const latexContent = '\\frac{1}{2}+\\frac{3}{4}'
10
+ const latexContent = '\\frac{1}{2} + \\frac{3}{4}'
11
11
  const srEnhancedlatex =
12
12
  '**' +
13
13
  JSON.stringify({