@windward/core 0.0.8 → 0.1.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 (194) hide show
  1. package/components/Content/Blocks/BlockQuote.vue +191 -0
  2. package/components/Content/Blocks/ClickableIcons.vue +128 -40
  3. package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionLikert.vue +25 -14
  4. package/components/Content/Blocks/FeedbackTemplates/FeedbackQuestionTrueFalse.vue +3 -7
  5. package/components/Content/Blocks/Image.vue +2 -2
  6. package/components/Content/Blocks/OpenResponse.vue +20 -14
  7. package/components/Content/Blocks/ScenarioChoice.vue +262 -0
  8. package/components/Content/Blocks/Tab.vue +2 -7
  9. package/components/Settings/AccordionSettings.vue +97 -74
  10. package/components/Settings/BlockQuoteSettings.vue +143 -0
  11. package/components/Settings/ClickableIconsSettings.vue +101 -86
  12. package/components/Settings/OpenResponseSettings.vue +6 -8
  13. package/components/Settings/ScenarioChoiceSettings.vue +329 -0
  14. package/components/Settings/TabSettings.vue +79 -62
  15. package/components/Settings/TextEditorSettings.vue +1 -3
  16. package/components/utils/FillInBlank/FillInBlankInput.vue +4 -1
  17. package/components/utils/MathExpressionEditor.vue +30 -15
  18. package/components/utils/TinyMCEWrapper.vue +3 -1
  19. package/helpers/FillInBlankHelper.ts +0 -2
  20. package/i18n/en-US/components/content/blocks/block_quote.ts +3 -0
  21. package/i18n/en-US/components/content/blocks/index.ts +4 -2
  22. package/i18n/en-US/components/content/blocks/scenario_choice.ts +5 -0
  23. package/i18n/en-US/components/settings/accordion.ts +5 -0
  24. package/i18n/en-US/components/settings/block_quote.ts +9 -0
  25. package/i18n/en-US/components/settings/clickable_icon.ts +8 -0
  26. package/i18n/en-US/components/settings/index.ts +8 -0
  27. package/i18n/en-US/components/settings/scenario_choice.ts +19 -0
  28. package/i18n/en-US/components/settings/tab.ts +7 -0
  29. package/i18n/en-US/components/utils/FillInBlank/FillInBlankInput.ts +1 -1
  30. package/i18n/en-US/components/utils/index.ts +2 -0
  31. package/i18n/en-US/components/utils/math_expression_editor.ts +3 -0
  32. package/i18n/en-US/shared/content_blocks.ts +2 -0
  33. package/i18n/en-US/shared/settings.ts +4 -0
  34. package/i18n/es-ES/components/content/blocks/block_quote.ts +3 -0
  35. package/i18n/es-ES/components/content/blocks/feedback.ts +2 -0
  36. package/i18n/es-ES/components/content/blocks/index.ts +4 -2
  37. package/i18n/es-ES/components/content/blocks/scenario_choice.ts +6 -0
  38. package/i18n/es-ES/components/navigation/index.ts +2 -0
  39. package/i18n/es-ES/components/settings/accordion.ts +5 -0
  40. package/i18n/es-ES/components/settings/block_quote.ts +9 -0
  41. package/i18n/es-ES/components/settings/clickable_icon.ts +8 -0
  42. package/i18n/es-ES/components/settings/index.ts +8 -0
  43. package/i18n/es-ES/components/settings/scenario_choice.ts +19 -0
  44. package/i18n/es-ES/components/{content/blocks → settings}/tab.ts +3 -0
  45. package/i18n/es-ES/components/utils/FillInBlank/FillInBlankInput.ts +13 -0
  46. package/i18n/es-ES/components/utils/FillInBlank/FillInTheBlanksManager.ts +11 -0
  47. package/i18n/es-ES/components/utils/FillInBlank/index.ts +6 -0
  48. package/i18n/es-ES/components/utils/index.ts +4 -1
  49. package/i18n/es-ES/components/utils/math_expression_editor.ts +3 -0
  50. package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +1 -0
  51. package/i18n/es-ES/shared/content_blocks.ts +2 -0
  52. package/i18n/es-ES/shared/menu.ts +1 -0
  53. package/i18n/es-ES/shared/settings.ts +4 -0
  54. package/i18n/index.ts +11 -0
  55. package/i18n/sv-SE/components/content/blocks/block_quote.ts +3 -0
  56. package/i18n/sv-SE/components/content/blocks/feedback.ts +2 -0
  57. package/i18n/sv-SE/components/content/blocks/index.ts +4 -2
  58. package/i18n/sv-SE/components/content/blocks/scenario_choice.ts +5 -0
  59. package/i18n/sv-SE/components/navigation/index.ts +2 -0
  60. package/i18n/sv-SE/components/settings/accordion.ts +5 -0
  61. package/i18n/sv-SE/components/settings/block_quote.ts +9 -0
  62. package/i18n/sv-SE/components/settings/clickable_icon.ts +8 -0
  63. package/i18n/sv-SE/components/settings/index.ts +8 -0
  64. package/i18n/sv-SE/components/settings/scenario_choice.ts +19 -0
  65. package/i18n/sv-SE/components/{content/blocks → settings}/tab.ts +3 -0
  66. package/i18n/sv-SE/components/utils/FillInBlank/FillInBlankInput.ts +13 -0
  67. package/i18n/sv-SE/components/utils/FillInBlank/FillInTheBlanksManager.ts +11 -0
  68. package/i18n/sv-SE/components/utils/FillInBlank/index.ts +6 -0
  69. package/i18n/sv-SE/components/utils/index.ts +4 -1
  70. package/i18n/sv-SE/components/utils/math_expression_editor.ts +3 -0
  71. package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +1 -0
  72. package/i18n/sv-SE/shared/content_blocks.ts +2 -0
  73. package/i18n/sv-SE/shared/menu.ts +1 -0
  74. package/i18n/sv-SE/shared/settings.ts +4 -0
  75. package/package.json +5 -4
  76. package/plugin.js +45 -5
  77. package/test/Components/Content/Blocks/BlockQuote.spec.js +21 -0
  78. package/test/Components/Content/Blocks/ScenarioChoice.spec.js +21 -0
  79. package/test/Components/Settings/BlockQuoteSettings.spec.js +20 -0
  80. package/test/Components/Settings/ClickableIconsSettings.spec.js +1 -1
  81. package/test/Components/Settings/ScenarioChoiceSettings.spec.js +20 -0
  82. package/test/Feature/LocaleKeys.spec.js +9 -0
  83. package/test/__mocks__/componentsMock.js +24 -0
  84. package/test/locales.js +95 -0
  85. package/.idea/codeStyles/Project.xml +0 -58
  86. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  87. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  88. package/.idea/modules.xml +0 -8
  89. package/.idea/php-docker-settings.xml +0 -24
  90. package/.idea/php.xml +0 -19
  91. package/.idea/vcs.xml +0 -6
  92. package/.idea/watcherTasks.xml +0 -4
  93. package/.idea/windward-ui-plugin-core.iml +0 -8
  94. package/coverage/clover.xml +0 -223
  95. package/coverage/coverage-final.json +0 -16
  96. package/coverage/lcov-report/base.css +0 -224
  97. package/coverage/lcov-report/block-navigation.js +0 -87
  98. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
  99. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
  100. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
  101. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
  102. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
  103. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
  104. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
  105. package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
  106. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
  107. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
  108. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
  109. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
  110. package/coverage/lcov-report/components/utils/index.html +0 -161
  111. package/coverage/lcov-report/config/index.html +0 -116
  112. package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
  113. package/coverage/lcov-report/favicon.png +0 -0
  114. package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
  115. package/coverage/lcov-report/helpers/index.html +0 -116
  116. package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
  117. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
  118. package/coverage/lcov-report/index.html +0 -191
  119. package/coverage/lcov-report/prettify.css +0 -1
  120. package/coverage/lcov-report/prettify.js +0 -2
  121. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  122. package/coverage/lcov-report/sorter.js +0 -196
  123. package/coverage/lcov-report/test/index.html +0 -116
  124. package/coverage/lcov-report/test/mocks.js.html +0 -457
  125. package/coverage/lcov.info +0 -403
  126. package/i18n/en-US/components/content/blocks/tab.ts +0 -4
  127. package/lib/helpers/GlossaryHelper.d.ts +0 -9
  128. package/lib/helpers/GlossaryHelper.js +0 -118
  129. package/lib/helpers/GlossaryTerm.d.ts +0 -10
  130. package/lib/helpers/GlossaryTerm.js +0 -22
  131. package/lib/helpers/MathHelper.d.ts +0 -99
  132. package/lib/helpers/MathHelper.js +0 -194
  133. package/lib/helpers/tinymce/plugin.d.ts +0 -2
  134. package/lib/helpers/tinymce/plugin.js +0 -86
  135. package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
  136. package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
  137. package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
  138. package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
  139. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
  140. package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
  141. package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
  142. package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
  143. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
  144. package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
  145. package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
  146. package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
  147. package/lib/i18n/en-US/components/content/index.d.ts +0 -77
  148. package/lib/i18n/en-US/components/content/index.js +0 -6
  149. package/lib/i18n/en-US/components/index.d.ts +0 -140
  150. package/lib/i18n/en-US/components/index.js +0 -12
  151. package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
  152. package/lib/i18n/en-US/components/navigation/image.js +0 -6
  153. package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
  154. package/lib/i18n/en-US/components/navigation/index.js +0 -8
  155. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
  156. package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
  157. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
  158. package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
  159. package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
  160. package/lib/i18n/en-US/components/settings/image.js +0 -3
  161. package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
  162. package/lib/i18n/en-US/components/settings/index.js +0 -14
  163. package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
  164. package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
  165. package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
  166. package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
  167. package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
  168. package/lib/i18n/en-US/components/settings/video.js +0 -14
  169. package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
  170. package/lib/i18n/en-US/components/utils/index.js +0 -6
  171. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
  172. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
  173. package/lib/i18n/en-US/index.d.ts +0 -197
  174. package/lib/i18n/en-US/index.js +0 -16
  175. package/lib/i18n/en-US/modules/index.d.ts +0 -2
  176. package/lib/i18n/en-US/modules/index.js +0 -6
  177. package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
  178. package/lib/i18n/en-US/pages/glossary.js +0 -9
  179. package/lib/i18n/en-US/pages/index.d.ts +0 -13
  180. package/lib/i18n/en-US/pages/index.js +0 -8
  181. package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
  182. package/lib/i18n/en-US/pages/user_upload.js +0 -5
  183. package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
  184. package/lib/i18n/en-US/shared/content_blocks.js +0 -21
  185. package/lib/i18n/en-US/shared/index.d.ts +0 -39
  186. package/lib/i18n/en-US/shared/index.js +0 -10
  187. package/lib/i18n/en-US/shared/menu.d.ts +0 -4
  188. package/lib/i18n/en-US/shared/menu.js +0 -5
  189. package/lib/i18n/en-US/shared/settings.d.ts +0 -15
  190. package/lib/i18n/en-US/shared/settings.js +0 -16
  191. package/lib/i18n/en-US.d.ts +0 -197
  192. package/lib/i18n/en-US.js +0 -15
  193. package/lib/models/UserFileAsset.d.ts +0 -5
  194. package/lib/models/UserFileAsset.js +0 -37
