@windward/core 0.2.3 → 0.4.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.
- package/babel.config.js +1 -1
- package/components/Content/Blocks/Accordion.vue +37 -0
- package/components/Content/Blocks/ClickableIcons.vue +107 -20
- package/components/Content/Blocks/Email.vue +9 -0
- package/components/Content/Blocks/Image.vue +48 -20
- package/components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue +1 -1
- package/components/Content/Blocks/UserUpload.vue +1 -1
- package/components/Content/Blocks/Video.vue +80 -9
- package/components/Navigation/Items/AskTheExpert.vue +2 -1
- package/components/Navigation/Items/CourseGlossaryToolNav.vue +2 -1
- package/components/Settings/AccordionSettings.vue +64 -4
- package/components/Settings/BlockQuoteSettings.vue +9 -1
- package/components/Settings/ClickableIconsSettings.vue +104 -13
- package/components/Settings/EmailSettings.vue +13 -13
- package/components/Settings/FeedbackSettings.vue +2 -1
- package/components/Settings/HorizontalRuleSettings.vue +2 -1
- package/components/Settings/ImageSettings.vue +148 -39
- package/components/Settings/MathSettings.vue +6 -5
- package/components/Settings/OpenResponseCollateSettings.vue +5 -1
- package/components/Settings/OpenResponseSettings.vue +9 -4
- package/components/Settings/ScenarioChoiceSettings.vue +15 -4
- package/components/Settings/TabSettings.vue +12 -4
- package/components/Settings/TextEditorSettings.vue +14 -7
- package/components/Settings/UserUploadSettings.vue +11 -4
- package/components/Settings/VideoSettings.vue +121 -66
- package/components/utils/ContentViewer.vue +6 -1
- package/components/utils/MathExpressionEditor.vue +10 -5
- package/components/utils/TinyMCEWrapper.vue +120 -19
- package/components/utils/assets/tinymce/content/dark/content.scss +4 -0
- package/components/utils/assets/tinymce/{css/content.scss → content/global.scss} +38 -37
- package/components/utils/assets/tinymce/content/light/content.scss +4 -0
- package/components/utils/assets/tinymce/ui/dark/content.scss +803 -0
- package/components/utils/assets/tinymce/ui/dark/skin.scss +4727 -0
- package/components/utils/assets/tinymce/ui/global.scss +19 -0
- package/components/utils/assets/tinymce/ui/light/content.scss +822 -0
- package/components/utils/assets/tinymce/ui/light/skin.scss +4731 -0
- package/components/utils/glossary/CourseGlossary.vue +4 -3
- package/components/utils/glossary/CourseGlossaryForm.vue +1 -1
- package/config/tinymce.config.ts +22 -14
- package/helpers/FillInBlankHelper.ts +34 -28
- package/helpers/GlossaryHelper.ts +90 -73
- package/helpers/MathHelper.ts +49 -28
- package/helpers/tinymce/plugin.ts +9 -7
- package/i18n/en-US/components/content/blocks/image.ts +1 -1
- package/i18n/en-US/components/settings/clickable_icon.ts +2 -0
- package/i18n/en-US/components/settings/image.ts +6 -1
- package/i18n/en-US/shared/settings.ts +3 -0
- package/i18n/es-ES/components/content/blocks/image.ts +1 -1
- package/i18n/es-ES/components/settings/clickable_icon.ts +2 -0
- package/i18n/es-ES/components/settings/image.ts +8 -1
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/components/content/blocks/image.ts +1 -1
- package/i18n/sv-SE/components/settings/clickable_icon.ts +2 -0
- package/i18n/sv-SE/components/settings/image.ts +6 -1
- package/i18n/sv-SE/shared/settings.ts +3 -0
- package/package.json +4 -3
- package/test/Components/Settings/AccordionSettings.spec.js +16 -2
- package/test/__mocks__/componentsMock.js +57 -97
- package/test/__mocks__/contentBlockMock.js +7 -1
- package/test/__mocks__/contentSettingsMock.js +8 -1
- package/test/__mocks__/helpersMock.js +9 -0
- package/test/__mocks__/modelMock.js +101 -31
- package/test/helpers/MathHelper.spec.js +22 -3
- package/tsconfig.json +1 -0
- package/.idea/codeStyles/Project.xml +0 -58
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php-docker-settings.xml +0 -24
- package/.idea/php.xml +0 -19
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/windward-ui-plugin-core.iml +0 -8
- package/coverage/clover.xml +0 -223
- package/coverage/coverage-final.json +0 -16
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
- package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
- package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
- package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
- package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
- package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
- package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
- package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
- package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
- package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
- package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
- package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
- package/coverage/lcov-report/components/utils/index.html +0 -161
- package/coverage/lcov-report/config/index.html +0 -116
- package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
- package/coverage/lcov-report/helpers/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
- package/coverage/lcov-report/index.html +0 -191
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov-report/test/mocks.js.html +0 -457
- package/coverage/lcov.info +0 -403
- package/lib/helpers/GlossaryHelper.d.ts +0 -9
- package/lib/helpers/GlossaryHelper.js +0 -118
- package/lib/helpers/GlossaryTerm.d.ts +0 -10
- package/lib/helpers/GlossaryTerm.js +0 -22
- package/lib/helpers/MathHelper.d.ts +0 -99
- package/lib/helpers/MathHelper.js +0 -194
- package/lib/helpers/tinymce/plugin.d.ts +0 -2
- package/lib/helpers/tinymce/plugin.js +0 -86
- package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
- package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
- package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
- package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
- package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
- package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
- package/lib/i18n/en-US/components/content/index.d.ts +0 -77
- package/lib/i18n/en-US/components/content/index.js +0 -6
- package/lib/i18n/en-US/components/index.d.ts +0 -140
- package/lib/i18n/en-US/components/index.js +0 -12
- package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
- package/lib/i18n/en-US/components/navigation/image.js +0 -6
- package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
- package/lib/i18n/en-US/components/navigation/index.js +0 -8
- package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
- package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
- package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
- package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
- package/lib/i18n/en-US/components/settings/image.js +0 -3
- package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
- package/lib/i18n/en-US/components/settings/index.js +0 -14
- package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
- package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
- package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
- package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
- package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
- package/lib/i18n/en-US/components/settings/video.js +0 -14
- package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
- package/lib/i18n/en-US/components/utils/index.js +0 -6
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
- package/lib/i18n/en-US/index.d.ts +0 -197
- package/lib/i18n/en-US/index.js +0 -16
- package/lib/i18n/en-US/modules/index.d.ts +0 -2
- package/lib/i18n/en-US/modules/index.js +0 -6
- package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
- package/lib/i18n/en-US/pages/glossary.js +0 -9
- package/lib/i18n/en-US/pages/index.d.ts +0 -13
- package/lib/i18n/en-US/pages/index.js +0 -8
- package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/pages/user_upload.js +0 -5
- package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
- package/lib/i18n/en-US/shared/content_blocks.js +0 -21
- package/lib/i18n/en-US/shared/index.d.ts +0 -39
- package/lib/i18n/en-US/shared/index.js +0 -10
- package/lib/i18n/en-US/shared/menu.d.ts +0 -4
- package/lib/i18n/en-US/shared/menu.js +0 -5
- package/lib/i18n/en-US/shared/settings.d.ts +0 -15
- package/lib/i18n/en-US/shared/settings.js +0 -16
- package/lib/i18n/en-US.d.ts +0 -197
- package/lib/i18n/en-US.js +0 -15
- package/lib/models/UserFileAsset.d.ts +0 -5
- package/lib/models/UserFileAsset.js +0 -37
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
<SortableExpansionPanel
|
|
12
12
|
v-model="block.metadata.config.items"
|
|
13
|
+
:disabled="render"
|
|
13
14
|
@click:close="onRemoveElement($event)"
|
|
14
15
|
@change="onDragged"
|
|
15
16
|
@update:currentPanel="onUpdatePanel"
|
|
@@ -34,15 +35,17 @@
|
|
|
34
35
|
'windward.core.shared.settings.title.title'
|
|
35
36
|
)
|
|
36
37
|
"
|
|
38
|
+
:disabled="render"
|
|
37
39
|
@focus="onTextAreaFocus"
|
|
38
40
|
></v-text-field>
|
|
39
41
|
<v-btn
|
|
42
|
+
text
|
|
43
|
+
:disabled="render"
|
|
40
44
|
@click="
|
|
41
45
|
onToggleExpand(
|
|
42
46
|
block.metadata.config.items[index]
|
|
43
47
|
)
|
|
44
48
|
"
|
|
45
|
-
text
|
|
46
49
|
>
|
|
47
50
|
<v-icon
|
|
48
51
|
v-if="
|
|
@@ -74,14 +77,65 @@
|
|
|
74
77
|
'windward.core.components.settings.accordion.label'
|
|
75
78
|
)
|
|
76
79
|
"
|
|
80
|
+
:disabled="render"
|
|
77
81
|
></TextEditor>
|
|
82
|
+
<v-container class="pa-0 pt-3">
|
|
83
|
+
<h4>
|
|
84
|
+
{{
|
|
85
|
+
$t(
|
|
86
|
+
'windward.core.shared.settings.upload_file'
|
|
87
|
+
)
|
|
88
|
+
}}
|
|
89
|
+
</h4>
|
|
90
|
+
<v-text-field
|
|
91
|
+
v-model="
|
|
92
|
+
block.metadata.config.items[index]
|
|
93
|
+
.altText
|
|
94
|
+
"
|
|
95
|
+
class="pt-3 pb-3"
|
|
96
|
+
:hide-details="true"
|
|
97
|
+
dense
|
|
98
|
+
outlined
|
|
99
|
+
:autofocus="true"
|
|
100
|
+
:label="
|
|
101
|
+
$t(
|
|
102
|
+
'windward.core.shared.settings.alt_image'
|
|
103
|
+
)
|
|
104
|
+
"
|
|
105
|
+
></v-text-field>
|
|
106
|
+
<v-text-field
|
|
107
|
+
v-model="
|
|
108
|
+
block.metadata.config.items[index]
|
|
109
|
+
.ariaDescribedBy
|
|
110
|
+
"
|
|
111
|
+
class="pt-3 pb-3"
|
|
112
|
+
:hide-details="true"
|
|
113
|
+
dense
|
|
114
|
+
outlined
|
|
115
|
+
:label="
|
|
116
|
+
$t(
|
|
117
|
+
'windward.core.shared.settings.aria_described'
|
|
118
|
+
)
|
|
119
|
+
"
|
|
120
|
+
></v-text-field>
|
|
121
|
+
<ContentBlockAsset
|
|
122
|
+
v-model="
|
|
123
|
+
block.metadata.config.items[index].file
|
|
124
|
+
"
|
|
125
|
+
mimes="image/png,image/jpeg"
|
|
126
|
+
:assets.sync="block.assets"
|
|
127
|
+
></ContentBlockAsset>
|
|
128
|
+
</v-container>
|
|
78
129
|
</v-container>
|
|
79
130
|
</template>
|
|
80
131
|
</SortableExpansionPanel>
|
|
81
132
|
</v-container>
|
|
82
133
|
<v-container class="pa-0">
|
|
83
134
|
<v-row justify="center" class="my-4">
|
|
84
|
-
<v-btn
|
|
135
|
+
<v-btn
|
|
136
|
+
color="primary"
|
|
137
|
+
:disabled="render"
|
|
138
|
+
@click="onAddElement"
|
|
85
139
|
><v-icon>mdi-plus</v-icon
|
|
86
140
|
>{{
|
|
87
141
|
$t(
|
|
@@ -105,9 +159,9 @@
|
|
|
105
159
|
<script>
|
|
106
160
|
import _ from 'lodash'
|
|
107
161
|
import Crypto from '~/helpers/Crypto'
|
|
108
|
-
import BaseContentSettings from '~/components/Content/
|
|
162
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
109
163
|
import TextEditor from '~/components/Text/TextEditor'
|
|
110
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
164
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
111
165
|
|
|
112
166
|
export default {
|
|
113
167
|
name: 'AccordionSettings',
|
|
@@ -134,6 +188,9 @@ export default {
|
|
|
134
188
|
header: '',
|
|
135
189
|
expand: false,
|
|
136
190
|
content: '',
|
|
191
|
+
file: null,
|
|
192
|
+
altText: '',
|
|
193
|
+
ariaDescribedBy: '',
|
|
137
194
|
}
|
|
138
195
|
this.block.metadata.config.items = []
|
|
139
196
|
this.block.metadata.config.items.push(defaultObject)
|
|
@@ -173,6 +230,9 @@ export default {
|
|
|
173
230
|
header: '',
|
|
174
231
|
expand: false,
|
|
175
232
|
content: '',
|
|
233
|
+
file: null,
|
|
234
|
+
altText: '',
|
|
235
|
+
ariaDescribedBy: '',
|
|
176
236
|
}
|
|
177
237
|
this.block.metadata.config.items.push(default_item)
|
|
178
238
|
this.block.metadata.config.selectedPanels =
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
:autofocus="true"
|
|
10
10
|
:label="$t('windward.core.shared.settings.title.title')"
|
|
11
11
|
ref="title"
|
|
12
|
+
:disabled="render"
|
|
12
13
|
></v-text-field>
|
|
13
14
|
<v-textarea
|
|
14
15
|
v-model="block.metadata.config.instructions"
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
auto-grow
|
|
17
18
|
:counter="255"
|
|
18
19
|
:label="$t('windward.core.shared.settings.title.instructions')"
|
|
20
|
+
:disabled="render"
|
|
19
21
|
></v-textarea>
|
|
20
22
|
</v-container>
|
|
21
23
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
:label="
|
|
29
31
|
$t('windward.core.components.settings.block_quote.body')
|
|
30
32
|
"
|
|
33
|
+
:disabled="render"
|
|
31
34
|
></v-textarea>
|
|
32
35
|
</v-container>
|
|
33
36
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
:label="
|
|
40
43
|
$t('windward.core.components.settings.block_quote.name')
|
|
41
44
|
"
|
|
45
|
+
:disabled="render"
|
|
42
46
|
></v-text-field>
|
|
43
47
|
<v-text-field
|
|
44
48
|
v-model="block.metadata.config.block_quote.author_title"
|
|
@@ -47,12 +51,14 @@
|
|
|
47
51
|
:label="
|
|
48
52
|
$t('windward.core.components.settings.block_quote.title')
|
|
49
53
|
"
|
|
54
|
+
:disabled="render"
|
|
50
55
|
></v-text-field>
|
|
51
56
|
<v-text-field
|
|
52
57
|
v-model="block.metadata.config.block_quote.organization"
|
|
53
58
|
outlined
|
|
54
59
|
auto-grow
|
|
55
60
|
:label="$t('windward.core.components.settings.block_quote.org')"
|
|
61
|
+
:disabled="render"
|
|
56
62
|
></v-text-field>
|
|
57
63
|
<v-text-field
|
|
58
64
|
v-model="block.metadata.config.block_quote.source_title"
|
|
@@ -63,6 +69,7 @@
|
|
|
63
69
|
'windward.core.components.settings.block_quote.source_title'
|
|
64
70
|
)
|
|
65
71
|
"
|
|
72
|
+
:disabled="render"
|
|
66
73
|
></v-text-field>
|
|
67
74
|
<v-select
|
|
68
75
|
v-model="block.metadata.config.block_quote.source_type"
|
|
@@ -71,6 +78,7 @@
|
|
|
71
78
|
:label="
|
|
72
79
|
$t('windward.core.components.settings.block_quote.type')
|
|
73
80
|
"
|
|
81
|
+
:disabled="render"
|
|
74
82
|
></v-select>
|
|
75
83
|
</v-container>
|
|
76
84
|
<div v-if="loading" class="text-center">
|
|
@@ -85,7 +93,7 @@
|
|
|
85
93
|
</template>
|
|
86
94
|
<script>
|
|
87
95
|
import _ from 'lodash'
|
|
88
|
-
import BaseContentSettings from '~/components/Content/
|
|
96
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
89
97
|
|
|
90
98
|
export default {
|
|
91
99
|
name: 'BlockQuoteSettings',
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
'windward.core.components.settings.clickable_icon.title'
|
|
12
12
|
)
|
|
13
13
|
"
|
|
14
|
+
:disabled="render"
|
|
14
15
|
></v-text-field>
|
|
15
16
|
<v-text-field
|
|
16
17
|
v-model="block.metadata.config.description"
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
'windward.core.components.settings.clickable_icon.description'
|
|
22
23
|
)
|
|
23
24
|
"
|
|
25
|
+
:disabled="render"
|
|
24
26
|
></v-text-field>
|
|
25
27
|
<v-switch
|
|
26
28
|
v-model="block.metadata.config.display.show_title"
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
'windward.core.components.settings.clickable_icon.display.show_title'
|
|
30
32
|
)
|
|
31
33
|
"
|
|
34
|
+
:disabled="render"
|
|
32
35
|
></v-switch>
|
|
33
36
|
<v-switch
|
|
34
37
|
v-model="block.metadata.config.display.show_background"
|
|
@@ -37,6 +40,7 @@
|
|
|
37
40
|
'windward.core.components.settings.clickable_icon.display.show_background'
|
|
38
41
|
)
|
|
39
42
|
"
|
|
43
|
+
:disabled="render"
|
|
40
44
|
></v-switch>
|
|
41
45
|
<v-switch
|
|
42
46
|
v-model="block.metadata.config.display.round_icon"
|
|
@@ -45,6 +49,7 @@
|
|
|
45
49
|
'windward.core.components.settings.clickable_icon.display.round_icon'
|
|
46
50
|
)
|
|
47
51
|
"
|
|
52
|
+
:disabled="render"
|
|
48
53
|
></v-switch>
|
|
49
54
|
<v-switch
|
|
50
55
|
v-model="block.metadata.config.display.italic_icon"
|
|
@@ -53,6 +58,16 @@
|
|
|
53
58
|
'windward.core.components.settings.clickable_icon.display.italic_icon'
|
|
54
59
|
)
|
|
55
60
|
"
|
|
61
|
+
:disabled="render"
|
|
62
|
+
></v-switch>
|
|
63
|
+
<v-switch
|
|
64
|
+
v-model="block.metadata.config.display.large_icon"
|
|
65
|
+
:label="
|
|
66
|
+
$t(
|
|
67
|
+
'windward.core.components.settings.clickable_icon.display.large_icon'
|
|
68
|
+
)
|
|
69
|
+
"
|
|
70
|
+
:disabled="render"
|
|
56
71
|
></v-switch>
|
|
57
72
|
<v-switch
|
|
58
73
|
v-model="block.metadata.config.display.autocolor"
|
|
@@ -61,20 +76,35 @@
|
|
|
61
76
|
'windward.core.components.settings.clickable_icon.autocolor'
|
|
62
77
|
)
|
|
63
78
|
"
|
|
79
|
+
:disabled="render"
|
|
64
80
|
></v-switch>
|
|
65
81
|
</v-col>
|
|
66
82
|
<v-col class="pa-0">
|
|
67
83
|
<SortableExpansionPanel
|
|
68
84
|
v-model="block.metadata.config.items"
|
|
85
|
+
:disabled="render"
|
|
69
86
|
@click:close="onRemoveElement"
|
|
70
87
|
>
|
|
71
88
|
<template #header="{ item }">
|
|
72
|
-
<v-
|
|
73
|
-
item.
|
|
74
|
-
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
89
|
+
<v-avatar v-if="item.iconImage && item.iconAsset">
|
|
90
|
+
<v-img :src="getImagePublicUrl(item.iconAsset)" />
|
|
91
|
+
</v-avatar>
|
|
92
|
+
<v-icon
|
|
93
|
+
v-else-if="
|
|
94
|
+
!item.iconImage &&
|
|
95
|
+
item.icon &&
|
|
96
|
+
isIcon(item.icon)
|
|
97
|
+
"
|
|
98
|
+
>{{ item.icon }}</v-icon
|
|
99
|
+
>
|
|
100
|
+
<span
|
|
101
|
+
v-else-if="
|
|
102
|
+
!item.iconImage &&
|
|
103
|
+
item.icon &&
|
|
104
|
+
!isIcon(item.icon)
|
|
105
|
+
"
|
|
106
|
+
>{{ item.icon }}</span
|
|
107
|
+
>
|
|
78
108
|
<span v-else class="font-italic">
|
|
79
109
|
{{
|
|
80
110
|
$t(
|
|
@@ -85,7 +115,24 @@
|
|
|
85
115
|
</template>
|
|
86
116
|
<template #body="{ index }">
|
|
87
117
|
<v-container>
|
|
118
|
+
<v-switch
|
|
119
|
+
v-model="
|
|
120
|
+
block.metadata.config.items[index].iconImage
|
|
121
|
+
"
|
|
122
|
+
:label="
|
|
123
|
+
$t(
|
|
124
|
+
'windward.core.components.settings.clickable_icon.icon_image'
|
|
125
|
+
)
|
|
126
|
+
"
|
|
127
|
+
@click="onClickToggleIconImage(index)"
|
|
128
|
+
:disabled="render"
|
|
129
|
+
></v-switch>
|
|
130
|
+
|
|
88
131
|
<TextIconPicker
|
|
132
|
+
v-if="
|
|
133
|
+
!block.metadata.config.items[index]
|
|
134
|
+
.iconImage
|
|
135
|
+
"
|
|
89
136
|
v-model="
|
|
90
137
|
block.metadata.config.items[index].icon
|
|
91
138
|
"
|
|
@@ -95,7 +142,22 @@
|
|
|
95
142
|
[index + 1]
|
|
96
143
|
)
|
|
97
144
|
"
|
|
145
|
+
:disabled="render"
|
|
98
146
|
></TextIconPicker>
|
|
147
|
+
|
|
148
|
+
<ContentBlockAsset
|
|
149
|
+
v-if="
|
|
150
|
+
block.metadata.config.items[index].iconImage
|
|
151
|
+
"
|
|
152
|
+
v-model="
|
|
153
|
+
block.metadata.config.items[index].iconAsset
|
|
154
|
+
"
|
|
155
|
+
:assets.sync="block.assets"
|
|
156
|
+
class="mb-4"
|
|
157
|
+
mimes="image/jpeg,image/png,image/gif"
|
|
158
|
+
:disabled="render"
|
|
159
|
+
@click:file="onFileSelect($event, index)"
|
|
160
|
+
></ContentBlockAsset>
|
|
99
161
|
<v-text-field
|
|
100
162
|
v-model="
|
|
101
163
|
block.metadata.config.items[index].title
|
|
@@ -107,8 +169,8 @@
|
|
|
107
169
|
'windward.core.components.settings.clickable_icon.item_title'
|
|
108
170
|
)
|
|
109
171
|
"
|
|
172
|
+
:disabled="render"
|
|
110
173
|
></v-text-field>
|
|
111
|
-
|
|
112
174
|
<ColorPicker
|
|
113
175
|
v-if="!block.metadata.config.display.autocolor"
|
|
114
176
|
v-model="
|
|
@@ -119,6 +181,7 @@
|
|
|
119
181
|
'windward.core.components.settings.clickable_icon.item_color'
|
|
120
182
|
)
|
|
121
183
|
"
|
|
184
|
+
:disabled="render"
|
|
122
185
|
></ColorPicker>
|
|
123
186
|
<v-divider class="mt-3 mb-3" />
|
|
124
187
|
<span>{{
|
|
@@ -131,13 +194,14 @@
|
|
|
131
194
|
block.metadata.config.items[index].body
|
|
132
195
|
"
|
|
133
196
|
:height="200"
|
|
197
|
+
:disabled="render"
|
|
134
198
|
></TextEditor>
|
|
135
199
|
</v-container>
|
|
136
200
|
</template>
|
|
137
201
|
</SortableExpansionPanel>
|
|
138
202
|
</v-col>
|
|
139
203
|
<v-row justify="center" class="my-4">
|
|
140
|
-
<v-btn color="primary" @click="onAddElement"
|
|
204
|
+
<v-btn color="primary" :disabled="render" @click="onAddElement"
|
|
141
205
|
><v-icon>mdi-plus</v-icon
|
|
142
206
|
>{{ $t('shared.forms.add') }}</v-btn
|
|
143
207
|
>
|
|
@@ -147,11 +211,12 @@
|
|
|
147
211
|
</template>
|
|
148
212
|
<script>
|
|
149
213
|
import _ from 'lodash'
|
|
150
|
-
import BaseContentSettings from '~/components/Content/
|
|
214
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
151
215
|
import TextEditor from '~/components/Text/TextEditor'
|
|
152
|
-
import TextIconPicker from '~/components/TextIconPicker.vue'
|
|
153
|
-
import ColorPicker from '~/components/ColorPicker.vue'
|
|
154
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
216
|
+
import TextIconPicker from '~/components/Core/TextIconPicker.vue'
|
|
217
|
+
import ColorPicker from '~/components/Core/ColorPicker.vue'
|
|
218
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
219
|
+
import ContentBlockAsset from '~/components/Content/ContentBlockAsset.vue'
|
|
155
220
|
|
|
156
221
|
export default {
|
|
157
222
|
name: 'ClickableIconsSettings',
|
|
@@ -160,6 +225,7 @@ export default {
|
|
|
160
225
|
TextEditor,
|
|
161
226
|
TextIconPicker,
|
|
162
227
|
ColorPicker,
|
|
228
|
+
ContentBlockAsset,
|
|
163
229
|
},
|
|
164
230
|
extends: BaseContentSettings,
|
|
165
231
|
|
|
@@ -171,7 +237,9 @@ export default {
|
|
|
171
237
|
this.block = {}
|
|
172
238
|
}
|
|
173
239
|
if (_.isEmpty(this.block.body)) {
|
|
174
|
-
this.block.body = this.$t(
|
|
240
|
+
this.block.body = this.$t(
|
|
241
|
+
'windward.core.shared.content_blocks.title.clickable_icons'
|
|
242
|
+
)
|
|
175
243
|
}
|
|
176
244
|
if (_.isEmpty(this.block.metadata)) {
|
|
177
245
|
this.block.metadata = {}
|
|
@@ -188,6 +256,7 @@ export default {
|
|
|
188
256
|
show_background: false,
|
|
189
257
|
round_icon: false,
|
|
190
258
|
italic_icon: false,
|
|
259
|
+
large_icon: false,
|
|
191
260
|
autocolor: true,
|
|
192
261
|
}
|
|
193
262
|
}
|
|
@@ -204,6 +273,8 @@ export default {
|
|
|
204
273
|
onAddElement() {
|
|
205
274
|
const defaultObject = {
|
|
206
275
|
icon: '',
|
|
276
|
+
iconAsset: null,
|
|
277
|
+
iconImage: false,
|
|
207
278
|
title: '',
|
|
208
279
|
body: '<p></p>',
|
|
209
280
|
color: {
|
|
@@ -219,6 +290,26 @@ export default {
|
|
|
219
290
|
isIcon(str) {
|
|
220
291
|
return str && _.isString(str) && str.indexOf('mdi-') === 0
|
|
221
292
|
},
|
|
293
|
+
getImagePublicUrl(fileAssetId) {
|
|
294
|
+
const foundAsset = this.resolveAsset(fileAssetId)
|
|
295
|
+
|
|
296
|
+
return _.get(foundAsset, 'asset.public_url', null)
|
|
297
|
+
},
|
|
298
|
+
onClickToggleIconImage(index) {
|
|
299
|
+
// We're switching between images / text. Clear the relevant fields
|
|
300
|
+
this.block.metadata.config.items[index].icon = ''
|
|
301
|
+
this.block.metadata.config.items[index].iconAsset = null
|
|
302
|
+
},
|
|
303
|
+
onFileSelect(file, index) {
|
|
304
|
+
// file = null when you remove a file
|
|
305
|
+
if (_.isEmpty(file)) {
|
|
306
|
+
this.block.metadata.config.items[index].icon = null
|
|
307
|
+
} else {
|
|
308
|
+
this.block.assets.push(file)
|
|
309
|
+
this.block.metadata.config.items[index].icon =
|
|
310
|
+
file.file_asset_id
|
|
311
|
+
}
|
|
312
|
+
},
|
|
222
313
|
},
|
|
223
314
|
}
|
|
224
315
|
</script>
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
<v-form ref="form" v-model="valid" v-if="!loading"> </v-form>
|
|
4
4
|
<v-container class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
|
+
ref="title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
outlined
|
|
8
9
|
:counter="50"
|
|
9
10
|
:autofocus="true"
|
|
10
11
|
:label="$t('windward.core.shared.settings.title.title')"
|
|
11
|
-
|
|
12
|
+
:disabled="render"
|
|
12
13
|
></v-text-field>
|
|
13
14
|
<v-textarea
|
|
14
15
|
v-model="block.metadata.config.instructions"
|
|
@@ -16,6 +17,7 @@
|
|
|
16
17
|
auto-grow
|
|
17
18
|
:counter="255"
|
|
18
19
|
:label="$t('windward.core.shared.settings.title.instructions')"
|
|
20
|
+
:disabled="render"
|
|
19
21
|
></v-textarea>
|
|
20
22
|
</v-container>
|
|
21
23
|
<v-divider class="my-4 primary"></v-divider>
|
|
@@ -23,6 +25,7 @@
|
|
|
23
25
|
<p>{{ $t('windward.core.components.settings.email.items') }}</p>
|
|
24
26
|
<SortableExpansionPanel
|
|
25
27
|
v-model="block.metadata.config.emails"
|
|
28
|
+
:disabled="render"
|
|
26
29
|
@click:close="onRemoveElement($event)"
|
|
27
30
|
@change="onDragged"
|
|
28
31
|
@update:currentPanel="onUpdatePanel"
|
|
@@ -45,6 +48,7 @@
|
|
|
45
48
|
'windward.core.components.settings.email.from'
|
|
46
49
|
)
|
|
47
50
|
"
|
|
51
|
+
:disabled="render"
|
|
48
52
|
></v-text-field>
|
|
49
53
|
<v-text-field
|
|
50
54
|
v-model="block.metadata.config.emails[index].to"
|
|
@@ -52,6 +56,7 @@
|
|
|
52
56
|
:label="
|
|
53
57
|
$t('windward.core.components.settings.email.to')
|
|
54
58
|
"
|
|
59
|
+
:disabled="render"
|
|
55
60
|
></v-text-field>
|
|
56
61
|
<v-text-field
|
|
57
62
|
v-model="block.metadata.config.emails[index].cc"
|
|
@@ -59,6 +64,7 @@
|
|
|
59
64
|
:label="
|
|
60
65
|
$t('windward.core.components.settings.email.cc')
|
|
61
66
|
"
|
|
67
|
+
:disabled="render"
|
|
62
68
|
></v-text-field>
|
|
63
69
|
<v-text-field
|
|
64
70
|
v-model="
|
|
@@ -70,6 +76,7 @@
|
|
|
70
76
|
'windward.core.components.settings.email.subject'
|
|
71
77
|
)
|
|
72
78
|
"
|
|
79
|
+
:disabled="render"
|
|
73
80
|
></v-text-field>
|
|
74
81
|
<v-btn
|
|
75
82
|
@click="
|
|
@@ -79,6 +86,7 @@
|
|
|
79
86
|
)
|
|
80
87
|
"
|
|
81
88
|
text
|
|
89
|
+
:disabled="render"
|
|
82
90
|
>
|
|
83
91
|
<v-icon
|
|
84
92
|
v-if="
|
|
@@ -109,6 +117,7 @@
|
|
|
109
117
|
'windward.core.components.settings.email.placeholder'
|
|
110
118
|
)
|
|
111
119
|
"
|
|
120
|
+
:disabled="render"
|
|
112
121
|
></TextEditor>
|
|
113
122
|
</v-container>
|
|
114
123
|
</template>
|
|
@@ -116,7 +125,7 @@
|
|
|
116
125
|
</v-container>
|
|
117
126
|
<v-container class="pa-0">
|
|
118
127
|
<v-row justify="center" class="my-4">
|
|
119
|
-
<v-btn color="primary" @click="onAddElement"
|
|
128
|
+
<v-btn color="primary" :disabled="render" @click="onAddElement"
|
|
120
129
|
><v-icon>mdi-plus</v-icon
|
|
121
130
|
>{{
|
|
122
131
|
$t('windward.core.components.settings.email.add')
|
|
@@ -137,9 +146,9 @@
|
|
|
137
146
|
<script>
|
|
138
147
|
import _ from 'lodash'
|
|
139
148
|
import Crypto from '~/helpers/Crypto'
|
|
140
|
-
import BaseContentSettings from '~/components/Content/
|
|
149
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
141
150
|
import TextEditor from '~/components/Text/TextEditor'
|
|
142
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
151
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
143
152
|
|
|
144
153
|
export default {
|
|
145
154
|
name: 'EmailSettings',
|
|
@@ -201,15 +210,6 @@ export default {
|
|
|
201
210
|
this.block.metadata.config.selectedPanels = 0
|
|
202
211
|
},
|
|
203
212
|
methods: {
|
|
204
|
-
onBeforeSave() {
|
|
205
|
-
this.block.metadata.config.emails.forEach((element) => {
|
|
206
|
-
if (element.from) {
|
|
207
|
-
let matches = element.from.match(/\b(\w)/g)
|
|
208
|
-
element.initials = matches.join('')
|
|
209
|
-
}
|
|
210
|
-
element.tinymce_expand = false
|
|
211
|
-
})
|
|
212
|
-
},
|
|
213
213
|
onUpdatePanel($event) {
|
|
214
214
|
if ($event !== this.block.metadata.config.selectedPanels) {
|
|
215
215
|
//catch click event to open selected panel to edit
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
outlined
|
|
14
14
|
v-bind="attrs"
|
|
15
15
|
v-on="on"
|
|
16
|
+
:disabled="render"
|
|
16
17
|
@click="onPresetChoose(preset)"
|
|
17
18
|
>
|
|
18
19
|
<span>
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
|
|
30
31
|
<script>
|
|
31
32
|
import _ from 'lodash'
|
|
32
|
-
import BaseContentSettings from '~/components/Content/
|
|
33
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
33
34
|
import { mapGetters } from 'vuex'
|
|
34
35
|
|
|
35
36
|
import SurveyTemplate from '../../models/SurveyTemplate'
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
:label="
|
|
6
6
|
$t('windward.core.components.settings.horizontal_rule.dashed')
|
|
7
7
|
"
|
|
8
|
+
:disabled="render"
|
|
8
9
|
></v-switch>
|
|
9
10
|
</div>
|
|
10
11
|
</template>
|
|
11
12
|
|
|
12
13
|
<script>
|
|
13
14
|
import _ from 'lodash'
|
|
14
|
-
import BaseContentSettings from '~/components/Content/
|
|
15
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
15
16
|
|
|
16
17
|
export default {
|
|
17
18
|
name: 'HorizontalRuleSettings',
|