@windward/core 0.1.0 → 0.1.2

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.
Files changed (154) hide show
  1. package/.idea/codeStyles/Project.xml +58 -0
  2. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  3. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/php-docker-settings.xml +24 -0
  6. package/.idea/php.xml +19 -0
  7. package/.idea/vcs.xml +6 -0
  8. package/.idea/watcherTasks.xml +4 -0
  9. package/.idea/windward-ui-plugin-core.iml +8 -0
  10. package/components/Content/Blocks/Accordion.vue +7 -2
  11. package/components/Content/Blocks/Email.vue +248 -0
  12. package/components/Content/Blocks/Image.vue +1 -1
  13. package/components/Content/Blocks/OpenResponse.vue +2 -2
  14. package/components/Content/Blocks/Tab.vue +7 -3
  15. package/components/Content/Blocks/UserUpload.vue +2 -2
  16. package/components/Settings/AccordionSettings.vue +9 -1
  17. package/components/Settings/EmailSettings.vue +216 -0
  18. package/components/Settings/ImageSettings.vue +1 -1
  19. package/components/Settings/OpenResponseCollateSettings.vue +1 -1
  20. package/components/Settings/OpenResponseSettings.vue +1 -1
  21. package/components/Settings/TabSettings.vue +7 -1
  22. package/components/Settings/TextEditorSettings.vue +1 -1
  23. package/components/Settings/UserUploadSettings.vue +1 -1
  24. package/components/utils/FillInBlank/FillInBlankInput.vue +5 -0
  25. package/components/utils/TinyMCEWrapper.vue +1 -1
  26. package/coverage/clover.xml +223 -0
  27. package/coverage/coverage-final.json +16 -0
  28. package/coverage/lcov-report/base.css +224 -0
  29. package/coverage/lcov-report/block-navigation.js +87 -0
  30. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +430 -0
  31. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +394 -0
  32. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +262 -0
  33. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +295 -0
  34. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +415 -0
  35. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +667 -0
  36. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +2275 -0
  37. package/coverage/lcov-report/components/Content/Blocks/index.html +206 -0
  38. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +199 -0
  39. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +919 -0
  40. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +343 -0
  41. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +271 -0
  42. package/coverage/lcov-report/components/utils/index.html +161 -0
  43. package/coverage/lcov-report/config/index.html +116 -0
  44. package/coverage/lcov-report/config/tinymce.config.js.html +493 -0
  45. package/coverage/lcov-report/favicon.png +0 -0
  46. package/coverage/lcov-report/helpers/MathHelper.ts.html +793 -0
  47. package/coverage/lcov-report/helpers/index.html +116 -0
  48. package/coverage/lcov-report/helpers/tinymce/index.html +116 -0
  49. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +334 -0
  50. package/coverage/lcov-report/index.html +191 -0
  51. package/coverage/lcov-report/prettify.css +1 -0
  52. package/coverage/lcov-report/prettify.js +2 -0
  53. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  54. package/coverage/lcov-report/sorter.js +196 -0
  55. package/coverage/lcov-report/test/index.html +116 -0
  56. package/coverage/lcov-report/test/mocks.js.html +457 -0
  57. package/coverage/lcov.info +403 -0
  58. package/helpers/MathHelper.ts +3 -3
  59. package/i18n/en-US/components/content/blocks/email.ts +12 -0
  60. package/i18n/en-US/components/content/blocks/index.ts +3 -1
  61. package/i18n/en-US/components/settings/email.ts +9 -0
  62. package/i18n/en-US/components/settings/index.ts +2 -0
  63. package/i18n/en-US/shared/content_blocks.ts +1 -1
  64. package/i18n/en-US/shared/settings.ts +3 -0
  65. package/i18n/es-ES/components/content/blocks/email.ts +12 -0
  66. package/i18n/es-ES/components/content/blocks/index.ts +3 -1
  67. package/i18n/es-ES/components/settings/email.ts +9 -0
  68. package/i18n/es-ES/components/settings/index.ts +3 -1
  69. package/i18n/es-ES/shared/content_blocks.ts +1 -1
  70. package/i18n/es-ES/shared/settings.ts +3 -0
  71. package/i18n/sv-SE/components/content/blocks/email.ts +12 -0
  72. package/i18n/sv-SE/components/content/blocks/index.ts +3 -1
  73. package/i18n/sv-SE/components/settings/email.ts +9 -0
  74. package/i18n/sv-SE/components/settings/index.ts +3 -1
  75. package/i18n/sv-SE/shared/content_blocks.ts +1 -1
  76. package/i18n/sv-SE/shared/settings.ts +3 -0
  77. package/lib/helpers/GlossaryHelper.d.ts +9 -0
  78. package/lib/helpers/GlossaryHelper.js +118 -0
  79. package/lib/helpers/GlossaryTerm.d.ts +10 -0
  80. package/lib/helpers/GlossaryTerm.js +22 -0
  81. package/lib/helpers/MathHelper.d.ts +99 -0
  82. package/lib/helpers/MathHelper.js +194 -0
  83. package/lib/helpers/tinymce/plugin.d.ts +2 -0
  84. package/lib/helpers/tinymce/plugin.js +86 -0
  85. package/lib/i18n/en-US/components/content/blocks/image.d.ts +6 -0
  86. package/lib/i18n/en-US/components/content/blocks/image.js +7 -0
  87. package/lib/i18n/en-US/components/content/blocks/index.d.ts +75 -0
  88. package/lib/i18n/en-US/components/content/blocks/index.js +14 -0
  89. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +5 -0
  90. package/lib/i18n/en-US/components/content/blocks/tab.js +6 -0
  91. package/lib/i18n/en-US/components/content/blocks/table.d.ts +5 -0
  92. package/lib/i18n/en-US/components/content/blocks/table.js +6 -0
  93. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +13 -0
  94. package/lib/i18n/en-US/components/content/blocks/user_upload.js +14 -0
  95. package/lib/i18n/en-US/components/content/blocks/video.d.ts +48 -0
  96. package/lib/i18n/en-US/components/content/blocks/video.js +49 -0
  97. package/lib/i18n/en-US/components/content/index.d.ts +77 -0
  98. package/lib/i18n/en-US/components/content/index.js +6 -0
  99. package/lib/i18n/en-US/components/index.d.ts +140 -0
  100. package/lib/i18n/en-US/components/index.js +12 -0
  101. package/lib/i18n/en-US/components/navigation/image.d.ts +5 -0
  102. package/lib/i18n/en-US/components/navigation/image.js +6 -0
  103. package/lib/i18n/en-US/components/navigation/index.d.ts +10 -0
  104. package/lib/i18n/en-US/components/navigation/index.js +8 -0
  105. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +4 -0
  106. package/lib/i18n/en-US/components/navigation/user_upload.js +5 -0
  107. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +6 -0
  108. package/lib/i18n/en-US/components/settings/clickable_icon.js +7 -0
  109. package/lib/i18n/en-US/components/settings/image.d.ts +2 -0
  110. package/lib/i18n/en-US/components/settings/image.js +3 -0
  111. package/lib/i18n/en-US/components/settings/index.d.ts +39 -0
  112. package/lib/i18n/en-US/components/settings/index.js +14 -0
  113. package/lib/i18n/en-US/components/settings/text_editor.d.ts +8 -0
  114. package/lib/i18n/en-US/components/settings/text_editor.js +9 -0
  115. package/lib/i18n/en-US/components/settings/user_upload.d.ts +12 -0
  116. package/lib/i18n/en-US/components/settings/user_upload.js +13 -0
  117. package/lib/i18n/en-US/components/settings/video.d.ts +13 -0
  118. package/lib/i18n/en-US/components/settings/video.js +14 -0
  119. package/lib/i18n/en-US/components/utils/index.d.ts +15 -0
  120. package/lib/i18n/en-US/components/utils/index.js +6 -0
  121. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +13 -0
  122. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +14 -0
  123. package/lib/i18n/en-US/index.d.ts +197 -0
  124. package/lib/i18n/en-US/index.js +16 -0
  125. package/lib/i18n/en-US/modules/index.d.ts +2 -0
  126. package/lib/i18n/en-US/modules/index.js +6 -0
  127. package/lib/i18n/en-US/pages/glossary.d.ts +8 -0
  128. package/lib/i18n/en-US/pages/glossary.js +9 -0
  129. package/lib/i18n/en-US/pages/index.d.ts +13 -0
  130. package/lib/i18n/en-US/pages/index.js +8 -0
  131. package/lib/i18n/en-US/pages/user_upload.d.ts +4 -0
  132. package/lib/i18n/en-US/pages/user_upload.js +5 -0
  133. package/lib/i18n/en-US/shared/content_blocks.d.ts +20 -0
  134. package/lib/i18n/en-US/shared/content_blocks.js +21 -0
  135. package/lib/i18n/en-US/shared/index.d.ts +39 -0
  136. package/lib/i18n/en-US/shared/index.js +10 -0
  137. package/lib/i18n/en-US/shared/menu.d.ts +4 -0
  138. package/lib/i18n/en-US/shared/menu.js +5 -0
  139. package/lib/i18n/en-US/shared/settings.d.ts +15 -0
  140. package/lib/i18n/en-US/shared/settings.js +16 -0
  141. package/lib/i18n/en-US.d.ts +197 -0
  142. package/lib/i18n/en-US.js +15 -0
  143. package/lib/models/UserFileAsset.d.ts +5 -0
  144. package/lib/models/UserFileAsset.js +37 -0
  145. package/package.json +1 -1
  146. package/plugin.js +21 -0
  147. package/test/Components/Content/Blocks/Accordion.spec.js +2 -0
  148. package/test/Components/Content/Blocks/BlockQuote.spec.js +2 -0
  149. package/test/Components/Content/Blocks/Email.spec.js +23 -0
  150. package/test/Components/Content/Blocks/Feedback.spec.js +1 -0
  151. package/test/Components/Content/Blocks/Math.spec.js +1 -0
  152. package/test/Components/Content/Blocks/Tab.spec.js +1 -0
  153. package/test/Components/Settings/EmailSettings.spec.js +45 -0
  154. package/test/__mocks__/componentsMock.js +6 -0
