@opengeoweb/shared 9.32.0 → 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
|
|
7
|
-
import {
|
|
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
|
@@ -6,8 +6,7 @@ export declare const sliderHeaderStyle: {
|
|
|
6
6
|
color: string;
|
|
7
7
|
padding: string;
|
|
8
8
|
};
|
|
9
|
-
interface CustomSliderProps extends
|
|
10
|
-
onChange: (event: PointerEvent, newValue: number | number[]) => void;
|
|
9
|
+
interface CustomSliderProps extends SliderProps {
|
|
11
10
|
shouldAutoFocus?: boolean;
|
|
12
11
|
}
|
|
13
12
|
export declare const CustomSlider: React.FC<CustomSliderProps>;
|
|
@@ -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 {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Egg } from '@redux-eggs/core';
|
|
3
3
|
import { Theme } from '@mui/material';
|
|
4
|
-
|
|
4
|
+
interface WithEggsProps {
|
|
5
5
|
children: React.ReactElement;
|
|
6
6
|
theme?: Theme;
|
|
7
|
-
}
|
|
7
|
+
}
|
|
8
|
+
export declare function withEggs(eggs: Egg[]): (Component: React.FC<WithEggsProps>) => React.FC<WithEggsProps>;
|
|
9
|
+
export {};
|