@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 CHANGED
@@ -4,6 +4,13 @@
4
4
 
5
5
  - ... <!-- Add new lines here. -->
6
6
 
7
+ ## 0.10.160
8
+
9
+ _2025-10-13_
10
+
11
+ - `ReadSpeakerPlayer`:
12
+ - fix: Default `lang` to Hanna's `DEFAULT_LANG` value, like other components
13
+
7
14
  ## 0.10.159
8
15
 
9
16
  _2025-10-09_
@@ -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 = 'is', voice = /^is(?:_is)?$/i.test(lang) ? 'is_dora' : '', readId = '', readClass = readId ? '' : 'Layout__main', wrapperProps, texts, } = props;
30
- const { linkText, linkLabel } = (0, i18n_1.getTexts)({ lang: lang.slice(0, 2), texts }, exports.defaultReadSpeakerPlayerTexts);
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) {
@@ -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 = 'is', voice = /^is(?:_is)?$/i.test(lang) ? 'is_dora' : '', readId = '', readClass = readId ? '' : 'Layout__main', wrapperProps, texts, } = props;
26
- const { linkText, linkLabel } = getTexts({ lang: lang.slice(0, 2), texts }, defaultReadSpeakerPlayerTexts);
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reykjavik/hanna-react",
3
- "version": "0.10.159",
3
+ "version": "0.10.160",
4
4
  "author": "Reykjavík (http://www.reykjavik.is)",
5
5
  "contributors": [
6
6
  "Hugsmiðjan ehf (http://www.hugsmidjan.is)",