@@ -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,5 @@
1
+ <component name="ProjectCodeStyleConfiguration">
2
+ <state>
3
+ <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
+ </state>
5
+ </component>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ </profile>
6
+ </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,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectTasksOptions" suppressed-tasks="SCSS" />
4
+ </project>
@@ -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,6 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <v-expansion-panels
4
+ v-model="block.metadata.config.currentAccordion"
4
5
  flat
5
6
  accordion
6
7
  focusable
@@ -43,8 +44,8 @@
43
44
  <script>
44
45
  import _ from 'lodash'
45
46
  import Crypto from '~/helpers/Crypto'
46
- import TextEditor from '~/components/Text/TextEditor.vue'
47
- import TextViewer from '~/components/Text/TextViewer.vue'
47
+ import TextEditor from '~/components/Text/TextEditor'
48
+ import TextViewer from '~/components/Text/TextViewer'
48
49
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
49
50
 
50
51
  export default {
@@ -73,6 +74,9 @@ export default {
73
74
  this.block.metadata.config.items = []
74
75
  this.block.metadata.config.items.push(defaultObject)
75
76
  }
77
+ if (_.isEmpty(this.block.metadata.config.currentAccordion)) {
78
+ this.block.metadata.config.currentAccordion = 0
79
+ }
76
80
  this.block.body = 'accordion'
77
81
  },
