@windward/core 0.4.1 → 0.4.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/bitbucket-pipelines.yml +14 -0
- package/components/Content/Blocks/Image.vue +2 -2
- package/components/Settings/ImageSettings.vue +7 -8
- package/components/Settings/TextEditorSettings.vue +1 -0
- package/components/utils/MathExpressionEditor.vue +61 -49
- package/components/utils/TinyMCEWrapper.vue +23 -6
- package/components/utils/assets/tinymce/ui/dark/skin.scss +1 -1
- package/components/utils/assets/tinymce/ui/light/skin.scss +1 -1
- package/config/tinymce.config.ts +2 -6
- package/i18n/en-US/components/settings/image.ts +2 -0
- package/i18n/en-US/components/utils/math_expression_editor.ts +4 -3
- package/i18n/es-ES/components/settings/image.ts +2 -0
- package/i18n/es-ES/components/utils/math_expression_editor.ts +2 -1
- package/i18n/sv-SE/components/settings/image.ts +2 -0
- package/i18n/sv-SE/components/utils/math_expression_editor.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
image: atlassian/default-image:3
|
|
2
|
+
|
|
3
|
+
pipelines:
|
|
4
|
+
custom:
|
|
5
|
+
create-release:
|
|
6
|
+
import: infrastructure-automation:master:create-release
|
|
7
|
+
publish-release:
|
|
8
|
+
import: infrastructure-automation:master:publish-release
|
|
9
|
+
|
|
10
|
+
branches:
|
|
11
|
+
"release/*":
|
|
12
|
+
import: infrastructure-automation:master:auto-update
|
|
13
|
+
"hotfix/*":
|
|
14
|
+
import: infrastructure-automation:master:auto-update
|
|
@@ -124,7 +124,7 @@ export default {
|
|
|
124
124
|
altText() {
|
|
125
125
|
// Get the asset info first and fallback to the block metadata if inherit is set to false
|
|
126
126
|
if (_.get(this.block.metadata, 'config.inherit', true)) {
|
|
127
|
-
return _.get(this.fileAsset, 'metadata.props.alt', null)
|
|
127
|
+
return _.get(this.fileAsset, 'asset.metadata.props.alt', null)
|
|
128
128
|
} else {
|
|
129
129
|
return _.get(this.block.metadata, 'config.alt', null)
|
|
130
130
|
}
|
|
@@ -134,7 +134,7 @@ export default {
|
|
|
134
134
|
if (_.get(this.block.metadata, 'config.inherit', true)) {
|
|
135
135
|
return _.get(
|
|
136
136
|
this.fileAsset,
|
|
137
|
-
'metadata.props.aria_describedby',
|
|
137
|
+
'asset.metadata.props.aria_describedby',
|
|
138
138
|
null
|
|
139
139
|
)
|
|
140
140
|
} else {
|
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
mimes="image/jpeg,image/png,image/gif"
|
|
5
5
|
v-model="block.metadata.config.asset"
|
|
6
6
|
class="mb-4"
|
|
7
|
+
:label="
|
|
8
|
+
$t(
|
|
9
|
+
'windward.core.components.settings.image.current_image_file'
|
|
10
|
+
) + ':'
|
|
11
|
+
"
|
|
7
12
|
:disabled="render"
|
|
13
|
+
:assets.sync="block.assets"
|
|
8
14
|
@click:file="onFileSelect"
|
|
9
15
|
>
|
|
10
16
|
<template #title>
|
|
11
|
-
{{ $t('windward.core.components.
|
|
12
|
-
</template>
|
|
13
|
-
<template #description>
|
|
14
|
-
{{
|
|
15
|
-
$t(
|
|
16
|
-
'windward.core.components.content.blocks.image.description'
|
|
17
|
-
)
|
|
18
|
-
}}
|
|
17
|
+
{{ $t('windward.core.components.settings.image.place_image') }}
|
|
19
18
|
</template>
|
|
20
19
|
</ContentBlockAsset>
|
|
21
20
|
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
>
|
|
26
26
|
{{ $tc(keyboard.name, keyboard.buttons.length) }}
|
|
27
27
|
</v-tab>
|
|
28
|
+
<v-tab>{{
|
|
29
|
+
$t(
|
|
30
|
+
'windward.core.components.utils.math_expression_editor.accessibility'
|
|
31
|
+
)
|
|
32
|
+
}}</v-tab>
|
|
28
33
|
</v-tabs>
|
|
29
34
|
|
|
30
35
|
<v-tabs-items v-model="tab">
|
|
@@ -50,6 +55,62 @@
|
|
|
50
55
|
</div>
|
|
51
56
|
</v-container>
|
|
52
57
|
</v-tab-item>
|
|
58
|
+
<v-tab-item>
|
|
59
|
+
<v-container class="pb-4">
|
|
60
|
+
<v-row align="center">
|
|
61
|
+
<v-switch
|
|
62
|
+
v-model="spokenTextChanged"
|
|
63
|
+
:label="
|
|
64
|
+
$t(
|
|
65
|
+
'windward.core.components.utils.math_expression_editor.custom_screen_reader_text'
|
|
66
|
+
)
|
|
67
|
+
"
|
|
68
|
+
hide-details
|
|
69
|
+
class="shrink mr-2 mt-0"
|
|
70
|
+
></v-switch>
|
|
71
|
+
<v-textarea
|
|
72
|
+
v-model="spokenText"
|
|
73
|
+
:disabled="!spokenTextChanged"
|
|
74
|
+
:label="
|
|
75
|
+
$t(
|
|
76
|
+
'windward.core.components.utils.math_expression_editor.screen_reader_text'
|
|
77
|
+
)
|
|
78
|
+
"
|
|
79
|
+
class="col-md-12"
|
|
80
|
+
@input="submit"
|
|
81
|
+
></v-textarea>
|
|
82
|
+
</v-row>
|
|
83
|
+
|
|
84
|
+
<br />
|
|
85
|
+
<v-row class="float-right">
|
|
86
|
+
<v-btn
|
|
87
|
+
primary
|
|
88
|
+
color="success"
|
|
89
|
+
elevation="0"
|
|
90
|
+
@click="setSRText"
|
|
91
|
+
:class="fontSize"
|
|
92
|
+
>{{
|
|
93
|
+
$t(
|
|
94
|
+
'windward.core.components.utils.math_expression_editor.default_screen_reader_text'
|
|
95
|
+
)
|
|
96
|
+
}}
|
|
97
|
+
</v-btn>
|
|
98
|
+
|
|
99
|
+
<v-btn
|
|
100
|
+
color="primary"
|
|
101
|
+
elevation="0"
|
|
102
|
+
:class="fontSize"
|
|
103
|
+
@click="readSRText"
|
|
104
|
+
>{{
|
|
105
|
+
$t(
|
|
106
|
+
'windward.core.components.utils.math_expression_editor.read_text_aloud'
|
|
107
|
+
)
|
|
108
|
+
}}
|
|
109
|
+
</v-btn>
|
|
110
|
+
</v-row>
|
|
111
|
+
</v-container>
|
|
112
|
+
<br />
|
|
113
|
+
</v-tab-item>
|
|
53
114
|
</v-tabs-items>
|
|
54
115
|
<br />
|
|
55
116
|
<math-live-wrapper
|
|
@@ -61,55 +122,6 @@
|
|
|
61
122
|
@change="submit"
|
|
62
123
|
></math-live-wrapper>
|
|
63
124
|
<br />
|
|
64
|
-
<v-container>
|
|
65
|
-
<v-row align="center">
|
|
66
|
-
<v-switch
|
|
67
|
-
v-model="spokenTextChanged"
|
|
68
|
-
:label="
|
|
69
|
-
$t(
|
|
70
|
-
'windward.core.components.utils.math_expression_editor.custom_screen_reader_text'
|
|
71
|
-
)
|
|
72
|
-
"
|
|
73
|
-
hide-details
|
|
74
|
-
class="shrink mr-2 mt-0"
|
|
75
|
-
></v-switch>
|
|
76
|
-
<v-textarea
|
|
77
|
-
v-model="spokenText"
|
|
78
|
-
:disabled="!spokenTextChanged"
|
|
79
|
-
:label="
|
|
80
|
-
$t(
|
|
81
|
-
'windward.core.components.utils.math_expression_editor.screen_reader_text'
|
|
82
|
-
)
|
|
83
|
-
"
|
|
84
|
-
class="col-md-12"
|
|
85
|
-
@input="submit"
|
|
86
|
-
></v-textarea>
|
|
87
|
-
</v-row>
|
|
88
|
-
</v-container>
|
|
89
|
-
|
|
90
|
-
<br />
|
|
91
|
-
<v-row class="float-right">
|
|
92
|
-
<v-btn
|
|
93
|
-
primary
|
|
94
|
-
color="success"
|
|
95
|
-
elevation="0"
|
|
96
|
-
@click="setSRText"
|
|
97
|
-
:class="fontSize"
|
|
98
|
-
>{{
|
|
99
|
-
$t(
|
|
100
|
-
'windward.core.components.utils.math_expression_editor.default_screen_reader_text'
|
|
101
|
-
)
|
|
102
|
-
}}
|
|
103
|
-
</v-btn>
|
|
104
|
-
|
|
105
|
-
<v-btn color="primary" elevation="0" :class="fontSize" @click="readSRText"
|
|
106
|
-
>{{
|
|
107
|
-
$t(
|
|
108
|
-
'windward.core.components.utils.math_expression_editor.read_text_aloud'
|
|
109
|
-
)
|
|
110
|
-
}}
|
|
111
|
-
</v-btn>
|
|
112
|
-
</v-row>
|
|
113
125
|
</v-card-text>
|
|
114
126
|
</v-card>
|
|
115
127
|
</div>
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
(isDarkTheme ? '--theme-dark' : '--theme-light')
|
|
7
7
|
"
|
|
8
8
|
>
|
|
9
|
+
<label v-if="value && label" class="editor-label">{{
|
|
10
|
+
label
|
|
11
|
+
}}</label>
|
|
9
12
|
<Editor
|
|
10
13
|
:key="seed + (isDarkTheme ? '-theme-dark' : '-theme-light')"
|
|
11
14
|
v-model="text"
|
|
@@ -26,7 +29,7 @@
|
|
|
26
29
|
<v-btn-toggle dense multiple class="pt-1 d-flex justify-end">
|
|
27
30
|
<slot name="actions-prepend" :render="render"></slot>
|
|
28
31
|
<slot name="actions" :render="render">
|
|
29
|
-
<v-btn-toggle dense>
|
|
32
|
+
<v-btn-toggle dense v-if="allowRead">
|
|
30
33
|
<v-btn v-if="render" color="primary" outlined @click="read">
|
|
31
34
|
<v-icon> mdi-play</v-icon>
|
|
32
35
|
</v-btn>
|
|
@@ -44,7 +47,7 @@
|
|
|
44
47
|
</v-btn-toggle>
|
|
45
48
|
|
|
46
49
|
<v-btn
|
|
47
|
-
v-if="render"
|
|
50
|
+
v-if="render && !inline"
|
|
48
51
|
color="primary"
|
|
49
52
|
elevation="0"
|
|
50
53
|
outlined
|
|
@@ -142,6 +145,8 @@ export default {
|
|
|
142
145
|
},
|
|
143
146
|
root_block: { type: String, required: false, default: 'div' },
|
|
144
147
|
label: { type: String, required: true, default: '' },
|
|
148
|
+
inline: { type: Boolean, required: false, default: false },
|
|
149
|
+
allowRead: { type: Boolean, required: false, default: false },
|
|
145
150
|
},
|
|
146
151
|
beforeMount() {
|
|
147
152
|
if (MathHelper.containsLatex(this.value)) {
|
|
@@ -241,6 +246,7 @@ export default {
|
|
|
241
246
|
'WindwardToolKit',
|
|
242
247
|
],
|
|
243
248
|
toolbar: this.filteredToolbar,
|
|
249
|
+
inline: this.inline,
|
|
244
250
|
table_advtab: false,
|
|
245
251
|
table_cell_advtab: false,
|
|
246
252
|
table_row_advtab: false,
|
|
@@ -478,12 +484,16 @@ export default {
|
|
|
478
484
|
}
|
|
479
485
|
},
|
|
480
486
|
resume() {
|
|
481
|
-
this.synthesizer
|
|
482
|
-
|
|
487
|
+
if (this.synthesizer) {
|
|
488
|
+
this.synthesizer.resume()
|
|
489
|
+
this.paused = false
|
|
490
|
+
}
|
|
483
491
|
},
|
|
484
492
|
stop() {
|
|
485
|
-
this.synthesizer
|
|
486
|
-
|
|
493
|
+
if (this.synthesizer) {
|
|
494
|
+
this.synthesizer.stop()
|
|
495
|
+
this.paused = false
|
|
496
|
+
}
|
|
487
497
|
},
|
|
488
498
|
onEditorFocus() {
|
|
489
499
|
if (!this.render) {
|
|
@@ -538,4 +548,11 @@ html:has(body.theme--dark) {
|
|
|
538
548
|
@import './assets/tinymce/ui/dark/content.scss';
|
|
539
549
|
@import './assets/tinymce/ui/dark/skin.scss';
|
|
540
550
|
}
|
|
551
|
+
.editor-label {
|
|
552
|
+
font-size: 1rem;
|
|
553
|
+
margin-top: -1rem;
|
|
554
|
+
display: block;
|
|
555
|
+
transform-origin: top left;
|
|
556
|
+
transform: scale(0.75);
|
|
557
|
+
}
|
|
541
558
|
</style>
|
|
@@ -426,7 +426,7 @@ button::-moz-focus-inner {
|
|
|
426
426
|
background-image: none;
|
|
427
427
|
border-color: var(--v-primary-base);
|
|
428
428
|
box-shadow: none;
|
|
429
|
-
color: var(--v-
|
|
429
|
+
color: var(--v-primary-base);
|
|
430
430
|
}
|
|
431
431
|
.tox .tox-button:active:not(:disabled) {
|
|
432
432
|
background-color: inherit;
|
package/config/tinymce.config.ts
CHANGED
|
@@ -25,10 +25,6 @@ export default {
|
|
|
25
25
|
cmd: false,
|
|
26
26
|
text: 'i',
|
|
27
27
|
},
|
|
28
|
-
{
|
|
29
|
-
cmd: false,
|
|
30
|
-
text: '\\$',
|
|
31
|
-
},
|
|
32
28
|
{
|
|
33
29
|
cmd: false,
|
|
34
30
|
text: '\\%',
|
|
@@ -307,11 +303,11 @@ export default {
|
|
|
307
303
|
buttons: [
|
|
308
304
|
{
|
|
309
305
|
cmd: false,
|
|
310
|
-
text: '\\begin{cases} x
|
|
306
|
+
text: '\\begin{cases} x+y \\\\ x+y \\end{cases}',
|
|
311
307
|
},
|
|
312
308
|
{
|
|
313
309
|
cmd: false,
|
|
314
|
-
text: '\\begin{cases}
|
|
310
|
+
text: '\\begin{cases}x+y\\\\ x-y\\end{cases}',
|
|
315
311
|
},
|
|
316
312
|
],
|
|
317
313
|
},
|
|
@@ -7,8 +7,9 @@ export default {
|
|
|
7
7
|
probability: 'Probability',
|
|
8
8
|
matrix: 'Matrix',
|
|
9
9
|
eq_systems: 'Equation Systems',
|
|
10
|
-
screen_reader_text: '
|
|
11
|
-
default_screen_reader_text: 'Default
|
|
12
|
-
custom_screen_reader_text: 'Customize
|
|
10
|
+
screen_reader_text: 'Screen Reader Text',
|
|
11
|
+
default_screen_reader_text: 'Default Screen Reader Text',
|
|
12
|
+
custom_screen_reader_text: 'Customize Screen Reader Text',
|
|
13
13
|
read_text_aloud: 'Read Text aloud',
|
|
14
|
+
accessibility: 'Accessibility',
|
|
14
15
|
}
|
|
@@ -8,7 +8,8 @@ export default {
|
|
|
8
8
|
matrix: 'Matriz',
|
|
9
9
|
eq_systems: 'Sistemas de ecuaciones',
|
|
10
10
|
screen_reader_text: 'Texto del lector de pantalla',
|
|
11
|
-
default_screen_reader_text: 'Texto del lector de pantalla auto
|
|
11
|
+
default_screen_reader_text: 'Texto del lector de pantalla auto generado',
|
|
12
12
|
custom_screen_reader_text: 'Personalizar el texto del lector de pantalla/',
|
|
13
13
|
read_text_aloud: 'Leer texto',
|
|
14
|
+
accessibility: 'Accesibilidad',
|
|
14
15
|
}
|