@windward/core 0.2.1 → 0.2.3
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/components/Content/Blocks/Accordion.vue +13 -4
- package/components/Content/Blocks/Email.vue +61 -23
- package/components/Content/Blocks/Feedback.vue +2 -1
- package/components/Content/Blocks/Image.vue +7 -0
- package/components/Content/Blocks/OpenResponseCollate.vue +1 -1
- package/components/Content/Blocks/UserUpload.vue +2 -2
- package/components/Settings/AccordionSettings.vue +36 -11
- package/components/Settings/EmailSettings.vue +61 -19
- package/components/Settings/MathSettings.vue +6 -4
- package/components/Settings/ScenarioChoiceSettings.vue +54 -47
- package/components/Settings/TabSettings.vue +3 -1
- package/components/Settings/TextEditorSettings.vue +72 -30
- package/components/Settings/UserUploadSettings.vue +3 -3
- package/components/Settings/VideoSettings.vue +2 -2
- package/components/utils/MathExpressionEditor.vue +4 -5
- package/components/utils/TinyMCEWrapper.vue +64 -11
- package/components/utils/glossary/CourseGlossary.vue +45 -32
- package/config/tinymce.config.ts +2 -1
- 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/helpers/tinymce/plugin.ts +18 -4
- package/i18n/en-US/components/content/blocks/email.ts +2 -0
- package/i18n/en-US/components/settings/accordion.ts +2 -1
- package/i18n/en-US/components/settings/email.ts +1 -0
- package/i18n/en-US/components/settings/text_editor.ts +4 -1
- package/i18n/es-ES/components/content/blocks/email.ts +2 -0
- package/i18n/es-ES/components/settings/accordion.ts +2 -1
- package/i18n/es-ES/components/settings/email.ts +1 -0
- package/i18n/es-ES/components/settings/text_editor.ts +4 -1
- package/i18n/sv-SE/components/content/blocks/email.ts +2 -0
- package/i18n/sv-SE/components/settings/accordion.ts +1 -0
- package/i18n/sv-SE/components/settings/email.ts +1 -0
- package/i18n/sv-SE/components/settings/text_editor.ts +4 -1
- 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
- package/test/Components/Settings/EmailSettings.spec.js +18 -2
|
@@ -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>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<v-expansion-panels
|
|
4
|
-
v-model="
|
|
4
|
+
v-model="selectedPanels"
|
|
5
5
|
flat
|
|
6
6
|
accordion
|
|
7
7
|
focusable
|
|
@@ -77,8 +77,8 @@ export default {
|
|
|
77
77
|
this.block.metadata.config.items = []
|
|
78
78
|
this.block.metadata.config.items.push(defaultObject)
|
|
79
79
|
}
|
|
80
|
-
if (_.isEmpty(this.block.metadata.config.
|
|
81
|
-
this.block.metadata.config.
|
|
80
|
+
if (_.isEmpty(this.block.metadata.config.selectedPanels)) {
|
|
81
|
+
this.block.metadata.config.selectedPanels = 0
|
|
82
82
|
}
|
|
83
83
|
this.block.body = this.$t(
|
|
84
84
|
'windward.core.shared.content_blocks.title.accordion'
|
|
@@ -88,10 +88,19 @@ export default {
|
|
|
88
88
|
return {
|
|
89
89
|
expansionPanelKey: '0',
|
|
90
90
|
editingInContentItem: false,
|
|
91
|
+
selectedPanels: 0,
|
|
91
92
|
}
|
|
92
93
|
},
|
|
93
94
|
watch: {
|
|
94
95
|
value(newValue) {
|
|
96
|
+
if (
|
|
97
|
+
!this.render &&
|
|
98
|
+
this.selectedPanels !== newValue.metadata.config.selectedPanels
|
|
99
|
+
) {
|
|
100
|
+
// update editing content block
|
|
101
|
+
this.selectedPanels = newValue.metadata.config.selectedPanels
|
|
102
|
+
this.expansionPanelKey = Crypto.id()
|
|
103
|
+
}
|
|
95
104
|
const length = newValue.metadata.config.items.length
|
|
96
105
|
let counter = 0
|
|
97
106
|
newValue.metadata.config.items.forEach((element) => {
|
|
@@ -115,6 +124,7 @@ export default {
|
|
|
115
124
|
this.block.metadata.config.items.forEach((element) => {
|
|
116
125
|
element.expand = false
|
|
117
126
|
})
|
|
127
|
+
this.selectedPanels = 0
|
|
118
128
|
}
|
|
119
129
|
},
|
|
120
130
|
},
|
|
@@ -123,7 +133,6 @@ export default {
|
|
|
123
133
|
this.block.metadata.config.items.forEach((element) => {
|
|
124
134
|
element.expand = false
|
|
125
135
|
})
|
|
126
|
-
this.block.metadata.config.currentAccordion = null
|
|
127
136
|
},
|
|
128
137
|
},
|
|
129
138
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-container
|
|
2
|
+
<v-container>
|
|
3
3
|
<v-row
|
|
4
4
|
v-if="
|
|
5
5
|
block.metadata.config.title ||
|
|
@@ -16,16 +16,20 @@
|
|
|
16
16
|
</v-col>
|
|
17
17
|
</v-row>
|
|
18
18
|
<v-row>
|
|
19
|
-
<v-expansion-panels
|
|
19
|
+
<v-expansion-panels
|
|
20
|
+
v-model="selectedPanels"
|
|
21
|
+
:key="expansionPanelKey"
|
|
22
|
+
accordion
|
|
23
|
+
>
|
|
20
24
|
<v-container
|
|
21
25
|
class="pa-0 primary container-subject d-flex justify-center align-center"
|
|
22
26
|
>
|
|
23
|
-
<v-row class="d-flex
|
|
27
|
+
<v-row class="d-flex ma-5">
|
|
24
28
|
<v-col cols="6">
|
|
25
29
|
{{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
$t(
|
|
31
|
+
'windward.core.components.content.blocks.email.email'
|
|
32
|
+
)
|
|
29
33
|
}}
|
|
30
34
|
</v-col>
|
|
31
35
|
<v-col
|
|
@@ -75,10 +79,10 @@
|
|
|
75
79
|
>
|
|
76
80
|
</v-col>
|
|
77
81
|
<v-col
|
|
78
|
-
xl="
|
|
79
|
-
lg="
|
|
80
|
-
md="
|
|
81
|
-
sm="
|
|
82
|
+
xl="4"
|
|
83
|
+
lg="4"
|
|
84
|
+
md="5"
|
|
85
|
+
sm="5"
|
|
82
86
|
xs="10"
|
|
83
87
|
class="d-flex align-center"
|
|
84
88
|
>
|
|
@@ -88,12 +92,16 @@
|
|
|
88
92
|
</v-col>
|
|
89
93
|
<v-col
|
|
90
94
|
v-if="selectedPanels !== index"
|
|
91
|
-
xl="
|
|
92
|
-
lg="
|
|
95
|
+
xl="7"
|
|
96
|
+
lg="7"
|
|
97
|
+
md="6"
|
|
98
|
+
sm="5"
|
|
93
99
|
class="d-flex align-center container-body-preview"
|
|
94
100
|
>
|
|
95
101
|
<div class="div-preview">
|
|
96
|
-
{{
|
|
102
|
+
{{
|
|
103
|
+
item.body ? onRemoveTags(item.body) : ''
|
|
104
|
+
}}
|
|
97
105
|
</div>
|
|
98
106
|
</v-col>
|
|
99
107
|
</v-row>
|
|
@@ -127,18 +135,25 @@
|
|
|
127
135
|
)
|
|
128
136
|
}}: {{ item.cc }}
|
|
129
137
|
</div>
|
|
138
|
+
<div class="div-details-cc">
|
|
139
|
+
{{
|
|
140
|
+
$t(
|
|
141
|
+
'windward.core.components.content.blocks.email.subject'
|
|
142
|
+
)
|
|
143
|
+
}}: {{ item.subject }}
|
|
144
|
+
</div>
|
|
130
145
|
</v-col>
|
|
131
146
|
</v-row>
|
|
132
147
|
<v-row>
|
|
133
148
|
<v-col cols="1"></v-col>
|
|
134
149
|
<v-col class="pl-4">
|
|
135
150
|
<TextViewer
|
|
136
|
-
v-if="!item.
|
|
151
|
+
v-if="!item.tinymce_expand"
|
|
137
152
|
v-model="item.body"
|
|
138
153
|
text-viewer
|
|
139
154
|
></TextViewer>
|
|
140
155
|
<TextEditor
|
|
141
|
-
v-if="!render && item.
|
|
156
|
+
v-if="!render && item.tinymce_expand"
|
|
142
157
|
v-model="
|
|
143
158
|
block.metadata.config.emails[index]
|
|
144
159
|
.body
|
|
@@ -155,7 +170,7 @@
|
|
|
155
170
|
>
|
|
156
171
|
<v-row class="pt-4">
|
|
157
172
|
<v-col cols="10" class="pa-0">
|
|
158
|
-
<v-btn color="primary"
|
|
173
|
+
<v-btn color="primary" text>
|
|
159
174
|
<v-icon>mdi-reply</v-icon>
|
|
160
175
|
{{
|
|
161
176
|
$t(
|
|
@@ -163,7 +178,7 @@
|
|
|
163
178
|
)
|
|
164
179
|
}}</v-btn
|
|
165
180
|
>
|
|
166
|
-
<v-btn color="primary"
|
|
181
|
+
<v-btn color="primary" text>
|
|
167
182
|
<v-icon>mdi-reply-all</v-icon>
|
|
168
183
|
{{
|
|
169
184
|
$t(
|
|
@@ -171,7 +186,7 @@
|
|
|
171
186
|
)
|
|
172
187
|
}}</v-btn
|
|
173
188
|
>
|
|
174
|
-
<v-btn color="primary"
|
|
189
|
+
<v-btn color="primary" text>
|
|
175
190
|
<v-icon>mdi-share</v-icon>
|
|
176
191
|
{{
|
|
177
192
|
$t(
|
|
@@ -199,6 +214,7 @@
|
|
|
199
214
|
</template>
|
|
200
215
|
<script>
|
|
201
216
|
import _ from 'lodash'
|
|
217
|
+
import Crypto from '~/helpers/Crypto'
|
|
202
218
|
import TextEditor from '~/components/Text/TextEditor'
|
|
203
219
|
import TextViewer from '~/components/Text/TextViewer'
|
|
204
220
|
import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
|
|
@@ -231,6 +247,9 @@ export default {
|
|
|
231
247
|
if (_.isEmpty(this.block.metadata.config.activeEmail)) {
|
|
232
248
|
this.block.metadata.config.activeEmail = 0
|
|
233
249
|
}
|
|
250
|
+
if (_.isEmpty(this.block.metadata.config.selectedPanels)) {
|
|
251
|
+
this.block.metadata.config.selectedPanels = 0
|
|
252
|
+
}
|
|
234
253
|
this.block.body = this.$t(
|
|
235
254
|
'windward.core.components.content.blocks.email.title'
|
|
236
255
|
)
|
|
@@ -242,18 +261,34 @@ export default {
|
|
|
242
261
|
}
|
|
243
262
|
},
|
|
244
263
|
watch: {
|
|
245
|
-
render() {
|
|
246
|
-
if (
|
|
264
|
+
render(newValue) {
|
|
265
|
+
if (newValue) {
|
|
247
266
|
this.block.metadata.config.emails.forEach((element) => {
|
|
248
|
-
element.
|
|
267
|
+
element.tinymce_expand = false
|
|
249
268
|
})
|
|
250
269
|
this.selectedPanels =
|
|
251
270
|
this.block.metadata.config.emails.length - 1
|
|
271
|
+
} else {
|
|
272
|
+
// when in editing mode first panel opens initially
|
|
273
|
+
this.selectedPanels = 0
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
value(newValue) {
|
|
277
|
+
if (
|
|
278
|
+
!this.render &&
|
|
279
|
+
this.selectedPanels !== newValue.metadata.config.selectedPanels
|
|
280
|
+
) {
|
|
281
|
+
// update editing content block
|
|
282
|
+
this.selectedPanels = newValue.metadata.config.selectedPanels
|
|
283
|
+
this.expansionPanelKey = Crypto.id()
|
|
252
284
|
}
|
|
253
285
|
},
|
|
254
286
|
},
|
|
255
287
|
mounted() {
|
|
256
|
-
this.selectedPanels =
|
|
288
|
+
this.selectedPanels =
|
|
289
|
+
this.block.metadata.config.emails.length === 0
|
|
290
|
+
? this.block.metadata.config.emails.length
|
|
291
|
+
: this.block.metadata.config.emails.length - 1
|
|
257
292
|
},
|
|
258
293
|
methods: {
|
|
259
294
|
onRemoveTags(body) {
|
|
@@ -284,7 +319,7 @@ export default {
|
|
|
284
319
|
.v-expansion-panel {
|
|
285
320
|
border: 1px solid var(--v-primary-base);
|
|
286
321
|
}
|
|
287
|
-
@media only screen and (max-width:
|
|
322
|
+
@media only screen and (max-width: 800px) {
|
|
288
323
|
.container-body-preview {
|
|
289
324
|
display: none !important;
|
|
290
325
|
}
|
|
@@ -299,4 +334,7 @@ export default {
|
|
|
299
334
|
.container-header {
|
|
300
335
|
width: 100%;
|
|
301
336
|
}
|
|
337
|
+
.v-expansion-panels {
|
|
338
|
+
z-index: 0 !important;
|
|
339
|
+
}
|
|
302
340
|
</style>
|
|
@@ -128,6 +128,10 @@ export default {
|
|
|
128
128
|
},
|
|
129
129
|
imageClass() {
|
|
130
130
|
let imageClass = ''
|
|
131
|
+
// change cursor to pointer for images that open in larger modal
|
|
132
|
+
if (this.block.metadata.config.modal) {
|
|
133
|
+
imageClass += ' container-pointer'
|
|
134
|
+
}
|
|
131
135
|
// If NOT hide background, inclide the extra class
|
|
132
136
|
if (!_.get(this.block.metadata, 'config.hide_background', false)) {
|
|
133
137
|
imageClass += ' img-white'
|
|
@@ -174,6 +178,9 @@ export default {
|
|
|
174
178
|
text-align: center;
|
|
175
179
|
margin-top: -175px;
|
|
176
180
|
}
|
|
181
|
+
.container-pointer {
|
|
182
|
+
cursor: pointer;
|
|
183
|
+
}
|
|
177
184
|
::v-deep .v-skeleton-loader.v-skeleton-loader--is-loading {
|
|
178
185
|
.v-skeleton-loader__image {
|
|
179
186
|
height: 100%;
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"
|
|
58
58
|
></FileDropZone>
|
|
59
59
|
|
|
60
|
-
<v-container class="
|
|
60
|
+
<v-container class="text-center">
|
|
61
61
|
<v-btn
|
|
62
62
|
:disabled="!canUpload || loading"
|
|
63
|
-
color="
|
|
63
|
+
color="primary"
|
|
64
64
|
class="text-center"
|
|
65
65
|
@click="handleUpload"
|
|
66
66
|
>
|
|
@@ -10,11 +10,9 @@
|
|
|
10
10
|
</p>
|
|
11
11
|
<SortableExpansionPanel
|
|
12
12
|
v-model="block.metadata.config.items"
|
|
13
|
-
v-bind:currentPanel.sync="
|
|
14
|
-
block.metadata.config.currentAccordion
|
|
15
|
-
"
|
|
16
13
|
@click:close="onRemoveElement($event)"
|
|
17
14
|
@change="onDragged"
|
|
15
|
+
@update:currentPanel="onUpdatePanel"
|
|
18
16
|
>
|
|
19
17
|
<template #header="{ item }">{{
|
|
20
18
|
item.header
|
|
@@ -26,16 +24,17 @@
|
|
|
26
24
|
<template #body="{ index }">
|
|
27
25
|
<v-container :key="expansionPanelKey">
|
|
28
26
|
<v-text-field
|
|
29
|
-
outlined
|
|
30
|
-
:autofocus="true"
|
|
31
27
|
v-model="
|
|
32
28
|
block.metadata.config.items[index].header
|
|
33
29
|
"
|
|
30
|
+
:autofocus="true"
|
|
31
|
+
outlined
|
|
34
32
|
:label="
|
|
35
33
|
$t(
|
|
36
34
|
'windward.core.shared.settings.title.title'
|
|
37
35
|
)
|
|
38
36
|
"
|
|
37
|
+
@focus="onTextAreaFocus"
|
|
39
38
|
></v-text-field>
|
|
40
39
|
<v-btn
|
|
41
40
|
@click="
|
|
@@ -43,12 +42,14 @@
|
|
|
43
42
|
block.metadata.config.items[index]
|
|
44
43
|
)
|
|
45
44
|
"
|
|
45
|
+
text
|
|
46
46
|
>
|
|
47
47
|
<v-icon
|
|
48
48
|
v-if="
|
|
49
49
|
!block.metadata.config.items[index]
|
|
50
50
|
.expand
|
|
51
51
|
"
|
|
52
|
+
color="primary"
|
|
52
53
|
>mdi-arrow-expand-all</v-icon
|
|
53
54
|
>
|
|
54
55
|
<v-icon
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
block.metadata.config.items[index]
|
|
57
58
|
.expand
|
|
58
59
|
"
|
|
60
|
+
color="primary"
|
|
59
61
|
>
|
|
60
62
|
mdi-arrow-collapse-all
|
|
61
63
|
</v-icon>
|
|
@@ -67,6 +69,11 @@
|
|
|
67
69
|
v-model="
|
|
68
70
|
block.metadata.config.items[index].content
|
|
69
71
|
"
|
|
72
|
+
:label="
|
|
73
|
+
$t(
|
|
74
|
+
'windward.core.components.settings.accordion.label'
|
|
75
|
+
)
|
|
76
|
+
"
|
|
70
77
|
></TextEditor>
|
|
71
78
|
</v-container>
|
|
72
79
|
</template>
|
|
@@ -131,10 +138,9 @@ export default {
|
|
|
131
138
|
this.block.metadata.config.items = []
|
|
132
139
|
this.block.metadata.config.items.push(defaultObject)
|
|
133
140
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
this.block.body = this.$t('windward.core.shared.content_blocks.title.accordion')
|
|
141
|
+
this.block.body = this.$t(
|
|
142
|
+
'windward.core.shared.content_blocks.title.accordion'
|
|
143
|
+
)
|
|
138
144
|
},
|
|
139
145
|
data() {
|
|
140
146
|
return {
|
|
@@ -148,8 +154,20 @@ export default {
|
|
|
148
154
|
clearTimeout(this.debouncer)
|
|
149
155
|
}
|
|
150
156
|
},
|
|
151
|
-
|
|
157
|
+
mounted() {
|
|
158
|
+
this.block.metadata.config.selectedPanels = 0
|
|
159
|
+
},
|
|
152
160
|
methods: {
|
|
161
|
+
onUpdatePanel($event) {
|
|
162
|
+
if ($event !== this.block.metadata.config.selectedPanels) {
|
|
163
|
+
//catch click event to open selected panel to edit
|
|
164
|
+
this.block.metadata.config.selectedPanels = $event
|
|
165
|
+
} else {
|
|
166
|
+
// if user clicks same panel again expansion panel closes
|
|
167
|
+
// setting selected to null will close content blocks expansion panels
|
|
168
|
+
this.block.metadata.config.selectedPanels = null
|
|
169
|
+
}
|
|
170
|
+
},
|
|
153
171
|
onAddElement() {
|
|
154
172
|
const default_item = {
|
|
155
173
|
header: '',
|
|
@@ -157,7 +175,7 @@ export default {
|
|
|
157
175
|
content: '',
|
|
158
176
|
}
|
|
159
177
|
this.block.metadata.config.items.push(default_item)
|
|
160
|
-
this.block.metadata.config.
|
|
178
|
+
this.block.metadata.config.selectedPanels =
|
|
161
179
|
this.block.metadata.config.items.length - 1
|
|
162
180
|
},
|
|
163
181
|
onRemoveElement(index) {
|
|
@@ -171,6 +189,13 @@ export default {
|
|
|
171
189
|
onDragged() {
|
|
172
190
|
// need to remount body after dragged to update the content body on the element
|
|
173
191
|
this.expansionPanelKey = Crypto.id()
|
|
192
|
+
//close all panels on drag, leaving them open confuses the tracking as indexes changes around
|
|
193
|
+
this.block.metadata.config.selectedPanels = null
|
|
194
|
+
},
|
|
195
|
+
onTextAreaFocus($event) {
|
|
196
|
+
// prevent focus error that is happening on text field because of last pass
|
|
197
|
+
$event.preventDefault()
|
|
198
|
+
$event.stopPropagation()
|
|
174
199
|
},
|
|
175
200
|
},
|
|
176
201
|
}
|