78
82
  data() {
@@ -114,6 +118,7 @@ export default {
114
118
  this.block.metadata.config.items.forEach((element) => {
115
119
  element.expand = false
116
120
  })
121
+ this.block.metadata.config.currentAccordion = null
117
122
  },
118
123
  },
119
124
  }
@@ -0,0 +1,248 @@
1
+ <template>
2
+ <v-container class="container-left-border">
3
+ <v-row
4
+ v-if="
5
+ block.metadata.config.title ||
6
+ block.metadata.config.instructions
7
+ "
8
+ >
9
+ <v-col cols="12" class="pa-0">
10
+ <h3 v-if="block.metadata.config.title">
11
+ {{ block.metadata.config.title }}
12
+ </h3>
13
+ <p v-if="block.metadata.config.instructions" class="pb-0 mb-0">
14
+ {{ block.metadata.config.instructions }}
15
+ </p>
16
+ </v-col>
17
+ </v-row>
18
+ <v-row>
19
+ <v-expansion-panels v-model="selectedPanels" accordion>
20
+ <v-container
21
+ class="pa-0 primary container-subject d-flex justify-center align-center"
22
+ >
23
+ <v-row class="d-flex pa-5">
24
+ <v-col cols="6">
25
+ {{
26
+ block.metadata.config.subject
27
+ ? block.metadata.config.subject
28
+ : 'Subject'
29
+ }}
30
+ </v-col>
31
+ <v-col
32
+ cols="6"
33
+ class="d-flex justify-end column-simulation"
34
+ >
35
+ {{
36
+ $t(
37
+ 'windward.core.components.content.blocks.email.simulation'
38
+ )
39
+ }}
40
+ </v-col>
41
+ </v-row>
42
+ </v-container>
43
+ <v-expansion-panel
44
+ v-for="(item, index) in block.metadata.config.emails"
45
+ :key="index"
46
+ elevation="0"
47
+ >
48
+ <v-expansion-panel-header>
49
+ <v-row>
50
+ <v-col class="pa-0 d-flex align-center">
51
+ <v-btn fab x-small class="primary" elevation="0"
52
+ >{{ item.initials ? item.initials : '' }}
53
+ </v-btn>
54
+ <v-icon
55
+ v-if="
56
+ block.metadata.config.emails.length !==
57
+ index + 1
58
+ "
59
+ >mdi-circle-medium</v-icon
60
+ >
61
+ <v-icon
62
+ v-if="
63
+ block.metadata.config.emails.length ===
64
+ index + 1
65
+ "
66
+ color="secondary"
67
+ >mdi-circle-medium</v-icon
68
+ >
69
+ <span class="span-details"
70
+ >{{ item.from ? item.from : 'From' }}
71
+ </span>
72
+ </v-col>
73
+ <v-col> </v-col>
74
+ </v-row>
75
+ </v-expansion-panel-header>
76
+ <v-expansion-panel-content>
77
+ <v-container class="pa-0 container-details">
78
+ <v-row>
79
+ <v-col cols="1"></v-col>
80
+ <v-col class="pa-0 div-details">
81
+ <div class="div-details-to pl-4">
82
+ {{
83
+ $t(
84
+ 'windward.core.components.content.blocks.email.to'
85
+ )
86
+ }}: {{ item.to }}
87
+ </div>
88
+ <div class="div-details-cc pl-4">
89
+ {{
90
+ $t(
91
+ 'windward.core.components.content.blocks.email.cc'
92
+ )
93
+ }}: {{ item.cc }}
94
+ </div>
95
+ </v-col>
96
+ </v-row>
97
+ <v-row>
98
+ <v-col cols="1"></v-col>
99
+ <v-col class="pl-4">
100
+ <TextViewer
101
+ v-if="!item.expand"
102
+ v-model="item.body"
103
+ text-viewer
104
+ ></TextViewer>
105
+ <TextEditor
106
+ v-if="!render && item.expand"
107
+ v-model="
108
+ block.metadata.config.emails[index]
109
+ .body
110
+ "
111
+ ></TextEditor>
112
+ </v-col>
113
+ </v-row>
114
+ </v-container>
115
+ <v-container
116
+ v-if="
117
+ block.metadata.config.emails.length ===
118
+ index + 1
119
+ "
120
+ >
121
+ <v-row class="pt-4">
122
+ <v-col cols="10" class="pa-0">
123
+ <v-btn color="primary" outlined>
124
+ <v-icon>mdi-reply</v-icon>
125
+ {{
126
+ $t(
127
+ 'windward.core.components.content.blocks.email.reply'
128
+ )
129
+ }}</v-btn
130
+ >
131
+ <v-btn color="primary" outlined>
132
+ <v-icon>mdi-reply-all</v-icon>
133
+ {{
134
+ $t(
135
+ 'windward.core.components.content.blocks.email.reply_all'
136
+ )
137
+ }}</v-btn
138
+ >
139
+ <v-btn color="primary" outlined>
140
+ <v-icon>mdi-share</v-icon>
141
+ {{
142
+ $t(
143
+ 'windward.core.components.content.blocks.email.forward'
144
+ )
145
+ }}</v-btn
146
+ >
147
+ </v-col>
148
+ <v-col cols="2" class="pa-0 d-flex justify-end">
149
+ <v-btn color="primary" outlined>
150
+ {{
151
+ $t(
152
+ 'windward.core.components.content.blocks.email.reset'
153
+ )
154
+ }}
155
+ </v-btn>
156
+ </v-col>
157
+ </v-row>
158
+ </v-container>
159
+ </v-expansion-panel-content>
160
+ </v-expansion-panel>
161
+ </v-expansion-panels>
162
+ </v-row>
163
+ </v-container>
164
+ </template>
165
+ <script>
166
+ import _ from 'lodash'
167
+ import TextEditor from '~/components/Text/TextEditor'
168
+ import TextViewer from '~/components/Text/TextViewer'
169
+ import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
170
+ export default {
171
+ name: 'ContentBlockEmail',
172
+ extends: BaseContentBlock,
173
+ components: {
174
+ TextEditor,
175
+ TextViewer,
176
+ },
177
+ beforeMount() {
178
+ if (_.isEmpty(this.block)) {
179
+ this.block = {}
180
+ }
181
+ if (_.isEmpty(this.block.metadata)) {
182
+ this.block.metadata = {}
183
+ }
184
+ if (_.isEmpty(this.block.metadata.config)) {
185
+ this.block.metadata.config = {}
186
+ }
187
+ if (_.isEmpty(this.block.metadata.config.title)) {
188
+ this.block.metadata.config.title = ''
189
+ }
190
+ if (_.isEmpty(this.block.metadata.config.instructions)) {
191
+ this.block.metadata.config.instructions = ''
192
+ }
193
+ if (_.isEmpty(this.block.metadata.config.emails)) {
194
+ this.block.metadata.config.emails = []
195
+ }
196
+ if (_.isEmpty(this.block.metadata.config.activeEmail)) {
197
+ this.block.metadata.config.activeEmail = 0
198
+ }
199
+ this.block.body = 'emails'
200
+ },
201
+ data() {
202
+ return {
203
+ expansionPanelKey: 0,
204
+ selectedPanels: 0,
205
+ }
206
+ },
207
+ watch: {
208
+ render() {
209
+ if (this.render) {
210
+ this.block.metadata.config.emails.forEach((element) => {
211
+ element.expand = false
212
+ })
213
+ this.selectedPanels =
214
+ this.block.metadata.config.emails.length - 1
215
+ }
216
+ },
217
+ },
218
+ mounted() {
219
+ this.selectedPanels = this.block.metadata.config.emails.length - 1
220
+ },
221
+ methods: {},
222
+ }
223
+ </script>
224
+ <style scoped>
225
+ .container-subject {
226
+ height: 40px;
227
+ }
228
+ .column-simulation {
229
+ font-size: 12px;
230
+ }
231
+ .container-details {
232
+ font-size: 10px;
233
+ margin-top: -26px;
234
+ }
235
+ .div-details {
236
+ color: grey;
237
+ }
238
+ .div-details-cc {
239
+ margin-top: -9px;
240
+ }
241
+ .span-details {
242
+ font-weight: bold;
243
+ font-size: 14px;
244
+ }
245
+ .v-expansion-panel {
246
+ border: 1px solid var(--v-primary-base);
247
+ }
248
+ </style>
@@ -45,7 +45,7 @@
45
45
 
