@opengeoweb/shared 9.32.1 → 9.33.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/index.esm.js CHANGED
@@ -3,8 +3,8 @@ import { Box, Typography, Tooltip, IconButton, Dialog, DialogTitle, DialogConten
3
3
  import { Close, Exclamation, Success, Info, ChevronRight, GeoWebLogo, HamburgerMenu, Resize, Admin, useThemeContext, DragHandle, ArrowLeft, ArrowRight, KeyOption, ArrowUp, ArrowDown, KeyCommand, Options, ChevronDown, Search, Clear, Cached } from '@opengeoweb/theme';
4
4
  import * as React from 'react';
5
5
  import React__default, { useRef, Component, useState } from 'react';
6
- import i18n from 'i18next';
7
- import { initReactI18next, useTranslation } from 'react-i18next';
6
+ import 'i18next';
7
+ import { useTranslation } from 'react-i18next';
8
8
  import { throttle, escapeRegExp, debounce } from 'lodash';
9
9
  import Draggable from 'react-draggable';
10
10
  import { Resizable } from 're-resizable';
@@ -2215,31 +2215,6 @@ const CustomDialog = _ref => {
2215
2215
  };
2216
2216
 
2217
2217
  const SHARED_NAMESPACE = 'shared';
2218
- const initSharedI18n = () => {
2219
- void i18n.use(initReactI18next).init({
2220
- lng: 'en',
2221
- fallbackLng: 'en',
2222
- ns: SHARED_NAMESPACE,
2223
- interpolation: {
2224
- escapeValue: false
2225
- },
2226
- resources: {
2227
- en: {
2228
- [SHARED_NAMESPACE]: sharedTranslations.en
2229
- },
2230
- fi: {
2231
- [SHARED_NAMESPACE]: sharedTranslations.fi
2232
- },
2233
- no: {
2234
- [SHARED_NAMESPACE]: sharedTranslations.no
2235
- },
2236
- nl: {
2237
- [SHARED_NAMESPACE]: sharedTranslations.nl
2238
- }
2239
- }
2240
- });
2241
- };
2242
- initSharedI18n();
2243
2218
  const useSharedTranslation = () => useTranslation([SHARED_NAMESPACE]);
2244
2219
 
2245
2220
  const _excluded$a = ["open", "title", "description", "confirmLabel", "cancelLabel", "onSubmit", "onClose", "content", "disableAutoFocus", "isLoading"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "9.32.1",
3
+ "version": "9.33.0",
4
4
  "description": "GeoWeb shared library with shared components and utils for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ThemeProviderProps } from '@opengeoweb/theme';
3
+ interface SharedTranslationWrapperProps {
4
+ children?: React.ReactNode;
5
+ }
3
6
  interface SharedStoryWrapperProps {
4
7
  children: React.ReactNode;
5
8
  theme?: 'light' | 'dark';
@@ -11,4 +14,5 @@ interface SharedStoryWrapperProps {
11
14
  */
12
15
  export declare const SharedThemeProvider: React.FC<ThemeProviderProps>;
13
16
  export declare const SharedStoryWrapper: React.FC<SharedStoryWrapperProps>;
17
+ export declare const SharedI18nProvider: React.FC<SharedTranslationWrapperProps>;
14
18
  export {};