@opengeoweb/shared 4.2.0 → 4.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
@@ -8,22 +8,33 @@ import Draggable from 'react-draggable';
8
8
  import { Resizable } from 're-resizable';
9
9
  import { throttle } from 'lodash';
10
10
 
11
- /* *
12
- * Licensed under the Apache License, Version 2.0 (the "License");
13
- * you may not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * http://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing, software
19
- * distributed under the License is distributed on an "AS IS" BASIS,
20
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- * See the License for the specific language governing permissions and
22
- * limitations under the License.
23
- *
24
- * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
25
- * Copyright 2021 - Finnish Meteorological Institute (FMI)
26
- * */
11
+ /*! *****************************************************************************
12
+ Copyright (c) Microsoft Corporation.
13
+
14
+ Permission to use, copy, modify, and/or distribute this software for any
15
+ purpose with or without fee is hereby granted.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
18
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
19
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
20
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
21
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
22
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
23
+ PERFORMANCE OF THIS SOFTWARE.
24
+ ***************************************************************************** */
25
+
26
+ function __rest(s, e) {
27
+ var t = {};
28
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
29
+ t[p] = s[p];
30
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
31
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
32
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
33
+ t[p[i]] = s[p[i]];
34
+ }
35
+ return t;
36
+ }
37
+
27
38
  var bgColors = {
28
39
  green: '#fcffeb',
29
40
  grey: '#f8f9f9',
@@ -57,47 +68,23 @@ var tagStyle = function tagStyle(color) {
57
68
  };
58
69
  };
59
70
 
60
- var StatusTag = function StatusTag(_ref) {
61
- var content = _ref.content,
62
- color = _ref.color;
71
+ var StatusTag = function StatusTag(_a) {
72
+ var content = _a.content,
73
+ color = _a.color,
74
+ props = __rest(_a, ["content", "color"]);
75
+
63
76
  return /*#__PURE__*/React.createElement(Box, {
64
77
  display: "flex",
65
78
  alignItems: "center",
66
79
  justifyContent: "center",
67
- sx: Object.assign({}, tagStyle(color)),
68
- "data-testid": "statusTag"
80
+ "data-testid": "statusTag",
81
+ className: "statusTag",
82
+ sx: Object.assign(Object.assign({}, tagStyle(color)), props.sx)
69
83
  }, /*#__PURE__*/React.createElement(Typography, {
70
84
  variant: "caption"
71
85
  }, content));
72
86
  };
73
87
 
74
- /*! *****************************************************************************
75
- Copyright (c) Microsoft Corporation.
76
-
77
- Permission to use, copy, modify, and/or distribute this software for any
78
- purpose with or without fee is hereby granted.
79
-
80
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
81
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
82
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
83
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
84
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
85
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
86
- PERFORMANCE OF THIS SOFTWARE.
87
- ***************************************************************************** */
88
-
89
- function __rest(s, e) {
90
- var t = {};
91
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
92
- t[p] = s[p];
93
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
94
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
95
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
96
- t[p[i]] = s[p[i]];
97
- }
98
- return t;
99
- }
100
-
101
88
  var confirmStyle = {
102
89
  width: {
103
90
  xs: '100%',
package/index.umd.js CHANGED
@@ -144,13 +144,16 @@
144
144
 
145
145
  var StatusTag = function StatusTag(_a) {
146
146
  var content = _a.content,
147
- color = _a.color;
147
+ color = _a.color,
148
+ props = __rest(_a, ["content", "color"]);
149
+
148
150
  return /*#__PURE__*/React__namespace.createElement(material.Box, {
149
151
  display: "flex",
150
152
  alignItems: "center",
151
153
  justifyContent: "center",
152
- sx: __assign({}, tagStyle(color)),
153
- "data-testid": "statusTag"
154
+ "data-testid": "statusTag",
155
+ className: "statusTag",
156
+ sx: __assign(__assign({}, tagStyle(color)), props.sx)
154
157
  }, /*#__PURE__*/React__namespace.createElement(material.Typography, {
155
158
  variant: "caption"
156
159
  }, content));
@@ -5,25 +5,21 @@ declare const _default: {
5
5
  export default _default;
6
6
  export declare const AvatarLight: {
7
7
  (): React.ReactElement;
8
- story: {
9
- name: string;
10
- parameters: {
11
- zeplinLink: {
12
- name: string;
13
- link: string;
14
- }[];
15
- };
8
+ storyName: string;
9
+ parameters: {
10
+ zeplinLink: {
11
+ name: string;
12
+ link: string;
13
+ }[];
16
14
  };
17
15
  };
18
16
  export declare const AvatarDark: {
19
17
  (): React.ReactElement;
20
- story: {
21
- name: string;
22
- parameters: {
23
- zeplinLink: {
24
- name: string;
25
- link: string;
26
- }[];
27
- };
18
+ storyName: string;
19
+ parameters: {
20
+ zeplinLink: {
21
+ name: string;
22
+ link: string;
23
+ }[];
28
24
  };
29
25
  };
@@ -3,6 +3,6 @@ import { ToggleButtonProps } from '@mui/material';
3
3
  import { ButtonVariant } from '@opengeoweb/theme';
4
4
  export interface CustomToggleButtonProps extends Omit<ToggleButtonProps, 'value'> {
5
5
  variant?: ButtonVariant;
6
- value?: unknown;
6
+ value?: any;
7
7
  }
8
8
  export declare const CustomToggleButton: React.FC<CustomToggleButtonProps>;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- interface StatusTagProps {
2
+ import { BoxProps } from '@mui/material';
3
+ interface StatusTagProps extends BoxProps {
3
4
  content: string;
4
5
  color: string;
5
6
  }
@@ -7,5 +7,6 @@ export interface ToolButtonProps extends CustomToggleButtonProps {
7
7
  height?: string;
8
8
  value?: unknown;
9
9
  sx?: SxProps<Theme>;
10
+ children?: React.ReactNode;
10
11
  }
11
12
  export declare const ToolButton: React.FC<ToolButtonProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/shared",
3
- "version": "4.2.0",
3
+ "version": "4.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": {
@@ -13,16 +13,16 @@
13
13
  "dependencies": {},
14
14
  "peerDependencies": {
15
15
  "react": "^17.0.2",
16
- "@mui/material": "^5.2.8",
17
- "@opengeoweb/theme": "4.2.0",
18
- "react-draggable": "^4.4.3",
16
+ "@mui/material": "^5.10.8",
17
+ "@opengeoweb/theme": "4.3.0",
18
+ "react-draggable": "^4.4.5",
19
19
  "re-resizable": "^6.9.0",
20
20
  "lodash": "^4.17.20",
21
- "@opengeoweb/form-fields": "4.2.0",
21
+ "@opengeoweb/form-fields": "4.3.0",
22
22
  "react-hook-form": "^6.12.1",
23
23
  "moment": "^2.29.0",
24
24
  "moment-timezone": "^0.5.31",
25
- "@mui/lab": "^5.0.0-alpha.64",
25
+ "@mui/x-date-pickers": "^5.0.4",
26
26
  "axios": "^0.25.0"
27
27
  }
28
28
  }