@@ -1,60 +1,69 @@
1
1
  <template>
2
2
  <div>
3
- <v-btn color="primary" @click="onAddElement" class="fullWidth">
4
- <v-icon>mdi-plus</v-icon>
5
- {{ $t('windward.core.components.content.blocks.tab.add_tab') }}
6
- </v-btn>
7
- <v-expansion-panels flat v-model="block.metadata.config.tab">
8
- <v-expansion-panel
9
- v-for="(item, itemIndex) in block.metadata.config.items"
10
- :key="itemIndex"
11
- class="elevation-0"
3
+ <v-form ref="form" v-model="valid" v-if="!loading">
4
+ <v-divider class="my-4 primary"></v-divider>
5
+ <p>{{ $t('windward.core.components.settings.tab.tabs') }}</p>
6
+ <SortableExpansionPanel
7
+ v-model="block.metadata.config.items"
8
+ @change="onDragged"
9
+ @click:close="onRemoveElement($event)"
12
10
  >
13
- <v-expansion-panel-header>{{
14
- 'Tab ' + (itemIndex + 1)
15
- }}</v-expansion-panel-header>
16
- <v-expansion-panel-content :key="expansionPanelKey">
17
- <v-text-field
18
- v-model="
19
- block.metadata.config.items[itemIndex].tabHeader
20
- "
21
- :placeholder="'item ' + (itemIndex + 1)"
22
- ></v-text-field>
23
- <v-btn @click="onToggleExpand(item)" class="mb-3">
24
- <v-icon
25
- v-if="
26
- !block.metadata.config.items[itemIndex].expand
11
+ <template #header="{ item }">
12
+ {{ item.tabHeader !== '' ? item.tabHeader : 'No Header' }}
13
+ </template>
14
+ <template #body="{ item, index }">
15
+ <v-container :key="expansionPanelKey">
16
+ <p class="p-label">
17
+ {{
18
+ $t(
19
+ 'windward.core.components.settings.tab.header'
20
+ )
21
+ }}
22
+ </p>
23
+ <v-text-field
24
+ outlined
25
+ :autofocus="true"
26
+ v-model="
27
+ block.metadata.config.items[index].tabHeader
27
28
  "