46
46
  <script>
47
47
  import _ from 'lodash'
48
- import TextViewer from '~/components/Text/TextViewer.vue'
48
+ import TextViewer from '~/components/Text/TextViewer'
49
49
  import Crypto from '~/helpers/Crypto'
50
50
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
51
51
 
@@ -76,8 +76,8 @@
76
76
  <script>
77
77
  import _ from 'lodash'
78
78
  import { mapGetters } from 'vuex'
79
- import TextViewer from '~/components/Text/TextViewer.vue'
80
- import TextEditor from '~/components/Text/TextEditor.vue'
79
+ import TextViewer from '~/components/Text/TextViewer'
80
+ import TextEditor from '~/components/Text/TextEditor'
81
81
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
82
82
  import UserContentBlockState from '~/models/UserContentBlockState'
83
83
 
@@ -3,7 +3,7 @@
3
3
  <v-container>
4
4
  <v-tabs
5
5
  background-color="primary"
6
- v-model="block.metadata.config.tab"
6
+ v-model="block.metadata.config.currentTab"
7
7
  >
8
8
  <v-tabs-slider></v-tabs-slider>
9
9
  <v-tab
@@ -40,8 +40,8 @@
40
40
 
41
41
  <script>
42
42
  import _ from 'lodash'
43
- import TextEditor from '~/components/Text/TextEditor.vue'
44
- import TextViewer from '~/components/Text/TextViewer.vue'
43
+ import TextEditor from '~/components/Text/TextEditor'
44
+ import TextViewer from '~/components/Text/TextViewer'
45
45
  import BaseContentBlock from '~/components/Content/Blocks/BaseContentBlock'
