@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
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
+
<code_scheme name="Project" version="173">
|
|
3
|
+
<HTMLCodeStyleSettings>
|
|
4
|
+
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
+
<option name="HTML_ENFORCE_QUOTES" value="true" />
|
|
6
|
+
</HTMLCodeStyleSettings>
|
|
7
|
+
<JSCodeStyleSettings version="0">
|
|
8
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
9
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
10
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
11
|
+
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
12
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
13
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
14
|
+
</JSCodeStyleSettings>
|
|
15
|
+
<TypeScriptCodeStyleSettings version="0">
|
|
16
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
17
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
18
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
19
|
+
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
|
|
20
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
21
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
22
|
+
</TypeScriptCodeStyleSettings>
|
|
23
|
+
<VueCodeStyleSettings>
|
|
24
|
+
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
25
|
+
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
26
|
+
</VueCodeStyleSettings>
|
|
27
|
+
<codeStyleSettings language="HTML">
|
|
28
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
29
|
+
<indentOptions>
|
|
30
|
+
<option name="INDENT_SIZE" value="2" />
|
|
31
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
32
|
+
<option name="TAB_SIZE" value="2" />
|
|
33
|
+
</indentOptions>
|
|
34
|
+
</codeStyleSettings>
|
|
35
|
+
<codeStyleSettings language="JavaScript">
|
|
36
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
37
|
+
<indentOptions>
|
|
38
|
+
<option name="INDENT_SIZE" value="2" />
|
|
39
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
40
|
+
<option name="TAB_SIZE" value="2" />
|
|
41
|
+
</indentOptions>
|
|
42
|
+
</codeStyleSettings>
|
|
43
|
+
<codeStyleSettings language="TypeScript">
|
|
44
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
45
|
+
<indentOptions>
|
|
46
|
+
<option name="INDENT_SIZE" value="2" />
|
|
47
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
48
|
+
<option name="TAB_SIZE" value="2" />
|
|
49
|
+
</indentOptions>
|
|
50
|
+
</codeStyleSettings>
|
|
51
|
+
<codeStyleSettings language="Vue">
|
|
52
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
53
|
+
<indentOptions>
|
|
54
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
55
|
+
</indentOptions>
|
|
56
|
+
</codeStyleSettings>
|
|
57
|
+
</code_scheme>
|
|
58
|
+
</component>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/windward-ui-plugin-core.iml" filepath="$PROJECT_DIR$/.idea/windward-ui-plugin-core.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="PhpDockerContainerSettings">
|
|
4
|
+
<list>
|
|
5
|
+
<map>
|
|
6
|
+
<entry key="79d59a8f-c56c-4789-b96c-e55a326ab125">
|
|
7
|
+
<value>
|
|
8
|
+
<DockerContainerSettings>
|
|
9
|
+
<option name="version" value="1" />
|
|
10
|
+
<option name="volumeBindings">
|
|
11
|
+
<list>
|
|
12
|
+
<DockerVolumeBindingImpl>
|
|
13
|
+
<option name="containerPath" value="/opt/project" />
|
|
14
|
+
<option name="hostPath" value="$PROJECT_DIR$" />
|
|
15
|
+
</DockerVolumeBindingImpl>
|
|
16
|
+
</list>
|
|
17
|
+
</option>
|
|
18
|
+
</DockerContainerSettings>
|
|
19
|
+
</value>
|
|
20
|
+
</entry>
|
|
21
|
+
</map>
|
|
22
|
+
</list>
|
|
23
|
+
</component>
|
|
24
|
+
</project>
|
package/.idea/php.xml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="MessDetectorOptionsConfiguration">
|
|
4
|
+
<option name="transferred" value="true" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="PHPCSFixerOptionsConfiguration">
|
|
7
|
+
<option name="transferred" value="true" />
|
|
8
|
+
</component>
|
|
9
|
+
<component name="PHPCodeSnifferOptionsConfiguration">
|
|
10
|
+
<option name="highlightLevel" value="WARNING" />
|
|
11
|
+
<option name="transferred" value="true" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="PhpStanOptionsConfiguration">
|
|
14
|
+
<option name="transferred" value="true" />
|
|
15
|
+
</component>
|
|
16
|
+
<component name="PsalmOptionsConfiguration">
|
|
17
|
+
<option name="transferred" value="true" />
|
|
18
|
+
</component>
|
|
19
|
+
</project>
|
package/.idea/vcs.xml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$" />
|
|
5
|
+
<orderEntry type="inheritedJdk" />
|
|
6
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
7
|
+
</component>
|
|
8
|
+
</module>
|
package/CHANGELOG.md
ADDED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
<v-expansion-panel-header
|
|
15
15
|
class="expansion-panel-header"
|
|
16
16
|
color="primary"
|
|
17
|
+
:ref="'expansion-panel-' + itemIndex"
|
|
18
|
+
@click="onOpenAccordion(itemIndex)"
|
|
17
19
|
>
|
|
18
20
|
{{
|
|
19
21
|
item.header === '' || item.header === null
|
|
@@ -157,6 +159,18 @@ export default {
|
|
|
157
159
|
}
|
|
158
160
|
},
|
|
159
161
|
methods: {
|
|
162
|
+
onOpenAccordion(value) {
|
|
163
|
+
const indexString = value.toString()
|
|
164
|
+
const referenceString = 'expansion-panel-' + indexString
|
|
165
|
+
if (
|
|
166
|
+
this.$refs[referenceString] &&
|
|
167
|
+
this.$refs[referenceString][0].$el
|
|
168
|
+
) {
|
|
169
|
+
setTimeout(() => {
|
|
170
|
+
this.$vuetify.goTo(this.$refs[referenceString][0].$el)
|
|
171
|
+
}, 300)
|
|
172
|
+
}
|
|
173
|
+
},
|
|
160
174
|
getImagePublicUrl(asset) {
|
|
161
175
|
const foundAsset = this.resolveAsset(asset)
|
|
162
176
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<v-container class="pa-0">
|
|
4
4
|
<h2>{{ block.metadata.config.title }}</h2>
|
|
5
5
|
|
|
6
|
-
<
|
|
6
|
+
<p>{{ block.metadata.config.description }}</p>
|
|
7
7
|
|
|
8
8
|
<p>
|
|
9
9
|
{{
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
>
|
|
24
24
|
<v-col cols="12" v-bind="iconColumnAttrs">
|
|
25
25
|
<button
|
|
26
|
+
class="mr-1"
|
|
26
27
|
:class="activatorButtonClass(itemIndex)"
|
|
27
28
|
@click="item.active = !item.active"
|
|
28
29
|
>
|
|
@@ -49,23 +50,24 @@
|
|
|
49
50
|
</button>
|
|
50
51
|
</v-col>
|
|
51
52
|
<v-col cols="12" v-bind="bodyColumnAttrs">
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
<v-container class="ml-4">
|
|
54
|
+
<h4
|
|
55
|
+
v-if="
|
|
56
|
+
block.metadata.config.display.show_title ||
|
|
57
|
+
item.active
|
|
58
|
+
"
|
|
59
|
+
role="button"
|
|
60
|
+
@click="item.active = !item.active"
|
|
61
|
+
>
|
|
62
|
+
{{ item.title }}
|
|
63
|
+
</h4>
|
|
64
|
+
<v-expand-transition>
|
|
65
|
+
<div v-if="item.active">
|
|
66
|
+
<v-divider light class="my-4" />
|
|
67
|
+
<TextViewer v-model="item.body"></TextViewer>
|
|
68
|
+
</div>
|
|
69
|
+
</v-expand-transition>
|
|
70
|
+
</v-container>
|
|
69
71
|
</v-col>
|
|
70
72
|
</v-row>
|
|
71
73
|
</v-container>
|
|
@@ -74,7 +76,6 @@
|
|
|
74
76
|
<script>
|
|
75
77
|
import _ from 'lodash'
|
|
76
78
|
import he from 'he'
|
|
77
|
-
import Uuid from '~/helpers/Uuid'
|
|
78
79
|
import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
|
|
79
80
|
import TextViewer from '~/components/Text/TextViewer'
|
|
80
81
|
|
|
@@ -114,7 +115,9 @@ export default {
|
|
|
114
115
|
}
|
|
115
116
|
},
|
|
116
117
|
data() {
|
|
117
|
-
return {
|
|
118
|
+
return {
|
|
119
|
+
saveState: false,
|
|
120
|
+
}
|
|
118
121
|
},
|
|
119
122
|
computed: {
|
|
120
123
|
decode() {
|
|
@@ -8,17 +8,15 @@
|
|
|
8
8
|
)
|
|
9
9
|
}}
|
|
10
10
|
</h2>
|
|
11
|
-
<p
|
|
11
|
+
<p>
|
|
12
12
|
{{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
block.metadata.config.instructions
|
|
14
|
+
? block.metadata.config.instructions
|
|
15
|
+
: $t(
|
|
16
|
+
'windward.core.components.content.blocks.file_download.default_instructions'
|
|
17
|
+
)
|
|
16
18
|
}}
|
|
17
19
|
</p>
|
|
18
|
-
<TextViewer
|
|
19
|
-
v-if="block.metadata.config.instructions"
|
|
20
|
-
:value="block.metadata.config.instructions"
|
|
21
|
-
/>
|
|
22
20
|
<v-alert
|
|
23
21
|
v-if="
|
|
24
22
|
!block.metadata.config.items ||
|
|
@@ -1,150 +1,133 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-
|
|
4
|
-
<v-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
<v-container class="pa-0">
|
|
4
|
+
<v-divider class="my-4 primary"></v-divider>
|
|
5
|
+
<p>
|
|
6
|
+
{{ $t('windward.core.components.settings.accordion.items') }}
|
|
7
|
+
</p>
|
|
8
|
+
<SortableExpansionPanel
|
|
9
|
+
v-model="block.metadata.config.items"
|
|
10
|
+
:disabled="render"
|
|
11
|
+
@click:close="onRemoveElement($event)"
|
|
12
|
+
@change="onDragged"
|
|
13
|
+
@update:currentPanel="onUpdatePanel"
|
|
14
|
+
>
|
|
15
|
+
<template #header="{ item }">{{
|
|
16
|
+
item.header
|
|
17
|
+
? item.header
|
|
18
|
+
: $t('components.content.settings.base.placeholder')
|
|
19
|
+
}}</template>
|
|
20
|
+
<template #body="{ index }">
|
|
21
|
+
<v-container :key="expansionPanelKey">
|
|
22
|
+
<v-text-field
|
|
23
|
+
v-model="block.metadata.config.items[index].header"
|
|
24
|
+
:autofocus="true"
|
|
25
|
+
:counter="50"
|
|
26
|
+
:rules="validation.titleRule"
|
|
27
|
+
outlined
|
|
28
|
+
:label="
|
|
29
|
+
$t('components.content.settings.base.title')
|
|
30
|
+
"
|
|
31
|
+
:disabled="render"
|
|
32
|
+
></v-text-field>
|
|
33
|
+
<v-btn
|
|
34
|
+
text
|
|
35
|
+
elevation="0"
|
|
36
|
+
class="mb-3"
|
|
37
|
+
:disabled="render"
|
|
38
|
+
@click="
|
|
39
|
+
onToggleExpand(
|
|
40
|
+
block.metadata.config.items[index]
|
|
41
|
+
)
|
|
42
|
+
"
|
|
43
|
+
>
|
|
44
|
+
<v-icon
|
|
45
|
+
v-if="
|
|
46
|
+
!block.metadata.config.items[index].expand
|
|
47
|
+
"
|
|
48
|
+
color="primary"
|
|
49
|
+
>mdi-arrow-expand-all</v-icon
|
|
50
|
+
>
|
|
51
|
+
<v-icon
|
|
52
|
+
v-if="block.metadata.config.items[index].expand"
|
|
53
|
+
color="primary"
|
|
54
|
+
>
|
|
55
|
+
mdi-arrow-collapse-all
|
|
56
|
+
</v-icon>
|
|
57
|
+
</v-btn>
|
|
58
|
+
<TextEditor
|
|
59
|
+
v-show="!block.metadata.config.items[index].expand"
|
|
60
|
+
v-model="block.metadata.config.items[index].content"
|
|
61
|
+
:label="
|
|
62
|
+
$t(
|
|
63
|
+
'windward.core.components.settings.accordion.label'
|
|
64
|
+
)
|
|
65
|
+
"
|
|
66
|
+
:disabled="render"
|
|
67
|
+
></TextEditor>
|
|
68
|
+
<v-container class="pa-0 pt-3">
|
|
69
|
+
<h4>
|
|
70
|
+
{{
|
|
71
|
+
$t(
|
|
72
|
+
'windward.core.shared.settings.upload_file'
|
|
73
|
+
)
|
|
74
|
+
}}
|
|
75
|
+
</h4>
|
|
25
76
|
<v-text-field
|
|
26
77
|
v-model="
|
|
27
|
-
block.metadata.config.items[index].
|
|
78
|
+
block.metadata.config.items[index].altText
|
|
28
79
|
"
|
|
29
|
-
|
|
80
|
+
class="pt-3 pb-3"
|
|
81
|
+
:hide-details="true"
|
|
82
|
+
dense
|
|
30
83
|
outlined
|
|
31
84
|
:label="
|
|
32
|
-
$t(
|
|
33
|
-
|
|
34
|
-
:disabled="render"
|
|
35
|
-
@focus="onTextAreaFocus"
|
|
36
|
-
></v-text-field>
|
|
37
|
-
<v-btn
|
|
38
|
-
text
|
|
39
|
-
elevation="0"
|
|
40
|
-
class="mb-3"
|
|
41
|
-
:disabled="render"
|
|
42
|
-
@click="
|
|
43
|
-
onToggleExpand(
|
|
44
|
-
block.metadata.config.items[index]
|
|
85
|
+
$t(
|
|
86
|
+
'windward.core.shared.settings.alt_image'
|
|
45
87
|
)
|
|
46
88
|
"
|
|
47
|
-
>
|
|
48
|
-
|
|
49
|
-
v-if="
|
|
50
|
-
!block.metadata.config.items[index]
|
|
51
|
-
.expand
|
|
52
|
-
"
|
|
53
|
-
color="primary"
|
|
54
|
-
>mdi-arrow-expand-all</v-icon
|
|
55
|
-
>
|
|
56
|
-
<v-icon
|
|
57
|
-
v-if="
|
|
58
|
-
block.metadata.config.items[index]
|
|
59
|
-
.expand
|
|
60
|
-
"
|
|
61
|
-
color="primary"
|
|
62
|
-
>
|
|
63
|
-
mdi-arrow-collapse-all
|
|
64
|
-
</v-icon>
|
|
65
|
-
</v-btn>
|
|
66
|
-
<TextEditor
|
|
67
|
-
v-show="
|
|
68
|
-
!block.metadata.config.items[index].expand
|
|
69
|
-
"
|
|
89
|
+
></v-text-field>
|
|
90
|
+
<v-text-field
|
|
70
91
|
v-model="
|
|
71
|
-
block.metadata.config.items[index]
|
|
92
|
+
block.metadata.config.items[index]
|
|
93
|
+
.ariaDescribedBy
|
|
72
94
|
"
|
|
95
|
+
class="pt-3 pb-3"
|
|
96
|
+
:hide-details="true"
|
|
97
|
+
dense
|
|
98
|
+
outlined
|
|
73
99
|
:label="
|
|
74
100
|
$t(
|
|
75
|
-
'windward.core.
|
|
101
|
+
'windward.core.shared.settings.aria_described'
|
|
76
102
|
)
|
|
77
103
|
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}}
|
|
87
|
-
</h4>
|
|
88
|
-
<v-text-field
|
|
89
|
-
v-model="
|
|
90
|
-
block.metadata.config.items[index]
|
|
91
|
-
.altText
|
|
92
|
-
"
|
|
93
|
-
class="pt-3 pb-3"
|
|
94
|
-
:hide-details="true"
|
|
95
|
-
dense
|
|
96
|
-
outlined
|
|
97
|
-
:autofocus="true"
|
|
98
|
-
:label="
|
|
99
|
-
$t(
|
|
100
|
-
'windward.core.shared.settings.alt_image'
|
|
101
|
-
)
|
|
102
|
-
"
|
|
103
|
-
></v-text-field>
|
|
104
|
-
<v-text-field
|
|
105
|
-
v-model="
|
|
106
|
-
block.metadata.config.items[index]
|
|
107
|
-
.ariaDescribedBy
|
|
108
|
-
"
|
|
109
|
-
class="pt-3 pb-3"
|
|
110
|
-
:hide-details="true"
|
|
111
|
-
dense
|
|
112
|
-
outlined
|
|
113
|
-
:label="
|
|
114
|
-
$t(
|
|
115
|
-
'windward.core.shared.settings.aria_described'
|
|
116
|
-
)
|
|
117
|
-
"
|
|
118
|
-
></v-text-field>
|
|
119
|
-
<ContentBlockAsset
|
|
120
|
-
v-model="
|
|
121
|
-
block.metadata.config.items[index].file
|
|
122
|
-
"
|
|
123
|
-
mimes="image/png,image/jpeg"
|
|
124
|
-
:assets.sync="block.assets"
|
|
125
|
-
></ContentBlockAsset>
|
|
126
|
-
</v-container>
|
|
104
|
+
></v-text-field>
|
|
105
|
+
<ContentBlockAsset
|
|
106
|
+
v-model="
|
|
107
|
+
block.metadata.config.items[index].file
|
|
108
|
+
"
|
|
109
|
+
mimes="image/png,image/jpeg"
|
|
110
|
+
:assets.sync="block.assets"
|
|
111
|
+
></ContentBlockAsset>
|
|
127
112
|
</v-container>
|
|
128
|
-
</
|
|
129
|
-
</
|
|
130
|
-
</
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
</v-container>
|
|
147
|
-
</v-form>
|
|
113
|
+
</v-container>
|
|
114
|
+
</template>
|
|
115
|
+
</SortableExpansionPanel>
|
|
116
|
+
</v-container>
|
|
117
|
+
<v-container class="pa-0">
|
|
118
|
+
<v-row justify="center" class="my-4">
|
|
119
|
+
<v-btn
|
|
120
|
+
color="primary"
|
|
121
|
+
elevation="0"
|
|
122
|
+
:disabled="render"
|
|
123
|
+
@click="onAddElement"
|
|
124
|
+
><v-icon>mdi-plus</v-icon
|
|
125
|
+
>{{
|
|
126
|
+
$t('windward.core.components.settings.accordion.add')
|
|
127
|
+
}}</v-btn
|
|
128
|
+
>
|
|
129
|
+
</v-row>
|
|
130
|
+
</v-container>
|
|
148
131
|
<div v-if="loading" class="text-center">
|
|
149
132
|
<v-progress-circular
|
|
150
133
|
:size="70"
|
|
@@ -201,8 +184,17 @@ export default {
|
|
|
201
184
|
data() {
|
|
202
185
|
return {
|
|
203
186
|
expansionPanelKey: '0',
|
|
204
|
-
valid: true,
|
|
205
187
|
loading: false,
|
|
188
|
+
validation: {
|
|
189
|
+
titleRule: [
|
|
190
|
+
(v) =>
|
|
191
|
+
v.length <= 50 ||
|
|
192
|
+
this.$t(
|
|
193
|
+
'windward.core.shared.settings.errors.input_limitations',
|
|
194
|
+
[50]
|
|
195
|
+
),
|
|
196
|
+
],
|
|
197
|
+
},
|
|
206
198
|
}
|
|
207
199
|
},
|
|
208
200
|
beforeDestroy() {
|
|
@@ -251,11 +243,6 @@ export default {
|
|
|
251
243
|
//close all panels on drag, leaving them open confuses the tracking as indexes changes around
|
|
252
244
|
this.block.metadata.config.selectedPanels = null
|
|
253
245
|
},
|
|
254
|
-
onTextAreaFocus($event) {
|
|
255
|
-
// prevent focus error that is happening on text field because of last pass
|
|
256
|
-
$event.preventDefault()
|
|
257
|
-
$event.stopPropagation()
|
|
258
|
-
},
|
|
259
246
|
},
|
|
260
247
|
}
|
|
261
248
|
</script>
|