@opengeoweb/shared 6.1.1 → 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
|
@@ -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);
|
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,7 +13,7 @@
|
|
|
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
19
|
"axios": "1.5.0",
|
|
@@ -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
|
*
|