46
46
 
47
47
  export default {
@@ -74,6 +74,9 @@ export default {
74
74
  }
75
75
  })
76
76
  }
77
+ if (_.isEmpty(this.block.metadata.config.currentTab)) {
78
+ this.block.metadata.config.currentTab = 0
79
+ }
77
80
  },
78
81
  data() {
79
82
  return {}
@@ -83,6 +86,7 @@ export default {
83
86
  this.block.metadata.config.items.forEach((element) => {
84
87
  element.expand = false
85
88
  })
89
+ this.block.metadata.config.currentTab = null
86
90
  },
87
91
  },
88
92
  }
@@ -92,8 +92,8 @@
92
92
  <script>
93
93
  import _ from 'lodash'
94
94
  import { mapGetters } from 'vuex'
95
- import TextViewer from '~/components/Text/TextViewer.vue'
96
- import TextEditor from '~/components/Text/TextEditor.vue'
95
+ import TextViewer from '~/components/Text/TextViewer'
96
+ import TextEditor from '~/components/Text/TextEditor'
97
97
  import Uuid from '~/helpers/Uuid'
98
98
  import Download from '~/helpers/Download'
99
99
 
@@ -10,6 +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
+ "
13
16
  @click:close="onRemoveElement($event)"
14
17
  @change="onDragged"
15
18
  >
@@ -17,7 +20,7 @@
17
20
  item.header
18
21
  ? item.header
19
22
  : $t(
20
- 'plugin.games.components.settings.bucket_game.form.enter_text'
23
+ 'windward.core.shared.settings.title.placeholder'
21
24
  )
22
25
  }}</template>
23
26
  <template #body="{ index }">
@@ -128,6 +131,9 @@ export default {
128
131
  this.block.metadata.config.items = []
129
132
  this.block.metadata.config.items.push(defaultObject)
130
133
  }
134
+ if (_.isEmpty(this.block.metadata.config.currentAccordion)) {
135
+ this.block.metadata.config.currentAccordion = 0
136
+ }
131
137
  this.block.body = this.$t(
132
138
  'windward.core.components.settings.accordion.accordion'
133
139
  )
@@ -153,6 +159,8 @@ export default {
153
159
  content: '',
154
160
  }
155
161
  this.block.metadata.config.items.push(default_item)
162
+ this.block.metadata.config.currentAccordion =
163
+ this.block.metadata.config.items.length - 1
156
164
  },
157
165
  onRemoveElement(index) {
158
166
  this.block.metadata.config.items.splice(index, 1)