@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.
Files changed (130) 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/CHANGELOG.md +4 -0
  11. package/components/Content/Blocks/Accordion.vue +14 -0
  12. package/components/Content/Blocks/ClickableIcons.vue +23 -20
  13. package/components/Content/Blocks/FileDownload.vue +6 -8
  14. package/components/Content/Blocks/ScenarioChoice.vue +1 -1
  15. package/components/Settings/AccordionSettings.vue +124 -137
  16. package/components/Settings/BlockQuoteSettings.vue +33 -2
  17. package/components/Settings/ClickableIconsSettings.vue +30 -10
  18. package/components/Settings/EmailSettings.vue +31 -4
  19. package/components/Settings/FileDownloadSettings.vue +28 -3
  20. package/components/Settings/ScenarioChoiceSettings.vue +30 -7
  21. package/components/Settings/TabSettings.vue +13 -3
  22. package/components/Settings/TextEditorSettings.vue +14 -2
  23. package/components/Settings/UserUploadSettings.vue +24 -3
  24. package/components/Settings/VideoSettings.vue +30 -0
  25. package/components/utils/TinyMCEWrapper.vue +22 -1
  26. package/config/menu.config.json +475 -0
  27. package/coverage/clover.xml +223 -0
  28. package/coverage/coverage-final.json +16 -0
  29. package/coverage/lcov-report/base.css +224 -0
  30. package/coverage/lcov-report/block-navigation.js +87 -0
  31. package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +430 -0
  32. package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +394 -0
  33. package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +262 -0
  34. package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +295 -0
  35. package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +415 -0
  36. package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +667 -0
  37. package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +2275 -0
  38. package/coverage/lcov-report/components/Content/Blocks/index.html +206 -0
  39. package/coverage/lcov-report/components/utils/ContentViewer.vue.html +199 -0
  40. package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +919 -0
  41. package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +343 -0
  42. package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +271 -0
  43. package/coverage/lcov-report/components/utils/index.html +161 -0
  44. package/coverage/lcov-report/config/index.html +116 -0
  45. package/coverage/lcov-report/config/tinymce.config.js.html +493 -0
  46. package/coverage/lcov-report/favicon.png +0 -0
  47. package/coverage/lcov-report/helpers/MathHelper.ts.html +793 -0
  48. package/coverage/lcov-report/helpers/index.html +116 -0
  49. package/coverage/lcov-report/helpers/tinymce/index.html +116 -0
  50. package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +334 -0
  51. package/coverage/lcov-report/index.html +191 -0
  52. package/coverage/lcov-report/prettify.css +1 -0
  53. package/coverage/lcov-report/prettify.js +2 -0
  54. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  55. package/coverage/lcov-report/sorter.js +196 -0
  56. package/coverage/lcov-report/test/index.html +116 -0
  57. package/coverage/lcov-report/test/mocks.js.html +457 -0
  58. package/coverage/lcov.info +403 -0
  59. package/i18n/en-US/shared/settings.ts +3 -0
  60. package/i18n/es-ES/shared/settings.ts +3 -0
  61. package/i18n/sv-SE/shared/settings.ts +3 -0
  62. package/lib/helpers/GlossaryHelper.d.ts +9 -0
  63. package/lib/helpers/GlossaryHelper.js +118 -0
  64. package/lib/helpers/GlossaryTerm.d.ts +10 -0
  65. package/lib/helpers/GlossaryTerm.js +22 -0
  66. package/lib/helpers/MathHelper.d.ts +99 -0
  67. package/lib/helpers/MathHelper.js +194 -0
  68. package/lib/helpers/tinymce/plugin.d.ts +2 -0
  69. package/lib/helpers/tinymce/plugin.js +86 -0
  70. package/lib/i18n/en-US/components/content/blocks/image.d.ts +6 -0
  71. package/lib/i18n/en-US/components/content/blocks/image.js +7 -0
  72. package/lib/i18n/en-US/components/content/blocks/index.d.ts +75 -0
  73. package/lib/i18n/en-US/components/content/blocks/index.js +14 -0
  74. package/lib/i18n/en-US/components/content/blocks/tab.d.ts +5 -0
  75. package/lib/i18n/en-US/components/content/blocks/tab.js +6 -0
  76. package/lib/i18n/en-US/components/content/blocks/table.d.ts +5 -0
  77. package/lib/i18n/en-US/components/content/blocks/table.js +6 -0
  78. package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +13 -0
  79. package/lib/i18n/en-US/components/content/blocks/user_upload.js +14 -0
  80. package/lib/i18n/en-US/components/content/blocks/video.d.ts +48 -0
  81. package/lib/i18n/en-US/components/content/blocks/video.js +49 -0
  82. package/lib/i18n/en-US/components/content/index.d.ts +77 -0
  83. package/lib/i18n/en-US/components/content/index.js +6 -0
  84. package/lib/i18n/en-US/components/index.d.ts +140 -0
  85. package/lib/i18n/en-US/components/index.js +12 -0
  86. package/lib/i18n/en-US/components/navigation/image.d.ts +5 -0
  87. package/lib/i18n/en-US/components/navigation/image.js +6 -0
  88. package/lib/i18n/en-US/components/navigation/index.d.ts +10 -0
  89. package/lib/i18n/en-US/components/navigation/index.js +8 -0
  90. package/lib/i18n/en-US/components/navigation/user_upload.d.ts +4 -0
  91. package/lib/i18n/en-US/components/navigation/user_upload.js +5 -0
  92. package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +6 -0
  93. package/lib/i18n/en-US/components/settings/clickable_icon.js +7 -0
  94. package/lib/i18n/en-US/components/settings/image.d.ts +2 -0
  95. package/lib/i18n/en-US/components/settings/image.js +3 -0
  96. package/lib/i18n/en-US/components/settings/index.d.ts +39 -0
  97. package/lib/i18n/en-US/components/settings/index.js +14 -0
  98. package/lib/i18n/en-US/components/settings/text_editor.d.ts +8 -0
  99. package/lib/i18n/en-US/components/settings/text_editor.js +9 -0
  100. package/lib/i18n/en-US/components/settings/user_upload.d.ts +12 -0
  101. package/lib/i18n/en-US/components/settings/user_upload.js +13 -0
  102. package/lib/i18n/en-US/components/settings/video.d.ts +13 -0
  103. package/lib/i18n/en-US/components/settings/video.js +14 -0
  104. package/lib/i18n/en-US/components/utils/index.d.ts +15 -0
  105. package/lib/i18n/en-US/components/utils/index.js +6 -0
  106. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +13 -0
  107. package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +14 -0
  108. package/lib/i18n/en-US/index.d.ts +197 -0
  109. package/lib/i18n/en-US/index.js +16 -0
  110. package/lib/i18n/en-US/modules/index.d.ts +2 -0
  111. package/lib/i18n/en-US/modules/index.js +6 -0
  112. package/lib/i18n/en-US/pages/glossary.d.ts +8 -0
  113. package/lib/i18n/en-US/pages/glossary.js +9 -0
  114. package/lib/i18n/en-US/pages/index.d.ts +13 -0
  115. package/lib/i18n/en-US/pages/index.js +8 -0
  116. package/lib/i18n/en-US/pages/user_upload.d.ts +4 -0
  117. package/lib/i18n/en-US/pages/user_upload.js +5 -0
  118. package/lib/i18n/en-US/shared/content_blocks.d.ts +20 -0
  119. package/lib/i18n/en-US/shared/content_blocks.js +21 -0
  120. package/lib/i18n/en-US/shared/index.d.ts +39 -0
  121. package/lib/i18n/en-US/shared/index.js +10 -0
  122. package/lib/i18n/en-US/shared/menu.d.ts +4 -0
  123. package/lib/i18n/en-US/shared/menu.js +5 -0
  124. package/lib/i18n/en-US/shared/settings.d.ts +15 -0
  125. package/lib/i18n/en-US/shared/settings.js +16 -0
  126. package/lib/i18n/en-US.d.ts +197 -0
  127. package/lib/i18n/en-US.js +15 -0
  128. package/lib/models/UserFileAsset.d.ts +5 -0
  129. package/lib/models/UserFileAsset.js +37 -0
  130. 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,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>
