@windward/core 0.7.0 → 0.8.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/components/Content/Blocks/Accordion.vue +10 -2
- package/components/Content/Blocks/BlockQuote.vue +6 -2
- package/components/Content/Blocks/ClickableIcons.vue +10 -2
- package/components/Content/Blocks/Email.vue +7 -7
- package/components/Content/Blocks/HorizontalRule.vue +2 -0
- package/components/Content/Blocks/OpenResponse.vue +25 -0
- package/components/Content/Blocks/OpenResponseCollate.vue +13 -12
- package/components/Content/Blocks/ScenarioChoice.vue +10 -2
- package/components/Content/Blocks/Tab.vue +17 -3
- package/components/Content/Blocks/UserUpload.vue +5 -3
- package/components/Content/Blocks/Video.vue +33 -7
- package/components/Settings/AccordionSettings.vue +20 -34
- package/components/Settings/BlockQuoteSettings.vue +17 -41
- package/components/Settings/ClickableIconsSettings.vue +18 -40
- package/components/Settings/EmailSettings.vue +12 -38
- package/components/Settings/FileDownloadSettings.vue +10 -35
- package/components/Settings/ImageSettings.vue +3 -9
- package/components/Settings/OpenResponseCollateSettings.vue +47 -55
- package/components/Settings/OpenResponseSettings.vue +62 -36
- package/components/Settings/ScenarioChoiceSettings.vue +13 -35
- package/components/Settings/TabSettings.vue +8 -33
- package/components/Settings/UserUploadSettings.vue +6 -30
- package/components/Settings/VideoSettings/SourcePicker.vue +1 -0
- package/components/Settings/VideoSettings.vue +6 -42
- package/components/utils/TinyMCEWrapper.vue +6 -3
- package/helpers/GlossaryHelper.ts +12 -2
- package/i18n/en-US/components/settings/open_response_collate.ts +1 -1
- package/i18n/en-US/components/settings/scenario_choice.ts +3 -2
- package/i18n/en-US/components/settings/video.ts +1 -1
- package/i18n/en-US/shared/settings.ts +1 -1
- package/i18n/es-ES/components/settings/open_response_collate.ts +1 -1
- package/i18n/es-ES/components/settings/scenario_choice.ts +3 -2
- package/i18n/es-ES/components/settings/video.ts +1 -1
- package/i18n/es-ES/shared/settings.ts +1 -1
- package/i18n/sv-SE/components/settings/open_response_collate.ts +1 -1
- package/i18n/sv-SE/components/settings/scenario_choice.ts +3 -2
- package/i18n/sv-SE/components/settings/video.ts +1 -1
- package/package.json +2 -2
- package/test/__mocks__/modelMock.js +1 -1
- package/test/helpers/GlossaryHelper.spec.js +22 -3
- package/test/mocks.js +8 -0
|
@@ -7,9 +7,17 @@
|
|
|
7
7
|
block.metadata.config.instructions
|
|
8
8
|
"
|
|
9
9
|
>
|
|
10
|
-
<h2
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
|
+
{{ block.metadata.config.title }}
|
|
12
|
+
</h2>
|
|
11
13
|
|
|
12
|
-
<p
|
|
14
|
+
<p
|
|
15
|
+
v-if="block.metadata.config.instructions"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
class="pt-3"
|
|
18
|
+
>
|
|
19
|
+
{{ block.metadata.config.instructions }}
|
|
20
|
+
</p>
|
|
13
21
|
</v-container>
|
|
14
22
|
<v-expansion-panels
|
|
15
23
|
:value="selectedPanels"
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
"
|
|
8
8
|
>
|
|
9
9
|
<v-col cols="12" class="pb-0">
|
|
10
|
-
<h2 v-if="block.metadata.config.title">
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
11
|
{{ block.metadata.config.title }}
|
|
12
12
|
</h2>
|
|
13
|
-
<p
|
|
13
|
+
<p
|
|
14
|
+
v-if="block.metadata.config.instructions"
|
|
15
|
+
tabindex="0"
|
|
16
|
+
class="pt-3"
|
|
17
|
+
>
|
|
14
18
|
{{ block.metadata.config.instructions }}
|
|
15
19
|
</p>
|
|
16
20
|
</v-col>
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
|
-
<h2
|
|
4
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
5
|
+
{{ block.metadata.config.title }}
|
|
6
|
+
</h2>
|
|
5
7
|
|
|
6
|
-
<p
|
|
8
|
+
<p
|
|
9
|
+
v-if="block.metadata.config.description"
|
|
10
|
+
tabindex="0"
|
|
11
|
+
class="pt-3"
|
|
12
|
+
>
|
|
13
|
+
{{ block.metadata.config.description }}
|
|
14
|
+
</p>
|
|
7
15
|
|
|
8
16
|
<p>
|
|
9
17
|
{{
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
"
|
|
8
8
|
>
|
|
9
9
|
<v-col cols="12" class="pa-0">
|
|
10
|
-
<h2 v-if="block.metadata.config.title">
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
11
|
{{ block.metadata.config.title }}
|
|
12
12
|
</h2>
|
|
13
|
-
<p
|
|
13
|
+
<p
|
|
14
|
+
v-if="block.metadata.config.instructions"
|
|
15
|
+
tabindex="0"
|
|
16
|
+
class="pt-3"
|
|
17
|
+
>
|
|
14
18
|
{{ block.metadata.config.instructions }}
|
|
15
19
|
</p>
|
|
16
20
|
</v-col>
|
|
@@ -171,11 +175,7 @@
|
|
|
171
175
|
>
|
|
172
176
|
<v-row class="pt-4">
|
|
173
177
|
<v-col cols="10" class="pa-0">
|
|
174
|
-
<v-btn
|
|
175
|
-
elevation="0"
|
|
176
|
-
color="primary"
|
|
177
|
-
text
|
|
178
|
-
>
|
|
178
|
+
<v-btn elevation="0" color="primary" text>
|
|
179
179
|
<v-icon>mdi-reply</v-icon>
|
|
180
180
|
{{
|
|
181
181
|
$t(
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<v-container
|
|
4
|
+
class="pa-0"
|
|
5
|
+
v-if="
|
|
6
|
+
block.metadata.config.title ||
|
|
7
|
+
block.metadata.config.instructions
|
|
8
|
+
"
|
|
9
|
+
>
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
|
+
{{ block.metadata.config.title }}
|
|
12
|
+
</h2>
|
|
13
|
+
|
|
14
|
+
<p
|
|
15
|
+
v-if="block.metadata.config.instructions"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
class="pt-3"
|
|
18
|
+
>
|
|
19
|
+
{{ block.metadata.config.instructions }}
|
|
20
|
+
</p>
|
|
21
|
+
</v-container>
|
|
3
22
|
<div v-if="stateLoaded">
|
|
4
23
|
<div v-if="block.body && !submitted">
|
|
5
24
|
<TextViewer v-model="block.body" :height="200"></TextViewer>
|
|
@@ -118,6 +137,12 @@ export default {
|
|
|
118
137
|
if (_.isEmpty(this.block.metadata.config)) {
|
|
119
138
|
this.block.metadata.config = {}
|
|
120
139
|
}
|
|
140
|
+
if (_.isEmpty(this.block.metadata.config.title)) {
|
|
141
|
+
this.block.metadata.config.title = ''
|
|
142
|
+
}
|
|
143
|
+
if (_.isEmpty(this.block.metadata.config.instructions)) {
|
|
144
|
+
this.block.metadata.config.instructions = ''
|
|
145
|
+
}
|
|
121
146
|
if (_.isEmpty(this.block.metadata.config.sample_response)) {
|
|
122
147
|
this.block.metadata.config.sample_response = ''
|
|
123
148
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<div v-if="block.metadata.config.linked.length">
|
|
4
|
-
<v-btn
|
|
4
|
+
<v-btn
|
|
5
|
+
elevation="0"
|
|
6
|
+
color="primary"
|
|
7
|
+
outlined
|
|
8
|
+
block
|
|
9
|
+
@click="onCollate"
|
|
10
|
+
>
|
|
5
11
|
<v-icon class="mr-3">mdi-file-word</v-icon>
|
|
6
12
|
{{
|
|
7
13
|
$t(
|
|
@@ -74,19 +80,14 @@ export default {
|
|
|
74
80
|
'metadata->block->block_id',
|
|
75
81
|
this.block.metadata.config.linked
|
|
76
82
|
)
|
|
83
|
+
.with('contentBlock')
|
|
77
84
|
.get()
|
|
78
|
-
let collated = ''
|
|
79
|
-
const sortedStates = []
|
|
80
85
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (found) {
|
|
87
|
-
sortedStates.push(found)
|
|
88
|
-
}
|
|
89
|
-
})
|
|
86
|
+
let collated = ''
|
|
87
|
+
// sort by order on the page
|
|
88
|
+
const sortedStates = userState.sort((a, b) =>
|
|
89
|
+
a.content_block.order < b.content_block.order ? -1 : 1
|
|
90
|
+
)
|
|
90
91
|
|
|
91
92
|
sortedStates.forEach((state) => {
|
|
92
93
|
// Prepend the prompt from the state if include prompts is enabled
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
|
-
<h2
|
|
5
|
-
|
|
4
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
5
|
+
{{ block.metadata.config.title }}
|
|
6
|
+
</h2>
|
|
7
|
+
<p
|
|
8
|
+
v-if="block.metadata.config.description"
|
|
9
|
+
tabindex="0"
|
|
10
|
+
class="pt-3"
|
|
11
|
+
>
|
|
12
|
+
{{ block.metadata.config.description }}
|
|
13
|
+
</p>
|
|
6
14
|
<div
|
|
7
15
|
v-if="choiceIndex !== null && block.metadata.config.show_reset"
|
|
8
16
|
class="text-right"
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-container
|
|
4
|
-
|
|
3
|
+
<v-container
|
|
4
|
+
v-if="
|
|
5
|
+
block.metadata.config.title ||
|
|
6
|
+
block.metadata.config.instructions
|
|
7
|
+
"
|
|
8
|
+
class="pa-0"
|
|
9
|
+
>
|
|
10
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
11
|
+
{{ block.metadata.config.title }}
|
|
12
|
+
</h2>
|
|
5
13
|
|
|
6
|
-
<p
|
|
14
|
+
<p
|
|
15
|
+
v-if="block.metadata.config.instructions"
|
|
16
|
+
tabindex="0"
|
|
17
|
+
class="pt-3"
|
|
18
|
+
>
|
|
19
|
+
{{ block.metadata.config.instructions }}
|
|
20
|
+
</p>
|
|
7
21
|
</v-container>
|
|
8
22
|
<v-container class="pa-0">
|
|
9
23
|
<v-tabs dark v-model="block.metadata.config.currentTab" show-arrows>
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-container class="pa-0">
|
|
3
3
|
<div>
|
|
4
|
-
<h2 v-if="block.metadata.config.title">
|
|
4
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
5
5
|
{{ block.metadata.config.title }}
|
|
6
6
|
</h2>
|
|
7
7
|
<v-row>
|
|
8
|
-
<v-col cols="12">
|
|
9
|
-
|
|
8
|
+
<v-col v-if="block.metadata.config.instructions" cols="12">
|
|
9
|
+
<p tabindex="0" class="pt-3">
|
|
10
|
+
{{ block.metadata.config.instructions }}
|
|
11
|
+
</p>
|
|
10
12
|
</v-col>
|
|
11
13
|
<v-col v-if="!blockExists" cols="12">
|
|
12
14
|
<v-alert color="warning">
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
<h2 v-if="block.metadata.config.title" tabindex="0">
|
|
4
|
+
{{ block.metadata.config.title }}
|
|
5
|
+
</h2>
|
|
6
|
+
<p v-if="block.metadata.config.description" tabindex="0" class="pt-3">
|
|
7
|
+
{{ block.metadata.config.description }}
|
|
8
|
+
</p>
|
|
9
|
+
|
|
3
10
|
<v-card v-if="render && !hasSource">
|
|
4
11
|
<v-card-title>
|
|
5
12
|
<v-icon class="mr-2">mdi-cloud-question</v-icon>
|
|
@@ -19,12 +26,7 @@
|
|
|
19
26
|
type="image, image, list-item-avatar"
|
|
20
27
|
class="reload-skeleton"
|
|
21
28
|
></v-skeleton-loader>
|
|
22
|
-
|
|
23
|
-
{{ block.metadata.config.title }}
|
|
24
|
-
</h2>
|
|
25
|
-
<p v-if="block.metadata.config.description" class="pb-0 mb-0">
|
|
26
|
-
{{ block.metadata.config.description }}
|
|
27
|
-
</p>
|
|
29
|
+
|
|
28
30
|
<VuetifyPlayer
|
|
29
31
|
v-if="hasSource"
|
|
30
32
|
:language="$i18n && $i18n.locale ? $i18n.locale : 'en-US'"
|
|
@@ -57,6 +59,8 @@
|
|
|
57
59
|
block.metadata.config.attributes.playlistautoadvance
|
|
58
60
|
"
|
|
59
61
|
:playbackrates="block.metadata.config.attributes.playbackrates"
|
|
62
|
+
@seeking="onSeeking"
|
|
63
|
+
@timeupdate="onTimeupdate"
|
|
60
64
|
/>
|
|
61
65
|
<!-- display first note in the playlist for now -->
|
|
62
66
|
<v-alert
|
|
@@ -213,7 +217,6 @@ export default {
|
|
|
213
217
|
},
|
|
214
218
|
data() {
|
|
215
219
|
return {
|
|
216
|
-
saveState: false,
|
|
217
220
|
fileTab: null,
|
|
218
221
|
// Default config settings
|
|
219
222
|
defaultConfig: {
|
|
@@ -283,6 +286,10 @@ export default {
|
|
|
283
286
|
},*/
|
|
284
287
|
],
|
|
285
288
|
},
|
|
289
|
+
tracking: {
|
|
290
|
+
hasSkipped: false,
|
|
291
|
+
percentComplete: 0,
|
|
292
|
+
},
|
|
286
293
|
}
|
|
287
294
|
},
|
|
288
295
|
beforeMount() {
|
|
@@ -303,6 +310,25 @@ export default {
|
|
|
303
310
|
}
|
|
304
311
|
},
|
|
305
312
|
methods: {
|
|
313
|
+
onSeeking(e) {
|
|
314
|
+
this.tracking.hasSkipped = true
|
|
315
|
+
},
|
|
316
|
+
onTimeupdate(e) {
|
|
317
|
+
// If you were seeking / skipped parts only "resume" if you start back from where you left off
|
|
318
|
+
if (e.current_percent <= this.tracking.percentComplete) {
|
|
319
|
+
this.tracking.hasSkipped = false
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
if (!this.tracking.hasSkipped) {
|
|
323
|
+
if (e.current_percent >= this.tracking.percentComplete) {
|
|
324
|
+
this.tracking.percentComplete = e.current_percent
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (!this.completed && this.tracking.percentComplete >= 90) {
|
|
328
|
+
this.emitCompleted()
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
},
|
|
306
332
|
async onBeforeSave() {
|
|
307
333
|
this.block.body = 'video'
|
|
308
334
|
},
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<v-container class="pa-0">
|
|
4
4
|
<v-row class="pl-3 pr-3">
|
|
5
5
|
<v-text-field
|
|
6
|
+
id="block-settings-title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
:autofocus="true"
|
|
8
|
-
:rules="
|
|
9
|
-
:counter="
|
|
9
|
+
:rules="$Validation.getRule('block.title')"
|
|
10
|
+
:counter="$Validation.getLimit('block.title')"
|
|
10
11
|
outlined
|
|
11
|
-
id="title"
|
|
12
12
|
:label="
|
|
13
13
|
$t(
|
|
14
14
|
'windward.core.components.settings.clickable_icon.title'
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
:disabled="render"
|
|
18
18
|
></v-text-field>
|
|
19
19
|
<v-textarea
|
|
20
|
+
id="block-settings-instructions"
|
|
20
21
|
v-model="block.metadata.config.instructions"
|
|
21
|
-
:rules="
|
|
22
|
-
:counter="
|
|
22
|
+
:rules="$Validation.getRule('block.instructions')"
|
|
23
|
+
:counter="$Validation.getLimit('block.instructions')"
|
|
23
24
|
outlined
|
|
24
25
|
:label="$t('components.content.settings.base.instructions')"
|
|
25
26
|
:disabled="render"
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
<v-text-field
|
|
47
48
|
v-model="block.metadata.config.items[index].header"
|
|
48
49
|
:autofocus="true"
|
|
49
|
-
:
|
|
50
|
-
:
|
|
50
|
+
:rules="$Validation.getRule('shortInput')"
|
|
51
|
+
:counter="$Validation.getLimit('shortInput')"
|
|
51
52
|
outlined
|
|
52
53
|
:label="
|
|
53
54
|
$t('components.content.settings.base.title')
|
|
@@ -110,6 +111,7 @@
|
|
|
110
111
|
'windward.core.shared.settings.alt_image'
|
|
111
112
|
)
|
|
112
113
|
"
|
|
114
|
+
:disabled="render"
|
|
113
115
|
></v-text-field>
|
|
114
116
|
<v-text-field
|
|
115
117
|
v-model="
|
|
@@ -125,6 +127,7 @@
|
|
|
125
127
|
'windward.core.shared.settings.aria_described'
|
|
126
128
|
)
|
|
127
129
|
"
|
|
130
|
+
:disabled="render"
|
|
128
131
|
></v-text-field>
|
|
129
132
|
<ContentBlockAsset
|
|
130
133
|
v-model="
|
|
@@ -132,7 +135,16 @@
|
|
|
132
135
|
"
|
|
133
136
|
mimes="image/png,image/jpeg"
|
|
134
137
|
:assets.sync="block.assets"
|
|
135
|
-
|
|
138
|
+
outlined
|
|
139
|
+
>
|
|
140
|
+
<template #title>
|
|
141
|
+
{{
|
|
142
|
+
$t(
|
|
143
|
+
'windward.core.components.settings.image.place_image'
|
|
144
|
+
)
|
|
145
|
+
}}
|
|
146
|
+
</template>
|
|
147
|
+
</ContentBlockAsset>
|
|
136
148
|
</v-container>
|
|
137
149
|
</v-container>
|
|
138
150
|
</template>
|
|
@@ -222,32 +234,6 @@ export default {
|
|
|
222
234
|
return {
|
|
223
235
|
expansionPanelKey: '0',
|
|
224
236
|
loading: false,
|
|
225
|
-
validation: {
|
|
226
|
-
shortInputRules: [
|
|
227
|
-
(v) => {
|
|
228
|
-
if (v && v.length >= 50) {
|
|
229
|
-
return this.$t(
|
|
230
|
-
'windward.core.shared.settings.errors.input_limitations',
|
|
231
|
-
[50]
|
|
232
|
-
)
|
|
233
|
-
} else {
|
|
234
|
-
return true
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
],
|
|
238
|
-
instructionRule: [
|
|
239
|
-
(v) => {
|
|
240
|
-
if (v && v.length >= 255) {
|
|
241
|
-
return this.$t(
|
|
242
|
-
'windward.core.shared.settings.errors.input_limitations',
|
|
243
|
-
[255]
|
|
244
|
-
)
|
|
245
|
-
} else {
|
|
246
|
-
return true
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
],
|
|
250
|
-
},
|
|
251
237
|
}
|
|
252
238
|
},
|
|
253
239
|
beforeDestroy() {
|
|
@@ -2,21 +2,23 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<v-container class="pa-0">
|
|
4
4
|
<v-text-field
|
|
5
|
+
id="block-settings-title"
|
|
6
|
+
ref="title"
|
|
5
7
|
v-model="block.metadata.config.title"
|
|
6
8
|
:autofocus="true"
|
|
7
9
|
outlined
|
|
8
|
-
:counter="
|
|
9
|
-
:rules="
|
|
10
|
+
:counter="$Validation.getLimit('block.title')"
|
|
11
|
+
:rules="$Validation.getRule('block.title')"
|
|
10
12
|
:label="$t('components.content.settings.base.title')"
|
|
11
|
-
ref="title"
|
|
12
13
|
:disabled="render"
|
|
13
14
|
></v-text-field>
|
|
14
15
|
<v-textarea
|
|
16
|
+
id="block-settings-instructions"
|
|
15
17
|
v-model="block.metadata.config.instructions"
|
|
16
18
|
outlined
|
|
17
19
|
auto-grow
|
|
18
|
-
:rules="
|
|
19
|
-
:counter="
|
|
20
|
+
:rules="$Validation.getRule('block.instructions')"
|
|
21
|
+
:counter="$Validation.getLimit('block.instructions')"
|
|
20
22
|
:label="$t('components.content.settings.base.instructions')"
|
|
21
23
|
:disabled="render"
|
|
22
24
|
></v-textarea>
|
|
@@ -25,10 +27,10 @@
|
|
|
25
27
|
<v-container class="pa-0">
|
|
26
28
|
<TextEditor
|
|
27
29
|
v-model="block.metadata.config.block_quote.quote"
|
|
28
|
-
:rules="
|
|
30
|
+
:rules="$Validation.getRule('longInput')"
|
|
31
|
+
:counter="$Validation.getLimit('longInput')"
|
|
29
32
|
outlined
|
|
30
33
|
auto-grow
|
|
31
|
-
:counter="255"
|
|
32
34
|
:height="200"
|
|
33
35
|
:label="
|
|
34
36
|
$t('windward.core.components.settings.block_quote.body')
|
|
@@ -40,8 +42,8 @@
|
|
|
40
42
|
<v-container class="pa-0">
|
|
41
43
|
<v-text-field
|
|
42
44
|
v-model="block.metadata.config.block_quote.author"
|
|
43
|
-
:rules="
|
|
44
|
-
:counter="
|
|
45
|
+
:rules="$Validation.getRule('shortInput')"
|
|
46
|
+
:counter="$Validation.getLimit('shortInput')"
|
|
45
47
|
outlined
|
|
46
48
|
auto-grow
|
|
47
49
|
:label="
|
|
@@ -52,8 +54,8 @@
|
|
|
52
54
|
<v-text-field
|
|
53
55
|
v-model="block.metadata.config.block_quote.author_title"
|
|
54
56
|
outlined
|
|
55
|
-
:rules="
|
|
56
|
-
:counter="
|
|
57
|
+
:rules="$Validation.getRule('shortInput')"
|
|
58
|
+
:counter="$Validation.getLimit('shortInput')"
|
|
57
59
|
auto-grow
|
|
58
60
|
:label="
|
|
59
61
|
$t('windward.core.components.settings.block_quote.title')
|
|
@@ -62,8 +64,8 @@
|
|
|
62
64
|
></v-text-field>
|
|
63
65
|
<v-text-field
|
|
64
66
|
v-model="block.metadata.config.block_quote.organization"
|
|
65
|
-
:rules="
|
|
66
|
-
:counter="
|
|
67
|
+
:rules="$Validation.getRule('shortInput')"
|
|
68
|
+
:counter="$Validation.getLimit('shortInput')"
|
|
67
69
|
outlined
|
|
68
70
|
auto-grow
|
|
69
71
|
:label="$t('windward.core.components.settings.block_quote.org')"
|
|
@@ -72,8 +74,8 @@
|
|
|
72
74
|
<v-text-field
|
|
73
75
|
v-model="block.metadata.config.block_quote.source_title"
|
|
74
76
|
outlined
|
|
75
|
-
:rules="
|
|
76
|
-
:counter="
|
|
77
|
+
:rules="$Validation.getRule('shortInput')"
|
|
78
|
+
:counter="$Validation.getLimit('shortInput')"
|
|
77
79
|
auto-grow
|
|
78
80
|
:label="
|
|
79
81
|
$t(
|
|
@@ -182,32 +184,6 @@ export default {
|
|
|
182
184
|
value: 'online_journal',
|
|
183
185
|
},
|
|
184
186
|
],
|
|
185
|
-
validation: {
|
|
186
|
-
shortInputRules: [
|
|
187
|
-
(v) => {
|
|
188
|
-
if (v && v.length >= 50) {
|
|
189
|
-
return this.$t(
|
|
190
|
-
'windward.core.shared.settings.errors.input_limitations',
|
|
191
|
-
[50]
|
|
192
|
-
)
|
|
193
|
-
} else {
|
|
194
|
-
return true
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
longInputRules: [
|
|
199
|
-
(v) => {
|
|
200
|
-
if (v && v.length >= 255) {
|
|
201
|
-
return this.$t(
|
|
202
|
-
'windward.core.shared.settings.errors.input_limitations',
|
|
203
|
-
[255]
|
|
204
|
-
)
|
|
205
|
-
} else {
|
|
206
|
-
return true
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
],
|
|
210
|
-
},
|
|
211
187
|
}
|
|
212
188
|
},
|
|
213
189
|
methods: {},
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
<v-container class="pa-0">
|
|
4
4
|
<v-col class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
|
+
id="block-settings-title"
|
|
6
7
|
v-model="block.metadata.config.title"
|
|
7
8
|
:autofocus="true"
|
|
8
|
-
:rules="
|
|
9
|
-
:counter="
|
|
9
|
+
:rules="$Validation.getRule('block.title')"
|
|
10
|
+
:counter="$Validation.getLimit('block.title')"
|
|
10
11
|
outlined
|
|
11
|
-
id="title"
|
|
12
12
|
:label="
|
|
13
13
|
$t(
|
|
14
14
|
'windward.core.components.settings.clickable_icon.title'
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
:disabled="render"
|
|
18
18
|
></v-text-field>
|
|
19
19
|
<v-textarea
|
|
20
|
+
id="block-settings-instructions"
|
|
20
21
|
v-model="block.metadata.config.description"
|
|
21
|
-
:rules="
|
|
22
|
-
:counter="
|
|
22
|
+
:rules="$Validation.getRule('block.instructions')"
|
|
23
|
+
:counter="$Validation.getLimit('block.instructions')"
|
|
23
24
|
outlined
|
|
24
25
|
:label="$t('components.content.settings.base.instructions')"
|
|
25
26
|
:disabled="render"
|
|
@@ -157,16 +158,25 @@
|
|
|
157
158
|
class="mb-4"
|
|
158
159
|
mimes="image/jpeg,image/png,image/gif"
|
|
159
160
|
:disabled="render"
|
|
161
|
+
outlined
|
|
160
162
|
@click:file="onFileSelect($event, index)"
|
|
161
|
-
|
|
163
|
+
>
|
|
164
|
+
<template #title>
|
|
165
|
+
{{
|
|
166
|
+
$t(
|
|
167
|
+
'windward.core.components.settings.image.place_image'
|
|
168
|
+
)
|
|
169
|
+
}}
|
|
170
|
+
</template>
|
|
171
|
+
</ContentBlockAsset>
|
|
162
172
|
<v-text-field
|
|
163
173
|
v-model="
|
|
164
174
|
block.metadata.config.items[index].title
|
|
165
175
|
"
|
|
166
176
|
:id="'item-' + index + '-title'"
|
|
167
177
|
outlined
|
|
168
|
-
:
|
|
169
|
-
:
|
|
178
|
+
:rules="$Validation.getRule('shortInput')"
|
|
179
|
+
:counter="$Validation.getLimit('shortInput')"
|
|
170
180
|
:label="
|
|
171
181
|
$t(
|
|
172
182
|
'windward.core.components.settings.clickable_icon.item_title'
|
|
@@ -238,38 +248,6 @@ export default {
|
|
|
238
248
|
data() {
|
|
239
249
|
return {
|
|
240
250
|
validation: {
|
|
241
|
-
shortInputRules: [
|
|
242
|
-
(v) => {
|
|
243
|
-
if (v) {
|
|
244
|
-
if (v.length <= 50) {
|
|
245
|
-
return true
|
|
246
|
-
} else {
|
|
247
|
-
return this.$t(
|
|
248
|
-
'windward.core.shared.settings.errors.input_limitations',
|
|
249
|
-
[50]
|
|
250
|
-
)
|
|
251
|
-
}
|
|
252
|
-
} else {
|
|
253
|
-
return true
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
],
|
|
257
|
-
instructionRule: [
|
|
258
|
-
(v) => {
|
|
259
|
-
if (v) {
|
|
260
|
-
if (v.length <= 255) {
|
|
261
|
-
return true
|
|
262
|
-
} else {
|
|
263
|
-
return this.$t(
|
|
264
|
-
'windward.core.shared.settings.errors.input_limitations',
|
|
265
|
-
[255]
|
|
266
|
-
)
|
|
267
|
-
}
|
|
268
|
-
} else {
|
|
269
|
-
return true
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
],
|
|
273
251
|
iconRules: [
|
|
274
252
|
(v) => {
|
|
275
253
|
if (v) {
|