@opengeoweb/shared 6.1.0 → 7.0.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
|
@@ -86,31 +86,31 @@ var StatusTag = function StatusTag(_a) {
|
|
|
86
86
|
}, content));
|
|
87
87
|
};
|
|
88
88
|
|
|
89
|
-
function _iterableToArrayLimit$1(
|
|
90
|
-
var
|
|
91
|
-
if (null !=
|
|
92
|
-
var
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
89
|
+
function _iterableToArrayLimit$1(r, l) {
|
|
90
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
91
|
+
if (null != t) {
|
|
92
|
+
var e,
|
|
93
|
+
n,
|
|
94
|
+
i,
|
|
95
|
+
u,
|
|
96
|
+
a = [],
|
|
97
|
+
f = !0,
|
|
98
|
+
o = !1;
|
|
99
99
|
try {
|
|
100
|
-
if (
|
|
101
|
-
if (Object(
|
|
102
|
-
|
|
103
|
-
} else for (; !(
|
|
104
|
-
} catch (
|
|
105
|
-
|
|
100
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
101
|
+
if (Object(t) !== t) return;
|
|
102
|
+
f = !1;
|
|
103
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
104
|
+
} catch (r) {
|
|
105
|
+
o = !0, n = r;
|
|
106
106
|
} finally {
|
|
107
107
|
try {
|
|
108
|
-
if (!
|
|
108
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
109
109
|
} finally {
|
|
110
|
-
if (
|
|
110
|
+
if (o) throw n;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
return
|
|
113
|
+
return a;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
function _classCallCheck$1(instance, Constructor) {
|
|
@@ -25149,14 +25149,15 @@ var setUTCDate = function setUTCDate(inDate) {
|
|
|
25149
25149
|
*
|
|
25150
25150
|
* Expects the following props:
|
|
25151
25151
|
* @param {Date} inDate - date to be formatted
|
|
25152
|
-
* @param {string} strFormat - format of string
|
|
25152
|
+
* @param {string} strFormat - [default: "yyyy-MM-dd'T'HH:mm:ss'Z'"] format of string
|
|
25153
25153
|
* @param {boolean} utc - [default: true] true to return in utc otherwise return in local timezone
|
|
25154
25154
|
*
|
|
25155
25155
|
* @returns {string} - formatted date string
|
|
25156
25156
|
* @example
|
|
25157
25157
|
* ``` dateToString(new Date(2022, 10, 12, 15, 30), 'dd MMM yyyy') ```
|
|
25158
25158
|
*/
|
|
25159
|
-
var dateToString = function dateToString(inDate
|
|
25159
|
+
var dateToString = function dateToString(inDate) {
|
|
25160
|
+
var strFormat = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "yyyy-MM-dd'T'HH:mm:ss'Z'";
|
|
25160
25161
|
var utc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
25161
25162
|
if (utc) {
|
|
25162
25163
|
return format(new Date(inDate.getUTCFullYear(), inDate.getUTCMonth(), inDate.getUTCDate(), inDate.getUTCHours(), inDate.getUTCMinutes(), inDate.getUTCSeconds()), strFormat);
|
|
@@ -25365,14 +25366,14 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
25365
25366
|
|
|
25366
25367
|
var lib = {};
|
|
25367
25368
|
|
|
25368
|
-
function _typeof(
|
|
25369
|
+
function _typeof(o) {
|
|
25369
25370
|
"@babel/helpers - typeof";
|
|
25370
25371
|
|
|
25371
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
25372
|
-
return typeof
|
|
25373
|
-
} : function (
|
|
25374
|
-
return
|
|
25375
|
-
}, _typeof(
|
|
25372
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
25373
|
+
return typeof o;
|
|
25374
|
+
} : function (o) {
|
|
25375
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
25376
|
+
}, _typeof(o);
|
|
25376
25377
|
}
|
|
25377
25378
|
|
|
25378
25379
|
function _toPrimitive(input, hint) {
|
|
@@ -25406,26 +25407,26 @@ function _defineProperty(obj, key, value) {
|
|
|
25406
25407
|
return obj;
|
|
25407
25408
|
}
|
|
25408
25409
|
|
|
25409
|
-
function ownKeys(
|
|
25410
|
-
var
|
|
25410
|
+
function ownKeys(e, r) {
|
|
25411
|
+
var t = Object.keys(e);
|
|
25411
25412
|
if (Object.getOwnPropertySymbols) {
|
|
25412
|
-
var
|
|
25413
|
-
|
|
25414
|
-
return Object.getOwnPropertyDescriptor(
|
|
25415
|
-
})),
|
|
25413
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
25414
|
+
r && (o = o.filter(function (r) {
|
|
25415
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
25416
|
+
})), t.push.apply(t, o);
|
|
25416
25417
|
}
|
|
25417
|
-
return
|
|
25418
|
+
return t;
|
|
25418
25419
|
}
|
|
25419
|
-
function _objectSpread2(
|
|
25420
|
-
for (var
|
|
25421
|
-
var
|
|
25422
|
-
|
|
25423
|
-
_defineProperty(
|
|
25424
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
25425
|
-
Object.defineProperty(
|
|
25420
|
+
function _objectSpread2(e) {
|
|
25421
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
25422
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
25423
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
25424
|
+
_defineProperty(e, r, t[r]);
|
|
25425
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
25426
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
25426
25427
|
});
|
|
25427
25428
|
}
|
|
25428
|
-
return
|
|
25429
|
+
return e;
|
|
25429
25430
|
}
|
|
25430
25431
|
|
|
25431
25432
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengeoweb/shared",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.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,10 +13,10 @@
|
|
|
13
13
|
"dependencies": {},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"@mui/material": "5.12.0",
|
|
16
|
-
"@opengeoweb/theme": "
|
|
16
|
+
"@opengeoweb/theme": "7.0.0",
|
|
17
17
|
"@redux-eggs/core": "2.2.0",
|
|
18
18
|
"@reduxjs/toolkit": "1.9.5",
|
|
19
|
-
"axios": "1.
|
|
19
|
+
"axios": "1.5.0",
|
|
20
20
|
"date-fns": "2.30.0",
|
|
21
21
|
"lodash": "4.17.21",
|
|
22
22
|
"re-resizable": "6.9.11",
|
|
@@ -25,7 +25,7 @@ interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'
|
|
|
25
25
|
bounds?: 'parent' | string;
|
|
26
26
|
cancel?: string;
|
|
27
27
|
order?: number;
|
|
28
|
-
source?:
|
|
28
|
+
source?: Source;
|
|
29
29
|
leftHeaderComponent?: React.ReactNode;
|
|
30
30
|
rightHeaderComponent?: React.ReactNode;
|
|
31
31
|
dragHandleIcon?: React.ReactNode;
|
|
@@ -33,5 +33,6 @@ interface DraggableComponentProps extends Omit<ResizableComponentProps, 'bounds'
|
|
|
33
33
|
sx?: SxProps;
|
|
34
34
|
}
|
|
35
35
|
export declare const calculateNewPosition: (position: DraggablePosition, isRightAligned: boolean, handle: string, delta: NumberSize) => DraggablePosition;
|
|
36
|
+
export type Source = 'app' | 'module';
|
|
36
37
|
declare const DraggableComponent: React.FC<DraggableComponentProps>;
|
|
37
38
|
export default DraggableComponent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as ToolContainer } from './ToolContainer';
|
|
2
2
|
export { default as ToolContainerDraggable } from './ToolContainerDraggable';
|
|
3
|
+
export type { Source } from './ToolContainerDraggable';
|
|
3
4
|
export { calculateDialogSizeAndPosition } from './ToolContainerDraggable';
|
|
4
5
|
export { default as ToolHeader } from './ToolHeader';
|
|
5
6
|
export { default as ToolFooter } from './ToolFooter';
|
|
@@ -96,14 +96,14 @@ export declare const setUTCDate: (inDate: Date) => Date;
|
|
|
96
96
|
*
|
|
97
97
|
* Expects the following props:
|
|
98
98
|
* @param {Date} inDate - date to be formatted
|
|
99
|
-
* @param {string} strFormat - format of string
|
|
99
|
+
* @param {string} strFormat - [default: "yyyy-MM-dd'T'HH:mm:ss'Z'"] format of string
|
|
100
100
|
* @param {boolean} utc - [default: true] true to return in utc otherwise return in local timezone
|
|
101
101
|
*
|
|
102
102
|
* @returns {string} - formatted date string
|
|
103
103
|
* @example
|
|
104
104
|
* ``` dateToString(new Date(2022, 10, 12, 15, 30), 'dd MMM yyyy') ```
|
|
105
105
|
*/
|
|
106
|
-
export declare const dateToString: (inDate: Date, strFormat
|
|
106
|
+
export declare const dateToString: (inDate: Date, strFormat?: string, utc?: boolean) => string;
|
|
107
107
|
/**
|
|
108
108
|
* Find out if a date is between two other dates.
|
|
109
109
|
*
|