28
- >mdi-arrow-expand-all</v-icon
29
- >
30
- <v-icon
31
- v-if="block.metadata.config.items[itemIndex].expand"
32
- >
33
- mdi-arrow-collapse-all
34
- </v-icon>
35
- </v-btn>
36
- <br />
37
- <TextEditor
38
- :api_key="api_key"
39
- v-model="block.metadata.config.items[itemIndex].content"
40
- v-show="!block.metadata.config.items[itemIndex].expand"
41
- ></TextEditor>
42
- <br />
43
- <v-btn
44
- color="primary"
45
- @click="onRemoveElement(itemIndex)"
46
- class="fullWidth"
47
- >
48
- <v-icon>mdi-minus</v-icon>
49
- {{
50
- $t(
51
- 'windward.core.components.content.blocks.tab.delete_tab'
52
- )
53
- }}
54
- </v-btn>
55
- </v-expansion-panel-content>
56
- </v-expansion-panel>
57
- </v-expansion-panels>
29
+ :placeholder="'item ' + (index + 1)"
30
+ ></v-text-field>
31
+ <v-btn @click="onToggleExpand(index)" class="mb-3">
32
+ <v-icon
33
+ v-if="
34
+ !block.metadata.config.items[index].expand
35
+ "
36
+ >mdi-arrow-expand-all</v-icon
37
+ >
38
+ <v-icon
39
+ v-if="block.metadata.config.items[index].expand"
40
+ >
41
+ mdi-arrow-collapse-all
42
+ </v-icon>
43
+ </v-btn>
44
+ <TextEditor
45
+ v-model="block.metadata.config.items[index].content"
46
+ v-if="!item.expand"
47
+ :key="textEditorUpdateKey"
48
+ ></TextEditor>
49
+ </v-container>
50
+ </template>
51
+ </SortableExpansionPanel>
52
+ <v-row justify="center" class="my-4">
53
+ <v-btn color="primary" @click="onAddElement">
54
+ <v-icon>mdi-plus</v-icon>
55
+ {{ $t('windward.core.components.settings.tab.add_tab') }}
56
+ </v-btn>
57
+ </v-row>
58
+ </v-form>
59
+ <div v-if="loading" class="text-center">
60
+ <v-progress-circular
61
+ :size="70"
62
+ :width="7"
63
+ color="primary"
64
+ indeterminate
65
+ ></v-progress-circular>
66
+ </div>
58
67
  </div>
