@ndla/ui 56.0.59-alpha.0 → 56.0.60-alpha.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/es/Article/ArticleByline.js +1 -1
- package/es/AudioPlayer/Controls.js +2 -1
- package/es/locale/messages-en.js +1 -0
- package/es/locale/messages-nb.js +1 -0
- package/es/locale/messages-nn.js +1 -0
- package/es/locale/messages-se.js +1 -0
- package/es/locale/messages-sma.js +1 -0
- package/lib/Article/ArticleByline.js +1 -1
- package/lib/AudioPlayer/Controls.js +2 -1
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +1 -0
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +1 -0
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +1 -0
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +1 -0
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +1 -0
- package/package.json +3 -3
- package/src/Article/ArticleByline.tsx +1 -1
- package/src/AudioPlayer/Controls.tsx +2 -1
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
- package/src/locale/messages-se.ts +1 -0
- package/src/locale/messages-sma.ts +1 -0
|
@@ -105,7 +105,7 @@ export const ArticleByline = _ref => {
|
|
|
105
105
|
const accordionItemValue = "rulesForUse";
|
|
106
106
|
const onHashChange = useCallback(e => {
|
|
107
107
|
const hash = e.newURL.split("#")[1];
|
|
108
|
-
if (hash
|
|
108
|
+
if (hash?.match(refRegexp) && !openAccordions.includes(footnotesAccordionId)) {
|
|
109
109
|
setOpenAccordions([...openAccordions, footnotesAccordionId]);
|
|
110
110
|
const el = document.getElementById(`#${hash}`);
|
|
111
111
|
el?.click();
|
|
@@ -187,7 +187,8 @@ const Controls = _ref => {
|
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
const handleSliderChange = details => {
|
|
190
|
-
|
|
190
|
+
const newValue = details.value[0];
|
|
191
|
+
if (audioRef.current && newValue != null && !isNaN(newValue)) {
|
|
191
192
|
audioRef.current.currentTime = details.value[0];
|
|
192
193
|
}
|
|
193
194
|
};
|
package/es/locale/messages-en.js
CHANGED
package/es/locale/messages-nb.js
CHANGED
package/es/locale/messages-nn.js
CHANGED
package/es/locale/messages-se.js
CHANGED
|
@@ -111,7 +111,7 @@ const ArticleByline = _ref => {
|
|
|
111
111
|
const accordionItemValue = "rulesForUse";
|
|
112
112
|
const onHashChange = (0, _react.useCallback)(e => {
|
|
113
113
|
const hash = e.newURL.split("#")[1];
|
|
114
|
-
if (hash
|
|
114
|
+
if (hash?.match(refRegexp) && !openAccordions.includes(footnotesAccordionId)) {
|
|
115
115
|
setOpenAccordions([...openAccordions, footnotesAccordionId]);
|
|
116
116
|
const el = document.getElementById(`#${hash}`);
|
|
117
117
|
el?.click();
|
|
@@ -193,7 +193,8 @@ const Controls = _ref => {
|
|
|
193
193
|
}
|
|
194
194
|
};
|
|
195
195
|
const handleSliderChange = details => {
|
|
196
|
-
|
|
196
|
+
const newValue = details.value[0];
|
|
197
|
+
if (audioRef.current && newValue != null && !isNaN(newValue)) {
|
|
197
198
|
audioRef.current.currentTime = details.value[0];
|
|
198
199
|
}
|
|
199
200
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.60-alpha.0",
|
|
4
4
|
"description": "UI component library for NDLA",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ndla/core": "^5.0.2",
|
|
36
|
-
"@ndla/icons": "^8.0.
|
|
36
|
+
"@ndla/icons": "^8.0.35-alpha.0",
|
|
37
37
|
"@ndla/licenses": "^8.0.3-alpha.0",
|
|
38
38
|
"@ndla/primitives": "^1.0.49-alpha.0",
|
|
39
39
|
"@ndla/safelink": "^7.0.50-alpha.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "eea1c99bf2bc62e0767c1ed49d38accbcff2d23f"
|
|
62
62
|
}
|
|
@@ -137,7 +137,7 @@ export const ArticleByline = ({
|
|
|
137
137
|
const onHashChange = useCallback(
|
|
138
138
|
(e: HashChangeEvent) => {
|
|
139
139
|
const hash = e.newURL.split("#")[1];
|
|
140
|
-
if (hash
|
|
140
|
+
if (hash?.match(refRegexp) && !openAccordions.includes(footnotesAccordionId)) {
|
|
141
141
|
setOpenAccordions([...openAccordions, footnotesAccordionId]);
|
|
142
142
|
const el = document.getElementById(`#${hash}`);
|
|
143
143
|
el?.click();
|
|
@@ -223,7 +223,8 @@ const Controls = ({ src, title }: Props) => {
|
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
const handleSliderChange = (details: SliderValueChangeDetails) => {
|
|
226
|
-
|
|
226
|
+
const newValue = details.value[0];
|
|
227
|
+
if (audioRef.current && newValue != null && !isNaN(newValue)) {
|
|
227
228
|
audioRef.current.currentTime = details.value[0];
|
|
228
229
|
}
|
|
229
230
|
};
|