@windward/core 0.5.2 → 0.6.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/.idea/codeStyles/Project.xml +58 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/php-docker-settings.xml +24 -0
- package/.idea/php.xml +19 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/watcherTasks.xml +4 -0
- package/.idea/windward-ui-plugin-core.iml +8 -0
- package/CHANGELOG.md +4 -0
- package/components/Content/Blocks/Accordion.vue +14 -0
- package/components/Content/Blocks/ClickableIcons.vue +23 -20
- package/components/Content/Blocks/FileDownload.vue +6 -8
- package/components/Content/Blocks/ScenarioChoice.vue +1 -1
- package/components/Settings/AccordionSettings.vue +124 -137
- package/components/Settings/BlockQuoteSettings.vue +33 -2
- package/components/Settings/ClickableIconsSettings.vue +30 -10
- package/components/Settings/EmailSettings.vue +31 -4
- package/components/Settings/FileDownloadSettings.vue +28 -3
- package/components/Settings/ScenarioChoiceSettings.vue +30 -7
- package/components/Settings/TabSettings.vue +13 -3
- package/components/Settings/TextEditorSettings.vue +14 -2
- package/components/Settings/UserUploadSettings.vue +24 -3
- package/components/Settings/VideoSettings.vue +30 -0
- package/components/utils/TinyMCEWrapper.vue +22 -1
- package/config/menu.config.json +475 -0
- package/coverage/clover.xml +223 -0
- package/coverage/coverage-final.json +16 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +430 -0
- package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +394 -0
- package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +262 -0
- package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +295 -0
- package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +415 -0
- package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +667 -0
- package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +2275 -0
- package/coverage/lcov-report/components/Content/Blocks/index.html +206 -0
- package/coverage/lcov-report/components/utils/ContentViewer.vue.html +199 -0
- package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +919 -0
- package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +343 -0
- package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +271 -0
- package/coverage/lcov-report/components/utils/index.html +161 -0
- package/coverage/lcov-report/config/index.html +116 -0
- package/coverage/lcov-report/config/tinymce.config.js.html +493 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/MathHelper.ts.html +793 -0
- package/coverage/lcov-report/helpers/index.html +116 -0
- package/coverage/lcov-report/helpers/tinymce/index.html +116 -0
- package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +334 -0
- package/coverage/lcov-report/index.html +191 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov-report/test/mocks.js.html +457 -0
- package/coverage/lcov.info +403 -0
- package/i18n/en-US/shared/settings.ts +3 -0
- package/i18n/es-ES/shared/settings.ts +3 -0
- package/i18n/sv-SE/shared/settings.ts +3 -0
- package/lib/helpers/GlossaryHelper.d.ts +9 -0
- package/lib/helpers/GlossaryHelper.js +118 -0
- package/lib/helpers/GlossaryTerm.d.ts +10 -0
- package/lib/helpers/GlossaryTerm.js +22 -0
- package/lib/helpers/MathHelper.d.ts +99 -0
- package/lib/helpers/MathHelper.js +194 -0
- package/lib/helpers/tinymce/plugin.d.ts +2 -0
- package/lib/helpers/tinymce/plugin.js +86 -0
- package/lib/i18n/en-US/components/content/blocks/image.d.ts +6 -0
- package/lib/i18n/en-US/components/content/blocks/image.js +7 -0
- package/lib/i18n/en-US/components/content/blocks/index.d.ts +75 -0
- package/lib/i18n/en-US/components/content/blocks/index.js +14 -0
- package/lib/i18n/en-US/components/content/blocks/tab.d.ts +5 -0
- package/lib/i18n/en-US/components/content/blocks/tab.js +6 -0
- package/lib/i18n/en-US/components/content/blocks/table.d.ts +5 -0
- package/lib/i18n/en-US/components/content/blocks/table.js +6 -0
- package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +13 -0
- package/lib/i18n/en-US/components/content/blocks/user_upload.js +14 -0
- package/lib/i18n/en-US/components/content/blocks/video.d.ts +48 -0
- package/lib/i18n/en-US/components/content/blocks/video.js +49 -0
- package/lib/i18n/en-US/components/content/index.d.ts +77 -0
- package/lib/i18n/en-US/components/content/index.js +6 -0
- package/lib/i18n/en-US/components/index.d.ts +140 -0
- package/lib/i18n/en-US/components/index.js +12 -0
- package/lib/i18n/en-US/components/navigation/image.d.ts +5 -0
- package/lib/i18n/en-US/components/navigation/image.js +6 -0
- package/lib/i18n/en-US/components/navigation/index.d.ts +10 -0
- package/lib/i18n/en-US/components/navigation/index.js +8 -0
- package/lib/i18n/en-US/components/navigation/user_upload.d.ts +4 -0
- package/lib/i18n/en-US/components/navigation/user_upload.js +5 -0
- package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +6 -0
- package/lib/i18n/en-US/components/settings/clickable_icon.js +7 -0
- package/lib/i18n/en-US/components/settings/image.d.ts +2 -0
- package/lib/i18n/en-US/components/settings/image.js +3 -0
- package/lib/i18n/en-US/components/settings/index.d.ts +39 -0
- package/lib/i18n/en-US/components/settings/index.js +14 -0
- package/lib/i18n/en-US/components/settings/text_editor.d.ts +8 -0
- package/lib/i18n/en-US/components/settings/text_editor.js +9 -0
- package/lib/i18n/en-US/components/settings/user_upload.d.ts +12 -0
- package/lib/i18n/en-US/components/settings/user_upload.js +13 -0
- package/lib/i18n/en-US/components/settings/video.d.ts +13 -0
- package/lib/i18n/en-US/components/settings/video.js +14 -0
- package/lib/i18n/en-US/components/utils/index.d.ts +15 -0
- package/lib/i18n/en-US/components/utils/index.js +6 -0
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +13 -0
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +14 -0
- package/lib/i18n/en-US/index.d.ts +197 -0
- package/lib/i18n/en-US/index.js +16 -0
- package/lib/i18n/en-US/modules/index.d.ts +2 -0
- package/lib/i18n/en-US/modules/index.js +6 -0
- package/lib/i18n/en-US/pages/glossary.d.ts +8 -0
- package/lib/i18n/en-US/pages/glossary.js +9 -0
- package/lib/i18n/en-US/pages/index.d.ts +13 -0
- package/lib/i18n/en-US/pages/index.js +8 -0
- package/lib/i18n/en-US/pages/user_upload.d.ts +4 -0
- package/lib/i18n/en-US/pages/user_upload.js +5 -0
- package/lib/i18n/en-US/shared/content_blocks.d.ts +20 -0
- package/lib/i18n/en-US/shared/content_blocks.js +21 -0
- package/lib/i18n/en-US/shared/index.d.ts +39 -0
- package/lib/i18n/en-US/shared/index.js +10 -0
- package/lib/i18n/en-US/shared/menu.d.ts +4 -0
- package/lib/i18n/en-US/shared/menu.js +5 -0
- package/lib/i18n/en-US/shared/settings.d.ts +15 -0
- package/lib/i18n/en-US/shared/settings.js +16 -0
- package/lib/i18n/en-US.d.ts +197 -0
- package/lib/i18n/en-US.js +15 -0
- package/lib/models/UserFileAsset.d.ts +5 -0
- package/lib/models/UserFileAsset.js +37 -0
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-form ref="form" v-model="valid" v-if="!loading"> </v-form>
|
|
4
3
|
<v-container class="pa-0">
|
|
5
4
|
<v-text-field
|
|
6
5
|
v-model="block.metadata.config.title"
|
|
6
|
+
:autofocus="true"
|
|
7
7
|
outlined
|
|
8
8
|
:counter="50"
|
|
9
|
-
:
|
|
9
|
+
:rules="validation.shortInputRules"
|
|
10
10
|
:label="$t('components.content.settings.base.title')"
|
|
11
11
|
ref="title"
|
|
12
12
|
:disabled="render"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
v-model="block.metadata.config.instructions"
|
|
16
16
|
outlined
|
|
17
17
|
auto-grow
|
|
18
|
+
:rules="validation.longInputRules"
|
|
18
19
|
:counter="255"
|
|
19
20
|
:label="$t('components.content.settings.base.instructions')"
|
|
20
21
|
:disabled="render"
|
|
@@ -24,6 +25,10 @@
|
|
|
24
25
|
<v-container class="pa-0">
|
|
25
26
|
<TextEditor
|
|
26
27
|
v-model="block.metadata.config.block_quote.quote"
|
|
28
|
+
:rules="validation.longInputRules"
|
|
29
|
+
outlined
|
|
30
|
+
auto-grow
|
|
31
|
+
:counter="255"
|
|
27
32
|
:height="200"
|
|
28
33
|
:label="
|
|
29
34
|
$t('windward.core.components.settings.block_quote.body')
|
|
@@ -35,6 +40,8 @@
|
|
|
35
40
|
<v-container class="pa-0">
|
|
36
41
|
<v-text-field
|
|
37
42
|
v-model="block.metadata.config.block_quote.author"
|
|
43
|
+
:rules="validation.shortInputRules"
|
|
44
|
+
:counter="50"
|
|
38
45
|
outlined
|
|
39
46
|
auto-grow
|
|
40
47
|
:label="
|
|
@@ -45,6 +52,8 @@
|
|
|
45
52
|
<v-text-field
|
|
46
53
|
v-model="block.metadata.config.block_quote.author_title"
|
|
47
54
|
outlined
|
|
55
|
+
:rules="validation.shortInputRules"
|
|
56
|
+
:counter="50"
|
|
48
57
|
auto-grow
|
|
49
58
|
:label="
|
|
50
59
|
$t('windward.core.components.settings.block_quote.title')
|
|
@@ -53,6 +62,8 @@
|
|
|
53
62
|
></v-text-field>
|
|
54
63
|
<v-text-field
|
|
55
64
|
v-model="block.metadata.config.block_quote.organization"
|
|
65
|
+
:rules="validation.shortInputRules"
|
|
66
|
+
:counter="50"
|
|
56
67
|
outlined
|
|
57
68
|
auto-grow
|
|
58
69
|
:label="$t('windward.core.components.settings.block_quote.org')"
|
|
@@ -61,6 +72,8 @@
|
|
|
61
72
|
<v-text-field
|
|
62
73
|
v-model="block.metadata.config.block_quote.source_title"
|
|
63
74
|
outlined
|
|
75
|
+
:rules="validation.shortInputRules"
|
|
76
|
+
:counter="50"
|
|
64
77
|
auto-grow
|
|
65
78
|
:label="
|
|
66
79
|
$t(
|
|
@@ -169,6 +182,24 @@ export default {
|
|
|
169
182
|
value: 'online_journal',
|
|
170
183
|
},
|
|
171
184
|
],
|
|
185
|
+
validation: {
|
|
186
|
+
shortInputRules: [
|
|
187
|
+
(v) =>
|
|
188
|
+
v.length <= 50 ||
|
|
189
|
+
this.$t(
|
|
190
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
191
|
+
[50]
|
|
192
|
+
),
|
|
193
|
+
],
|
|
194
|
+
longInputRules: [
|
|
195
|
+
(v) =>
|
|
196
|
+
v.length <= 255 ||
|
|
197
|
+
this.$t(
|
|
198
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
199
|
+
[255]
|
|
200
|
+
),
|
|
201
|
+
],
|
|
202
|
+
},
|
|
172
203
|
}
|
|
173
204
|
},
|
|
174
205
|
methods: {},
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
<v-col class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
6
|
v-model="block.metadata.config.title"
|
|
7
|
+
:autofocus="true"
|
|
8
|
+
:rules="validation.shortInputRules"
|
|
9
|
+
:counter="50"
|
|
7
10
|
outlined
|
|
8
11
|
id="title"
|
|
9
12
|
:label="
|
|
@@ -13,17 +16,14 @@
|
|
|
13
16
|
"
|
|
14
17
|
:disabled="render"
|
|
15
18
|
></v-text-field>
|
|
16
|
-
<v-
|
|
19
|
+
<v-textarea
|
|
17
20
|
v-model="block.metadata.config.description"
|
|
21
|
+
:rules="validation.instructionRule"
|
|
22
|
+
:counter="255"
|
|
18
23
|
outlined
|
|
19
|
-
|
|
20
|
-
:label="
|
|
21
|
-
$t(
|
|
22
|
-
'windward.core.components.settings.clickable_icon.description'
|
|
23
|
-
)
|
|
24
|
-
"
|
|
24
|
+
:label="$t('components.content.settings.base.instructions')"
|
|
25
25
|
:disabled="render"
|
|
26
|
-
></v-
|
|
26
|
+
></v-textarea>
|
|
27
27
|
<v-switch
|
|
28
28
|
v-model="block.metadata.config.display.show_title"
|
|
29
29
|
:label="
|
|
@@ -164,6 +164,8 @@
|
|
|
164
164
|
"
|
|
165
165
|
:id="'item-' + index + '-title'"
|
|
166
166
|
outlined
|
|
167
|
+
:counter="50"
|
|
168
|
+
:rules="validation.shortInputRules"
|
|
167
169
|
:label="
|
|
168
170
|
$t(
|
|
169
171
|
'windward.core.components.settings.clickable_icon.item_title'
|
|
@@ -232,9 +234,27 @@ export default {
|
|
|
232
234
|
ContentBlockAsset,
|
|
233
235
|
},
|
|
234
236
|
extends: BaseContentSettings,
|
|
235
|
-
|
|
236
237
|
data() {
|
|
237
|
-
return {
|
|
238
|
+
return {
|
|
239
|
+
validation: {
|
|
240
|
+
shortInputRules: [
|
|
241
|
+
(v) =>
|
|
242
|
+
v.length <= 50 ||
|
|
243
|
+
this.$t(
|
|
244
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
245
|
+
[50]
|
|
246
|
+
),
|
|
247
|
+
],
|
|
248
|
+
instructionRule: [
|
|
249
|
+
(v) =>
|
|
250
|
+
v.length <= 255 ||
|
|
251
|
+
this.$t(
|
|
252
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
253
|
+
[255]
|
|
254
|
+
),
|
|
255
|
+
],
|
|
256
|
+
},
|
|
257
|
+
}
|
|
238
258
|
},
|
|
239
259
|
beforeMount() {
|
|
240
260
|
if (_.isEmpty(this.block)) {
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-form ref="form" v-model="valid" v-if="!loading"> </v-form>
|
|
4
3
|
<v-container class="pa-0">
|
|
5
4
|
<v-text-field
|
|
6
|
-
ref="title"
|
|
7
5
|
v-model="block.metadata.config.title"
|
|
6
|
+
:autofocus="true"
|
|
7
|
+
ref="title"
|
|
8
8
|
outlined
|
|
9
9
|
:counter="50"
|
|
10
|
-
:
|
|
10
|
+
:rules="validation.shortInputRules"
|
|
11
11
|
:label="$t('components.content.settings.base.title')"
|
|
12
12
|
:disabled="render"
|
|
13
13
|
></v-text-field>
|
|
14
14
|
<v-textarea
|
|
15
15
|
v-model="block.metadata.config.instructions"
|
|
16
16
|
outlined
|
|
17
|
+
:rules="validation.instructionRule"
|
|
17
18
|
auto-grow
|
|
18
19
|
:counter="255"
|
|
19
20
|
:label="$t('components.content.settings.base.instructions')"
|
|
@@ -41,7 +42,8 @@
|
|
|
41
42
|
<v-container :key="expansionPanelKey">
|
|
42
43
|
<v-text-field
|
|
43
44
|
v-model="block.metadata.config.emails[index].from"
|
|
44
|
-
:
|
|
45
|
+
:rules="validation.shortInputRules"
|
|
46
|
+
:counter="50"
|
|
45
47
|
outlined
|
|
46
48
|
:label="
|
|
47
49
|
$t(
|
|
@@ -52,6 +54,8 @@
|
|
|
52
54
|
></v-text-field>
|
|
53
55
|
<v-text-field
|
|
54
56
|
v-model="block.metadata.config.emails[index].to"
|
|
57
|
+
:rules="validation.shortInputRules"
|
|
58
|
+
:counter="50"
|
|
55
59
|
outlined
|
|
56
60
|
:label="
|
|
57
61
|
$t('windward.core.components.settings.email.to')
|
|
@@ -60,6 +64,8 @@
|
|
|
60
64
|
></v-text-field>
|
|
61
65
|
<v-text-field
|
|
62
66
|
v-model="block.metadata.config.emails[index].cc"
|
|
67
|
+
:rules="validation.shortInputRules"
|
|
68
|
+
:counter="50"
|
|
63
69
|
outlined
|
|
64
70
|
:label="
|
|
65
71
|
$t('windward.core.components.settings.email.cc')
|
|
@@ -70,6 +76,8 @@
|
|
|
70
76
|
v-model="
|
|
71
77
|
block.metadata.config.emails[index].subject
|
|
72
78
|
"
|
|
79
|
+
:rules="validation.shortInputRules"
|
|
80
|
+
:counter="50"
|
|
73
81
|
outlined
|
|
74
82
|
:label="
|
|
75
83
|
$t(
|
|
@@ -79,6 +87,7 @@
|
|
|
79
87
|
:disabled="render"
|
|
80
88
|
></v-text-field>
|
|
81
89
|
<v-btn
|
|
90
|
+
class="mb-4"
|
|
82
91
|
@click="
|
|
83
92
|
onToggleExpand(
|
|
84
93
|
block.metadata.config.emails[index],
|
|
@@ -204,6 +213,24 @@ export default {
|
|
|
204
213
|
loading: false,
|
|
205
214
|
expansionPanelKey: 0,
|
|
206
215
|
editingPanel: 0,
|
|
216
|
+
validation: {
|
|
217
|
+
shortInputRules: [
|
|
218
|
+
(v) =>
|
|
219
|
+
v.length <= 50 ||
|
|
220
|
+
this.$t(
|
|
221
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
222
|
+
[50]
|
|
223
|
+
),
|
|
224
|
+
],
|
|
225
|
+
instructionRule: [
|
|
226
|
+
(v) =>
|
|
227
|
+
v.length <= 255 ||
|
|
228
|
+
this.$t(
|
|
229
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
230
|
+
[255]
|
|
231
|
+
),
|
|
232
|
+
],
|
|
233
|
+
},
|
|
207
234
|
}
|
|
208
235
|
},
|
|
209
236
|
beforeDestroy() {
|
|
@@ -4,17 +4,21 @@
|
|
|
4
4
|
v-model="block.metadata.config.title"
|
|
5
5
|
outlined
|
|
6
6
|
:counter="50"
|
|
7
|
+
:rules="validation.shortInputRules"
|
|
7
8
|
:autofocus="true"
|
|
8
9
|
:label="$t('components.content.settings.base.title_optional')"
|
|
9
10
|
:disabled="render"
|
|
10
11
|
></v-text-field>
|
|
11
|
-
<
|
|
12
|
+
<v-textarea
|
|
12
13
|
v-model="block.metadata.config.instructions"
|
|
14
|
+
outlined
|
|
15
|
+
:counter="255"
|
|
16
|
+
:rules="validation.instructionRule"
|
|
13
17
|
:disabled="render"
|
|
14
18
|
:label="
|
|
15
19
|
$t('components.content.settings.base.instructions_optional')
|
|
16
20
|
"
|
|
17
|
-
|
|
21
|
+
></v-textarea>
|
|
18
22
|
<v-switch
|
|
19
23
|
v-model="block.metadata.config.display_detailed"
|
|
20
24
|
:label="
|
|
@@ -37,6 +41,8 @@
|
|
|
37
41
|
<v-text-field
|
|
38
42
|
v-model="block.metadata.config.items[index].name"
|
|
39
43
|
:autofocus="true"
|
|
44
|
+
:counter="50"
|
|
45
|
+
:rules="validation.shortInputRules"
|
|
40
46
|
outlined
|
|
41
47
|
:label="
|
|
42
48
|
$t(
|
|
@@ -94,7 +100,26 @@ export default {
|
|
|
94
100
|
extends: BaseContentSettings,
|
|
95
101
|
components: { TextEditor, SortableExpansionPanel },
|
|
96
102
|
data() {
|
|
97
|
-
return {
|
|
103
|
+
return {
|
|
104
|
+
validation: {
|
|
105
|
+
shortInputRules: [
|
|
106
|
+
(v) =>
|
|
107
|
+
v.length <= 50 ||
|
|
108
|
+
this.$t(
|
|
109
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
110
|
+
[50]
|
|
111
|
+
),
|
|
112
|
+
],
|
|
113
|
+
instructionRule: [
|
|
114
|
+
(v) =>
|
|
115
|
+
v.length <= 255 ||
|
|
116
|
+
this.$t(
|
|
117
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
118
|
+
[255]
|
|
119
|
+
),
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
}
|
|
98
123
|
},
|
|
99
124
|
computed: {
|
|
100
125
|
filename() {
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
<v-col class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
6
|
v-model="block.metadata.config.title"
|
|
7
|
+
:rules="validation.shortInputRules"
|
|
8
|
+
:counter="50"
|
|
9
|
+
outlined
|
|
7
10
|
id="title"
|
|
8
11
|
:label="
|
|
9
12
|
$t(
|
|
@@ -12,16 +15,15 @@
|
|
|
12
15
|
"
|
|
13
16
|
:disabled="render"
|
|
14
17
|
></v-text-field>
|
|
15
|
-
<v-
|
|
18
|
+
<v-textarea
|
|
16
19
|
v-model="block.metadata.config.description"
|
|
17
20
|
id="description"
|
|
18
|
-
:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
21
|
+
:rules="validation.instructionRule"
|
|
22
|
+
:counter="255"
|
|
23
|
+
outlined
|
|
24
|
+
:label="$t('components.content.settings.base.instructions')"
|
|
23
25
|
:disabled="render"
|
|
24
|
-
></v-
|
|
26
|
+
></v-textarea>
|
|
25
27
|
<v-select
|
|
26
28
|
v-model="block.metadata.config.display_style"
|
|
27
29
|
:items="displayStyles"
|
|
@@ -75,6 +77,9 @@
|
|
|
75
77
|
v-model="
|
|
76
78
|
block.metadata.config.items[index].title
|
|
77
79
|
"
|
|
80
|
+
:rules="validation.shortInputRules"
|
|
81
|
+
:counter="50"
|
|
82
|
+
outlined
|
|
78
83
|
:id="'item-' + index + '-title'"
|
|
79
84
|
:label="
|
|
80
85
|
$t(
|
|
@@ -243,6 +248,24 @@ export default {
|
|
|
243
248
|
value: 'number',
|
|
244
249
|
},
|
|
245
250
|
],
|
|
251
|
+
validation: {
|
|
252
|
+
shortInputRules: [
|
|
253
|
+
(v) =>
|
|
254
|
+
v.length <= 50 ||
|
|
255
|
+
this.$t(
|
|
256
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
257
|
+
[50]
|
|
258
|
+
),
|
|
259
|
+
],
|
|
260
|
+
instructionRule: [
|
|
261
|
+
(v) =>
|
|
262
|
+
v.length <= 255 ||
|
|
263
|
+
this.$t(
|
|
264
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
265
|
+
[255]
|
|
266
|
+
),
|
|
267
|
+
],
|
|
268
|
+
},
|
|
246
269
|
}
|
|
247
270
|
},
|
|
248
271
|
beforeMount() {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-form ref="form" v-model="valid" v-if="!loading">
|
|
4
3
|
<v-divider class="my-4 primary"></v-divider>
|
|
5
4
|
<p>{{ $t('windward.core.components.settings.tab.tabs') }}</p>
|
|
6
5
|
<SortableExpansionPanel
|
|
@@ -28,7 +27,9 @@
|
|
|
28
27
|
v-model="
|
|
29
28
|
block.metadata.config.items[index].tabHeader
|
|
30
29
|
"
|
|
31
|
-
:
|
|
30
|
+
:counter="50"
|
|
31
|
+
:rules="validation.headerRule"
|
|
32
|
+
:label="'item ' + (index + 1)"
|
|
32
33
|
:disabled="render"
|
|
33
34
|
></v-text-field>
|
|
34
35
|
<v-btn
|
|
@@ -72,7 +73,6 @@
|
|
|
72
73
|
{{ $t('windward.core.components.settings.tab.add_tab') }}
|
|
73
74
|
</v-btn>
|
|
74
75
|
</v-row>
|
|
75
|
-
</v-form>
|
|
76
76
|
<div v-if="loading" class="text-center">
|
|
77
77
|
<v-progress-circular
|
|
78
78
|
:size="70"
|
|
@@ -129,6 +129,16 @@ export default {
|
|
|
129
129
|
textEditorUpdateKey: Crypto.id(),
|
|
130
130
|
valid: true,
|
|
131
131
|
loading: false,
|
|
132
|
+
validation: {
|
|
133
|
+
headerRule: [
|
|
134
|
+
(v) =>
|
|
135
|
+
v.length <= 50 ||
|
|
136
|
+
this.$t(
|
|
137
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
138
|
+
[50]
|
|
139
|
+
),
|
|
140
|
+
],
|
|
141
|
+
},
|
|
132
142
|
}
|
|
133
143
|
},
|
|
134
144
|
mounted() {
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
<v-btn-toggle v-model="settingSelector" multiple borderless>
|
|
6
6
|
<v-tooltip top>
|
|
7
7
|
<template #activator="{ on, attrs }">
|
|
8
|
-
<v-btn
|
|
8
|
+
<v-btn
|
|
9
|
+
elevation="0"
|
|
10
|
+
v-bind="attrs"
|
|
11
|
+
v-on="on"
|
|
12
|
+
text
|
|
13
|
+
:disabled="render"
|
|
14
|
+
>
|
|
9
15
|
<v-icon>mdi-comment-text-multiple</v-icon>
|
|
10
16
|
{{
|
|
11
17
|
$t(
|
|
@@ -25,7 +31,13 @@
|
|
|
25
31
|
|
|
26
32
|
<v-tooltip top>
|
|
27
33
|
<template #activator="{ on, attrs }">
|
|
28
|
-
<v-btn
|
|
34
|
+
<v-btn
|
|
35
|
+
elevation="0"
|
|
36
|
+
v-bind="attrs"
|
|
37
|
+
v-on="on"
|
|
38
|
+
text
|
|
39
|
+
:disabled="render"
|
|
40
|
+
>
|
|
29
41
|
<v-icon> mdi-text-long</v-icon>
|
|
30
42
|
{{
|
|
31
43
|
$t(
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<v-text-field
|
|
4
4
|
v-model="block.metadata.config.title"
|
|
5
5
|
outlined
|
|
6
|
+
:rules="validation.titleRules"
|
|
6
7
|
:counter="50"
|
|
7
8
|
:autofocus="true"
|
|
8
9
|
:label="$t('components.content.settings.base.title_optional')"
|
|
@@ -22,12 +23,14 @@
|
|
|
22
23
|
mdi-arrow-collapse-all
|
|
23
24
|
</v-icon>
|
|
24
25
|
</v-btn>
|
|
25
|
-
<
|
|
26
|
+
<v-textarea
|
|
26
27
|
v-model="block.metadata.config.instructions"
|
|
28
|
+
:rules="validation.instructionRule"
|
|
29
|
+
:counter="255"
|
|
30
|
+
outlined
|
|
27
31
|
:label="$t('components.content.settings.base.instructions')"
|
|
28
|
-
:loading="block.__expandInstructions"
|
|
29
32
|
:disabled="render"
|
|
30
|
-
|
|
33
|
+
></v-textarea>
|
|
31
34
|
<v-switch
|
|
32
35
|
v-model="block.metadata.config.uploadSettings.multiple"
|
|
33
36
|
:label="
|
|
@@ -136,6 +139,24 @@ export default {
|
|
|
136
139
|
boilerplate: true,
|
|
137
140
|
elevation: 0,
|
|
138
141
|
},
|
|
142
|
+
validation: {
|
|
143
|
+
titleRules: [
|
|
144
|
+
(v) =>
|
|
145
|
+
v.length <= 50 ||
|
|
146
|
+
this.$t(
|
|
147
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
148
|
+
[50]
|
|
149
|
+
),
|
|
150
|
+
],
|
|
151
|
+
instructionRule: [
|
|
152
|
+
(v) =>
|
|
153
|
+
v.length <= 255 ||
|
|
154
|
+
this.$t(
|
|
155
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
156
|
+
[255]
|
|
157
|
+
),
|
|
158
|
+
],
|
|
159
|
+
},
|
|
139
160
|
}
|
|
140
161
|
},
|
|
141
162
|
mounted() {},
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
<v-col cols="12">
|
|
5
5
|
<v-text-field
|
|
6
6
|
v-model="block.metadata.config.title"
|
|
7
|
+
:counter="50"
|
|
8
|
+
outlined
|
|
9
|
+
:rules="validation.shortInputRules"
|
|
7
10
|
:label="$t('windward.core.components.settings.video.title')"
|
|
8
11
|
:disabled="render"
|
|
9
12
|
></v-text-field>
|
|
@@ -11,6 +14,7 @@
|
|
|
11
14
|
v-model="block.metadata.config.description"
|
|
12
15
|
outlined
|
|
13
16
|
auto-grow
|
|
17
|
+
:rules="validation.instructionRule"
|
|
14
18
|
:counter="255"
|
|
15
19
|
:label="
|
|
16
20
|
$t(
|
|
@@ -503,6 +507,32 @@ export default {
|
|
|
503
507
|
},
|
|
504
508
|
},
|
|
505
509
|
},
|
|
510
|
+
validation: {
|
|
511
|
+
shortInputRules: [
|
|
512
|
+
(v) =>
|
|
513
|
+
v.length <= 50 ||
|
|
514
|
+
this.$t(
|
|
515
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
516
|
+
[50]
|
|
517
|
+
),
|
|
518
|
+
],
|
|
519
|
+
instructionRule: [
|
|
520
|
+
(v) =>
|
|
521
|
+
v.length <= 255 ||
|
|
522
|
+
this.$t(
|
|
523
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
524
|
+
[255]
|
|
525
|
+
),
|
|
526
|
+
],
|
|
527
|
+
clueRule: [
|
|
528
|
+
(v) =>
|
|
529
|
+
v.length <= 155 ||
|
|
530
|
+
this.$t(
|
|
531
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
532
|
+
[155]
|
|
533
|
+
),
|
|
534
|
+
],
|
|
535
|
+
},
|
|
506
536
|
}
|
|
507
537
|
},
|
|
508
538
|
computed: {
|
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
'windward-tinymce-wrapper windward-tinymce-wrapper' +
|
|
6
6
|
(isDarkTheme ? '--theme-dark' : '--theme-light')
|
|
7
7
|
"
|
|
8
|
+
:data-cy="dataCy"
|
|
8
9
|
>
|
|
9
10
|
<label v-if="label" class="editor-label">{{ label }}</label>
|
|
11
|
+
|
|
10
12
|
<Editor
|
|
13
|
+
:id="id"
|
|
11
14
|
:key="seed + (isDarkTheme ? '-theme-dark' : '-theme-light')"
|
|
12
15
|
v-model="text"
|
|
13
16
|
initial-value=""
|
|
@@ -22,6 +25,8 @@
|
|
|
22
25
|
}"
|
|
23
26
|
>
|
|
24
27
|
</Editor>
|
|
28
|
+
|
|
29
|
+
<label v-if="hint" class="editor-hint">{{ hint }}</label>
|
|
25
30
|
</div>
|
|
26
31
|
|
|
27
32
|
<v-btn-toggle dense multiple class="pt-1 d-flex justify-end">
|
|
@@ -129,6 +134,7 @@ export default {
|
|
|
129
134
|
},
|
|
130
135
|
props: {
|
|
131
136
|
value: { type: String, required: true, default: '' },
|
|
137
|
+
id: { type: String, required: false, default: '' },
|
|
132
138
|
height: { type: Number, required: false, default: null },
|
|
133
139
|
menubar: {
|
|
134
140
|
type: String,
|
|
@@ -142,7 +148,8 @@ export default {
|
|
|
142
148
|
'undo redo | styles | bold italic underline strikethrough removeformat | alignleft aligncenter alignright | table bullist numlist outdent indent | glossaryButton fibFormatButton mathButton ',
|
|
143
149
|
},
|
|
144
150
|
root_block: { type: String, required: false, default: 'div' },
|
|
145
|
-
label: { type: String, required:
|
|
151
|
+
label: { type: String, required: false, default: '' },
|
|
152
|
+
hint: { type: String, required: false, default: '' },
|
|
146
153
|
inline: { type: Boolean, required: false, default: false },
|
|
147
154
|
allowRead: { type: Boolean, required: false, default: false },
|
|
148
155
|
},
|
|
@@ -168,6 +175,14 @@ export default {
|
|
|
168
175
|
},
|
|
169
176
|
},
|
|
170
177
|
computed: {
|
|
178
|
+
dataCy() {
|
|
179
|
+
return (
|
|
180
|
+
this.id ||
|
|
181
|
+
this.label.toLowerCase().replaceAll(/[^a-z0-9]/g, '-') ||
|
|
182
|
+
this.hint.toLowerCase().replaceAll(/[^a-z0-9]/g, '-') ||
|
|
183
|
+
_.get(this, '$parent.$parent.$options.name', '')
|
|
184
|
+
)
|
|
185
|
+
},
|
|
171
186
|
isDarkTheme() {
|
|
172
187
|
return this.$vuetify.theme.isDark
|
|
173
188
|
},
|
|
@@ -542,6 +557,12 @@ export default {
|
|
|
542
557
|
transform-origin: top left;
|
|
543
558
|
transform: scale(0.75);
|
|
544
559
|
}
|
|
560
|
+
.editor-hint {
|
|
561
|
+
font-size: 1rem;
|
|
562
|
+
display: block;
|
|
563
|
+
transform-origin: top left;
|
|
564
|
+
transform: scale(0.75);
|
|
565
|
+
}
|
|
545
566
|
</style>
|
|
546
567
|
|
|
547
568
|
<style lang="scss">
|