package/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # Changelog
2
+
3
+ ### Release [0.6.0] created - 2024-07-30
4
+
@@ -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
- <h4>{{ block.metadata.config.description }}</h4>
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
- <h4
53
- v-if="
54
- block.metadata.config.display.show_title ||
55
- item.active
56
- "
57
- class="mt-4"
58
- role="button"
59
- @click="item.active = !item.active"
60
- >
61
- {{ item.title }}
62
- </h4>
63
- <v-expand-transition>
64
- <div v-if="item.active">
65
- <v-divider light class="my-4" />
66
- <TextViewer v-model="item.body"></TextViewer>
67
- </div>
68
- </v-expand-transition>
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 v-if="!block.metadata.config.instructions">
11
+ <p>
12
12
  {{
13
- $t(
14
- 'windward.core.components.content.blocks.file_download.default_instructions'
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 ||
@@ -2,7 +2,7 @@
2
2
  <div>
3
3
  <v-container class="pa-0">
4
4
  <h2>{{ block.metadata.config.title }}</h2>
5
- <h4>{{ block.metadata.config.description }}</h4>
5
+ <p>{{ block.metadata.config.description }}</p>
6
6
  <p>
7
7
  {{
8
8
  $t(
@@ -1,150 +1,133 @@
1
1
  <template>
2
2
  <div>
3
- <v-form ref="form" v-model="valid" v-if="!loading">
4
- <v-container class="pa-0">
5
- <v-divider class="my-4 primary"></v-divider>
6
- <p>
7
- {{
8
- $t('windward.core.components.settings.accordion.items')
9
- }}
10
- </p>
11
- <SortableExpansionPanel
12
- v-model="block.metadata.config.items"
13
- :disabled="render"
14
- @click:close="onRemoveElement($event)"
15
- @change="onDragged"
16
- @update:currentPanel="onUpdatePanel"
17
- >
18
- <template #header="{ item }">{{
19
- item.header
20
- ? item.header
21
- : $t('components.content.settings.base.placeholder')
22
- }}</template>
23
- <template #body="{ index }">
24
- <v-container :key="expansionPanelKey">
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].header
78
+ block.metadata.config.items[index].altText
28
79
  "
29
- :autofocus="true"
80
+ class="pt-3 pb-3"
81
+ :hide-details="true"
82
+ dense
30
83
  outlined
31
84
  :label="
32
- $t('components.content.settings.base.title')
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
- <v-icon
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].content
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.components.settings.accordion.label'
101
+ 'windward.core.shared.settings.aria_described'
76
102
  )
77
103
  "
78
- :disabled="render"
79
- ></TextEditor>
80
- <v-container class="pa-0 pt-3">
81
- <h4>
82
- {{
83
- $t(
84
- 'windward.core.shared.settings.upload_file'
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
- </template>
129
- </SortableExpansionPanel>
130
- </v-container>
131
- <v-container class="pa-0">
132
- <v-row justify="center" class="my-4">
133
- <v-btn
134
- color="primary"
135
- elevation="0"
136
- :disabled="render"
137
- @click="onAddElement"
138
- ><v-icon>mdi-plus</v-icon
139
- >{{
140
- $t(
141
- 'windward.core.components.settings.accordion.add'
142
- )
143
- }}</v-btn
144
- >
145
- </v-row>
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>