@opengeoweb/shared 14.2.1 → 14.3.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
|
@@ -1243,8 +1243,8 @@ var CustomDialogHeader = function CustomDialogHeader(_ref2) {
|
|
|
1243
1243
|
});
|
|
1244
1244
|
};
|
|
1245
1245
|
|
|
1246
|
-
var _excluded$a = ["defaultSize", "onResizeStop", "hasLayout"],
|
|
1247
|
-
_excluded2$2 = ["title", "onClose", "description", "actions", "children", "sx", "resizableDefaultSize", "isResizable", "hasLayout", "shouldRenderInline", "slotProps", "disableRestoreFocus", "headerActions"];
|
|
1246
|
+
var _excluded$a = ["defaultSize", "onResizeStop", "hasLayout", "minWidth"],
|
|
1247
|
+
_excluded2$2 = ["title", "onClose", "description", "actions", "children", "sx", "resizableDefaultSize", "isResizable", "hasLayout", "shouldRenderInline", "slotProps", "disableRestoreFocus", "headerActions", "minWidth"];
|
|
1248
1248
|
var PaperComponent = function PaperComponent(_ref) {
|
|
1249
1249
|
var _ref$defaultSize = _ref.defaultSize,
|
|
1250
1250
|
defaultSize = _ref$defaultSize === void 0 ? {
|
|
@@ -1254,6 +1254,8 @@ var PaperComponent = function PaperComponent(_ref) {
|
|
|
1254
1254
|
onResize = _ref.onResizeStop,
|
|
1255
1255
|
_ref$hasLayout = _ref.hasLayout,
|
|
1256
1256
|
hasLayout = _ref$hasLayout === void 0 ? true : _ref$hasLayout,
|
|
1257
|
+
_ref$minWidth = _ref.minWidth,
|
|
1258
|
+
minWidth = _ref$minWidth === void 0 ? 280 : _ref$minWidth,
|
|
1257
1259
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
1258
1260
|
var maxWidth = '98%';
|
|
1259
1261
|
var maxHeight = '98%';
|
|
@@ -1262,7 +1264,7 @@ var PaperComponent = function PaperComponent(_ref) {
|
|
|
1262
1264
|
maxHeight: maxHeight,
|
|
1263
1265
|
maxWidth: maxWidth,
|
|
1264
1266
|
minHeight: 120,
|
|
1265
|
-
minWidth:
|
|
1267
|
+
minWidth: minWidth,
|
|
1266
1268
|
size: defaultSize,
|
|
1267
1269
|
style: {
|
|
1268
1270
|
display: 'flex'
|
|
@@ -1319,6 +1321,7 @@ var CustomDialog = function CustomDialog(_ref2) {
|
|
|
1319
1321
|
_ref2$disableRestoreF = _ref2.disableRestoreFocus,
|
|
1320
1322
|
disableRestoreFocus = _ref2$disableRestoreF === void 0 ? true : _ref2$disableRestoreF,
|
|
1321
1323
|
headerActions = _ref2.headerActions,
|
|
1324
|
+
minWidth = _ref2.minWidth,
|
|
1322
1325
|
other = _objectWithoutPropertiesLoose(_ref2, _excluded2$2);
|
|
1323
1326
|
var _React$useState = React.useState(resizableDefaultSize),
|
|
1324
1327
|
size = _React$useState[0],
|
|
@@ -1346,11 +1349,13 @@ var CustomDialog = function CustomDialog(_ref2) {
|
|
|
1346
1349
|
}, Array.isArray(sx) ? Object.assign.apply(Object, [{}].concat(sx)) : sx)
|
|
1347
1350
|
}
|
|
1348
1351
|
}, isResizable && {
|
|
1349
|
-
paper: {
|
|
1352
|
+
paper: Object.assign({
|
|
1350
1353
|
defaultSize: size,
|
|
1351
1354
|
onResizeStop: setSize,
|
|
1352
1355
|
hasLayout: hasLayout
|
|
1353
|
-
}
|
|
1356
|
+
}, minWidth && {
|
|
1357
|
+
minWidth: minWidth
|
|
1358
|
+
})
|
|
1354
1359
|
}, shouldRenderInline && {
|
|
1355
1360
|
root: {
|
|
1356
1361
|
style: {
|
|
@@ -2568,10 +2573,10 @@ var MenuItemTheme = function MenuItemTheme(_ref) {
|
|
|
2568
2573
|
value: ThemeTypes.DEMO_THEME
|
|
2569
2574
|
}), jsx(FormControlLabel, {
|
|
2570
2575
|
control: jsx(Radio, {
|
|
2571
|
-
checked: (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.
|
|
2576
|
+
checked: (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.XMAS_THEME
|
|
2572
2577
|
}),
|
|
2573
|
-
label: t('shared-xmas')
|
|
2574
|
-
value: ThemeTypes.
|
|
2578
|
+
label: "" + t('shared-xmas'),
|
|
2579
|
+
value: ThemeTypes.XMAS_THEME
|
|
2575
2580
|
}), jsx(FormControlLabel, {
|
|
2576
2581
|
control: jsx(Radio, {
|
|
2577
2582
|
checked: (namedTheme == null ? void 0 : namedTheme.name) === ThemeTypes.EUMETNET_THEME
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.3.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": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "git@gitlab.com:opengeoweb/opengeoweb.git"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@opengeoweb/theme": "14.
|
|
11
|
+
"@opengeoweb/theme": "14.3.0",
|
|
12
12
|
"react-draggable": "^4.4.6",
|
|
13
13
|
"re-resizable": "^6.9.11",
|
|
14
14
|
"lodash": "^4.17.21",
|
|
@@ -12,6 +12,7 @@ export interface CustomDialogProps extends DialogProps {
|
|
|
12
12
|
hasLayout?: boolean;
|
|
13
13
|
shouldRenderInline?: boolean;
|
|
14
14
|
headerActions?: HeaderAction[];
|
|
15
|
+
minWidth?: number | string;
|
|
15
16
|
}
|
|
16
17
|
export declare const CustomDialog: React.FC<CustomDialogProps>;
|
|
17
18
|
export default CustomDialog;
|
package/src/lib/types/types.d.ts
CHANGED
package/src/lib/utils/i18n.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ interface TranslationToLoad {
|
|
|
9
9
|
export declare const loadAllTranslations: (i18nInstance: typeof i18n, translationsToLoad: TranslationToLoad[]) => void;
|
|
10
10
|
export declare const safelyInitI18nForTestsAndStories: (i18nInstance: typeof i18n, namespace: string, translationsToLoad: TranslationToLoad[], initLanguage?: string) => void;
|
|
11
11
|
export declare const initSharedI18n: () => void;
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const translateInTestsAndStories: (key: string, params?: Record<string, string | number> | undefined) => string;
|
|
13
13
|
export declare const useSharedTranslation: () => UseTranslationResponse<typeof SHARED_NAMESPACE, typeof i18n>;
|
|
14
14
|
export { i18n };
|