59
68
  </template>
60
69
 
@@ -63,17 +72,20 @@ import _, { get } from 'lodash'
63
72
  import Crypto from '~/helpers/Crypto'
64
73
  import TextEditor from '~/components/Text/TextEditor.vue'
65
74
  import BaseContentSettings from '~/components/Content/Tool/BaseContentSettings.js'
75
+ import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
66
76
 
67
77
  export default {
68
78
  name: 'TabSettings',
69
- components: { TextEditor },
79
+ components: { TextEditor, SortableExpansionPanel },
70
80
  extends: BaseContentSettings,
71
81
  beforeMount() {
72
82
  if (_.isEmpty(this.block)) {
73
83
  this.block = {}
74
84
  }
75
85
  if (_.isEmpty(this.block.body)) {
76
- this.block.body = ''
86
+ this.block.body = this.$t(
87
+ 'windward.core.components.settings.tab.tab'
88
+ )
77
89
  }
78
90
  if (_.isEmpty(this.block.metadata)) {
79
91
  this.block.metadata = {}
@@ -93,12 +105,13 @@ export default {
93
105
  this.block.metadata.config.items = []
94
106
  this.block.metadata.config.items.push(defaultObject)
95
107
  }
96
- this.block.body = 'tab'
97
108
  },
98
109
  data() {
99
110
  return {
100
111
  expansionPanelKey: '0',
101
- api_key: process.env.TINY_MCE_API_KEY,
112
+ textEditorUpdateKey: Crypto.id(),
113
+ valid: true,
114
+ loading: false,
102
115
  }
103
116
  },
104
117
  mounted() {
@@ -111,7 +124,6 @@ export default {
111
124
  clearTimeout(this.debouncer)
112
125
  }
113
126
  },
114
-
115
127
  methods: {
116
128
  onAddElement() {
117
129
  const defaultObject = {
@@ -125,9 +137,13 @@ export default {
125
137
  this.block.metadata.config.items.splice(index, 1)
126
138
  this.expansionPanelKey = Crypto.id()
127
139
  },
128
- onToggleExpand(item) {
140
+ onToggleExpand(index) {
129
141
  this.expansionPanelKey = Crypto.id()
130
- return (item.expand = !item.expand)
142
+ return (this.block.metadata.config.items[index].expand =
143
+ !this.block.metadata.config.items[index].expand)
144
+ },
145
+ onDragged() {
146
+ this.textEditorUpdateKey = Crypto.id()
131
147
  },
132
148
  },
133
149
  }
@@ -136,7 +152,8 @@ export default {
136
152
  .v-progress-circular {
137
153
  margin: 1rem;
138
154
  }
139
- .fullWidth {
140
- width: 100%;
155
+ .p-label {
156
+ font-size: 16px;
157
+ font-weight: 500;
141
158
  }
142
159
  </style>
@@ -100,9 +100,7 @@
100
100
  <br />
101
101
  <text-editor
102
102
  v-model="block.body"
103
- v-show="
104
- settingSelector.includes(1) && !block.metadata.config.expand
105
- "
103
+ v-if="settingSelector.includes(1) && !block.metadata.config.expand"
106
104
  autofill
107
105
  ></text-editor>
108
106
  <v-skeleton-loader
@@ -133,7 +133,10 @@ export default {
133
133
 
134
134
  computed: {
135
135
  answerIsCorrect() {
136
- if (_.toLower(this.answer) === _.toLower(this.userInput)) {
136
+ if (
137
+ _.trim(_.toLower(this.answer)) ===
138
+ _.trim(_.toLower(this.userInput))
139
+ ) {
137
140
  return true
138
141
  }
139
142
  return false
@@ -1,14 +1,23 @@
1
1
  <template>
2
2
  <div>
3
3
  <v-card flat class="py-12">
4
- <label>Add Math Below</label>
5
- <math-live-wrapper
6
- ref="mathfield"
7
- v-model="formula"
8
- :options="options"
9
- :value="value"
10
- @change="submit"
11
- ></math-live-wrapper>
4
+ <v-card-title>
5
+ {{
6
+ $t(
7
+ 'windward.core.components.utils.math_expression_editor.title'
8
+ )
9
+ }}
10
+ </v-card-title>
11
+ <v-card-text>
12
+ <math-live-wrapper
13
+ ref="mathfield"
14
+ v-model="formula"
15
+ :id="mathElementId"
16
+ :options="options"
17
+ :value="value"
18
+ @change="submit"
19
+ ></math-live-wrapper>
20
+ </v-card-text>
12
21
  </v-card>
13
22
  <v-card>
14
23
  <v-card-text>
@@ -115,6 +124,7 @@
115
124
  import MathHelper from '../../helpers/MathHelper'
116
125
  import MathLiveWrapper from './MathLiveWrapper'
117
126
  import tinymceConfig from '../../config/tinymce.config'
127
+ import Crypto from '~/helpers/Crypto'
118
128
  export default {
119
129
  components: { MathLiveWrapper },
120
130
  layout: 'plugin',
@@ -140,6 +150,7 @@ export default {
140
150
  tab: null,
141
151
  toggle_exclusive: true,
142
152
  panel: [],
153
+ mathElementId: '',
143
154
  }
144
155
  },
145
156
  computed: {
@@ -158,6 +169,7 @@ export default {
158
169
  },
159
170
  },
160
171
  beforeMount() {
172
+ this.mathElementId = Crypto.id()
161
173
  if (this.mode === 'standalone') {
162
174
  this.initStandaloneMode()
163
175
  }
@@ -172,7 +184,6 @@ export default {
172
184
  '*'
173
185
  )
174
186
  }
175
- this.$refs.mathfield.focus()
176
187
  },
177
188
  created() {
178
189
  if (this.mode === 'plugin') {
@@ -263,24 +274,28 @@ export default {
263
274
  }
264
275
  </script>
265
276
 
266
- <style scoped>
277
+ <style lang="scss" scoped>
267
278
  /* stylelint-disable-next-line selector-type-no-unknown */
268
279
  math-field {
269
280
  min-height: 150px;
270
- outline: 2px solid #64b5f6;
281
+ outline: 2px solid var(--v-primary-base);
271
282
  border-radius: 4px;
283
+ width: 100%;
284
+ background: var(--v-background-base);
285
+ color: var(--v-primary-base);
272
286
  }
273
287
  /* stylelint-disable-next-line selector-type-no-unknown */
274
288
  math-field:focus-within {
275
- outline: 4px solid #52d70b;
289
+ outline: 2px solid var(--v-secondary-base);
276
290
  border-radius: 4px;
277
- background: rgba(251, 187, 182, 0.1);
291
+ background: var(--v-background-base);
292
+ color: var(--v-primary-base);
278
293
  }
279
294
  .btn {
280
295
  cursor: pointer;
281
296
  margin: 0 5px 5px 0;
282
297
  border: 1px solid #595959;
283
- background: white;
298
+ background: var(--v-background-base);
284
299
  border-radius: 5px;
285
300
  padding: 5px 10px;
286
301
  min-height: 40px;
@@ -288,7 +303,7 @@ math-field:focus-within {
288
303
 
289
304
  .btn:hover {
290
305
  background: #595959;
291
- color: white;
306
+ color: var(--v-background-base);
292
307
  }
293
308
  .adjustFont {
294
309
  font-size: 12px !important;
@@ -37,6 +37,7 @@ export default {
37
37
  default:
38
38
  'undo redo | formatselect | fontsizeselect | bold italic underline strikethrough removeformat | alignleft aligncenter alignright | table bullist numlist outdent indent | mathButton ',
39
39
  },
40
+ root_block: { type: String, required: false, default: 'div' },
40
41
  },
41
42
  beforeMount() {
42
43
  this.text = this.value
@@ -61,6 +62,7 @@ export default {
61
62
  return {
62
63
  height: 500,
63
64
  visual: false,
65
+ forced_root_block: this.root_block,
64
66
  menubar: this.menubar,
65
67
  menu: {
66
68
  insert: {
@@ -190,7 +192,7 @@ export default {
190
192
  contenteditable: 'true',
191
193
  'data-feedback': btoa(
192
194
  this.$t(
193
- 'windward.core.components.utils.fill_in_the_blank.fill_in_blank_input.default.description'
195
+ 'windward.core.components.utils.fill_in_the_blank.fill_in_blank_input.default_description'
194
196
  )
195
197
  ),
196
198
  },
@@ -1,5 +1,3 @@
1
- import * as _ from "lodash";
2
- import GlossaryTerm from "~/helpers/GlossaryTerm";
3
1
 
4
2
  export default class FillInBlankHelper {
5
3
 
@@ -0,0 +1,3 @@
1
+ export default {
2
+ body: 'Blockquote Body',
3
+ }
@@ -2,18 +2,20 @@ import user_upload from './user_upload'
2
2
  import image from './image'
3
3
  import video from './video'
4
4
  import table from './table'
5
- import tab from './tab'
6
5
  import feedback from './feedback'
7
6
  import open_response from './open_response'
8
7
  import open_response_collate from './open_response_collate'
8
+ import scenarioChoice from './scenario_choice'
9
+ import block_quote from './block_quote'
9
10
 
10
11
  export default {
11
12
  user_upload,
12
13
  image,
13
14
  video,
14
15
  table,
15
- tab,
16
16
  feedback,
17
17
  open_response,
18
18
  open_response_collate,
19
+ scenario_choice: scenarioChoice,
20
+ block_quote
19
21
  }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ information: 'Click one of the items below to make a choice.',
3
+ try_again: 'Try again',
4
+ selected_choice: 'Your choice',
5
+ }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ items: 'Accordion Items',
3
+ add: 'Add Accordion',
4
+ accordion: 'Accordion',
5
+ }
@@ -0,0 +1,9 @@
1
+ export default {
2
+ block_quote: 'Block Quote',
3
+ body: 'Blockquote Body',
4
+ name: 'Name',
5
+ title: 'Title',
6
+ org: 'Organization',
7
+ source_title: 'Source Title',
8
+ type: 'Source Type',
9
+ }
@@ -2,8 +2,16 @@ export default {
2
2
  title: 'Title',
3
3
  description: 'Description',
4
4
  information: 'Click on each of the list items below for more information.',
5
+ no_icon: 'No Icon',
5
6
  item_icon: 'Item {0} icon',
6
7
  item_title: 'Item Title',
7
8
  item_color: 'Item Color',
8
9
  item_text: 'Item Text',
10
+ autocolor: 'Auto-color Options',
11
+ display: {
12
+ show_title: 'Always Show Title',
13
+ show_background: 'Show Background',
14
+ round_icon: 'Round Icons',
15
+ italic_icon: 'Italic Icons',
16
+ },
9
17
  }
@@ -5,13 +5,21 @@ import video from './video'
5
5
  import clickable_icon from './clickable_icon'
6
6
  import open_response from './open_response'
7
7
  import open_response_collate from './open_response_collate'
8
+ import scenarioChoice from './scenario_choice'
9
+ import accordion from './accordion'
10
+ import tab from './tab'
11
+ import block_quote from './block_quote'
8
12
 
9
13
  export default {
14
+ accordion,
10
15
  image,
11
16
  user_upload,
12
17
  text_editor,
18
+ tab,
13
19
  video,
14
20
  clickable_icon,
15
21
  open_response,
16
22
  open_response_collate,
23
+ scenario_choice: scenarioChoice,
24
+ block_quote,
17
25
  }
@@ -0,0 +1,19 @@
1
+ export default {
2
+ title: 'Title',
3
+ description: 'Description',
4
+ over_item_limit: 'Cannot add more items',
5
+ no_title: 'No Title',
6
+ item_title: 'Item Title',
7
+ item_text: 'Item Text',
8
+ correct_choice: 'Is Correct Choice',
9
+ show_reset: 'Allow Retries',
10
+ display_style: 'Display Style',
11
+ is_linked: 'Block links to a page',
12
+ link_content: 'Link Content',
13
+ link_text: 'Link Text',
14
+ link_required: 'Link text and target page are required',
15
+ style: {
16
+ letter: 'Letters',
17
+ number: 'Numbers',
18
+ },
19
+ }
@@ -0,0 +1,7 @@
1
+ export default {
2
+ tab: 'Tab',
3
+ tabs: 'Tabs',
4
+ header: 'Tab Header',
5
+ add_tab: 'Add Tab',
6
+ delete_tab: 'Delete Tab',
7
+ }
@@ -5,7 +5,7 @@ export default {
5
5
  check_answer: 'Click to check answer',
6
6
  close: 'Close',
7
7
  correct: 'Correct',
8
- default_description: 'default description',
8
+ default_description: 'Your input is correct',
9
9
  incorrect: 'Incorrect',
10
10
  input_incorrect: "'{0}' is incorrect",
11
11
  reset: 'reset',
@@ -1,6 +1,8 @@
1
1
  import tiny_mce_wrapper from './tiny_mce_wrapper'
2
2
  import fill_in_the_blank from './FillInBlank/index'
3
+ import math_expression_editor from './math_expression_editor'
3
4
  export default {
4
5
  tiny_mce_wrapper,
5
6
  fill_in_the_blank,
7
+ math_expression_editor,
6
8
  }
@@ -0,0 +1,3 @@
1
+ export default {
2
+ title: 'Mathematical Expression editor',
3
+ }
@@ -12,7 +12,9 @@ export default {
12
12
  image: 'Image',
13
13
  user_upload: 'User Upload',
14
14
  clickable_icons: 'Clickable Icons',
15
+ scenario_choice: 'Scenario Choice',
15
16
  feedback: 'Feedback',
17
+ block_quote: 'Block Quote',
16
18
  },
17
19
  grouping: {
18
20
  basic: 'Basic Components',
@@ -8,10 +8,14 @@ export default {
8
8
  tab_settings: 'Tab Settings',
9
9
  text_editor: 'Text Editor Settings',
10
10
  clickable_icons: 'Clickable Icons Settings',
11
+ scenario_choice: 'Scenario Choice',
11
12
  accordion: 'Accordion Settings',
12
13
  video: 'Video Settings',
13
14
  table: 'Table Settings',
14
15
  math: 'Math Settings',
15
16
  feedback: 'Feedback Settings',
17
+ block_quote: 'Block Quote Settings',
18
+ title: 'Title',
19
+ instructions: 'Instructions',
16
20
  },
17
21
  }
@@ -0,0 +1,3 @@
1
+ export default {
2
+ body: 'Cuerpo de la cotización en bloque',
3
+ }
@@ -4,6 +4,8 @@ export default {
4
4
  module: 'Módulo',
5
5
  preset: 'Preajustes',
6
6
  likert: 'Agregar preguntas tipo Likert estándar',
7
+ likert_directions:
8
+ 'Haga clic para elegir la primera opción y luego use la pestaña para cambiar los grupos de botones y luego las flechas para navegar entre las opciones.',
7
9
  contact_mindedge: 'Póngase en contacto con Mindedge pregunta',
8
10
  open_response: 'Respuesta abierta',
9
11
  response_prompt: 'Proporcione comentarios sobre el curso a continuación',
@@ -2,18 +2,20 @@ import user_upload from './user_upload'
2
2
  import image from './image'
3
3
  import video from './video'
4
4
  import table from './table'
5
- import tab from './tab'
6
5
  import feedback from './feedback'
7
6
  import open_response from './open_response'
8
7
  import open_response_collate from './open_response_collate'
8
+ import scenarioChoice from './scenario_choice'
9
+ import block_quote from './block_quote'
9
10
 
10
11
  export default {
11
12
  user_upload,
12
13
  image,
13
14
  video,
14
15
  table,
15
- tab,
16
16
  feedback,
17
17
  open_response,
18
18
  open_response_collate,
19
+ scenario_choice: scenarioChoice,
20
+ block_quote
19
21
  }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ information:
3
+ 'Haga clic en uno de los elementos siguientes para tomar una decisión.',
4
+ try_again: 'Inténtalo de nuevo',
5
+ selected_choice: 'Tu elección',
6
+ }
@@ -1,7 +1,9 @@
1
+ import ask_the_expert from './ask_the_expert'
1
2
  import user_upload from './user_upload'
2
3
  import image from './image'
3
4
 
4
5
  export default {
5
6
  user_upload,
6
7
  image,
8
+ ask_the_expert,
7
9
  }
@@ -0,0 +1,5 @@
1
+ export default {
2
+ items: 'Artículos de acordeón',
3
+ add: 'Agregar Acordeón',
4
+ accordion: 'Acordeón',
5
+ }
@@ -0,0 +1,9 @@
1
+ export default {
2
+ block_quote: 'Cita en bloque',
3
+ body: 'Cuerpo de la cita en bloque',
4
+ name: 'Nombre',
5
+ title: 'Título',
6
+ org: 'Organización',
7
+ source_title: 'Título de la fuente' ,
8
+ type: 'Tipo de fuente',
9
+ }
@@ -3,8 +3,16 @@ export default {
3
3
  description: 'Descripción',
4
4
  information:
5
5
  'Haga clic en cada uno de los elementos de la lista a continuación para obtener más información.',
6
+ no_icon: 'Sin icono',
6
7
  item_icon: 'Ícono de elemento {0}',
7
8
  item_title: 'Título del artículo',
8
9
  item_color: 'Color del artículo',
9
10
  item_text: 'Texto del elemento',
11
+ autocolor: 'Opciones de color automático',
12
+ display: {
13
+ show_title: 'Mostrar siempre el título',
14
+ show_background: 'Mostrar fondo',
15
+ round_icon: 'Iconos redondos',
16
+ italic_icon: 'Iconos en cursiva',
17
+ },
10
18
  }
@@ -5,13 +5,21 @@ import video from './video'
5
5
  import clickable_icon from './clickable_icon'
6
6
  import open_response from './open_response'
7
7
  import open_response_collate from './open_response_collate'
8
+ import scenarioChoice from './scenario_choice'
9
+ import accordion from './accordion'
10
+ import tab from './tab'
11
+ import block_quote from './block_quote'
8
12
 
9
13
  export default {
14
+ accordion,
10
15
  image,
11
16
  user_upload,
12
17
  text_editor,
18
+ tab,
13
19
  video,
14
20
  clickable_icon,
15
21
  open_response,
16
22
  open_response_collate,
23
+ scenario_choice: scenarioChoice,
24
+ block_quote
17
25
  }