@reykjavik/hanna-react 0.10.159 → 0.10.160
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/CHANGELOG.md +7 -0
- package/ReadSpeakerPlayer.js +2 -2
- package/esm/ReadSpeakerPlayer.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/ReadSpeakerPlayer.js
CHANGED
|
@@ -26,8 +26,8 @@ exports.defaultReadSpeakerPlayerTexts = {
|
|
|
26
26
|
* @see https://docs.typo3.org/p/readspeaker/readspeaker-services/main/en-us/Configuration/Index.html
|
|
27
27
|
*/
|
|
28
28
|
const ReadSpeakerPlayer = (props) => {
|
|
29
|
-
const { align, float, customerId = '11315', lang =
|
|
30
|
-
const { linkText, linkLabel } = (0, i18n_1.getTexts)(
|
|
29
|
+
const { align, float, customerId = '11315', lang = i18n_1.DEFAULT_LANG, voice = /^is(?:_is)?$/i.test(lang) ? 'is_dora' : '', readId = '', readClass = readId ? '' : 'Layout__main', wrapperProps, } = props;
|
|
30
|
+
const { linkText, linkLabel } = (0, i18n_1.getTexts)(props, exports.defaultReadSpeakerPlayerTexts);
|
|
31
31
|
(0, react_1.useEffect)(() => {
|
|
32
32
|
var _a, _b;
|
|
33
33
|
if (buttons === 0) {
|
package/esm/ReadSpeakerPlayer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
2
|
import { modifiedClass } from '@reykjavik/hanna-utils';
|
|
3
|
-
import { getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
3
|
+
import { DEFAULT_LANG, getTexts } from '@reykjavik/hanna-utils/i18n';
|
|
4
4
|
const scriptTagId = 'rs_req_Init';
|
|
5
5
|
const scriptTagSelector = `script#${scriptTagId}`;
|
|
6
6
|
/**
|
|
@@ -22,8 +22,8 @@ export const defaultReadSpeakerPlayerTexts = {
|
|
|
22
22
|
* @see https://docs.typo3.org/p/readspeaker/readspeaker-services/main/en-us/Configuration/Index.html
|
|
23
23
|
*/
|
|
24
24
|
export const ReadSpeakerPlayer = (props) => {
|
|
25
|
-
const { align, float, customerId = '11315', lang =
|
|
26
|
-
const { linkText, linkLabel } = getTexts(
|
|
25
|
+
const { align, float, customerId = '11315', lang = DEFAULT_LANG, voice = /^is(?:_is)?$/i.test(lang) ? 'is_dora' : '', readId = '', readClass = readId ? '' : 'Layout__main', wrapperProps, } = props;
|
|
26
|
+
const { linkText, linkLabel } = getTexts(props, defaultReadSpeakerPlayerTexts);
|
|
27
27
|
useEffect(() => {
|
|
28
28
|
var _a, _b;
|
|
29
29
|
if (buttons === 0) {
|