cortex-react-ui 0.2.8 → 0.2.10
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/lib/cjs/Camera/Camera.d.ts +1 -1
- package/lib/cjs/Scanner/ScanConfirmationDialog.d.ts +0 -1
- package/lib/cjs/Scanner/Scanner.d.ts +0 -1
- package/lib/cjs/index.d.ts +0 -1
- package/lib/cjs/index.js +3 -15
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/utils/setRef.d.ts +0 -1
- package/lib/esm/Camera/Camera.d.ts +1 -1
- package/lib/esm/Scanner/ScanConfirmationDialog.d.ts +0 -1
- package/lib/esm/Scanner/Scanner.d.ts +0 -1
- package/lib/esm/index.d.ts +0 -1
- package/lib/esm/index.js +3 -15
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/setRef.d.ts +0 -1
- package/lib/index.d.ts +2 -84
- package/lib/styles/Camera/index.css +4 -0
- package/lib/styles/Camera/index.scss +6 -2
- package/lib/styles/Scanner/index.css +75 -0
- package/lib/styles/index.scss +0 -2
- package/lib/typings/typings/css.d.ts +0 -3
- package/package.json +4 -14
- package/lib/cjs/Map/App.d.ts +0 -15
- package/lib/cjs/Map/Map.d.ts +0 -16
- package/lib/cjs/Map/components/CenterActiveAreaControl.d.ts +0 -5
- package/lib/cjs/Map/components/DrawTools.d.ts +0 -18
- package/lib/cjs/Map/components/LocationContext.d.ts +0 -7
- package/lib/cjs/Map/components/MapFullscreenControl.d.ts +0 -22
- package/lib/cjs/Map/components/Maps.d.ts +0 -22
- package/lib/cjs/Map/config/appConfig.d.ts +0 -4
- package/lib/cjs/Map/config/config.d.ts +0 -6
- package/lib/cjs/Map/hooks/getGeoJSONTest.d.ts +0 -16
- package/lib/cjs/Map/hooks/useLocationContext.d.ts +0 -1
- package/lib/cjs/Map/index.d.ts +0 -1
- package/lib/cjs/Map/models/index.d.ts +0 -2
- package/lib/cjs/Map/models/location.d.ts +0 -6
- package/lib/cjs/Map/models/locationSearch.d.ts +0 -4
- package/lib/cjs/Map/models/point.d.ts +0 -6
- package/lib/cjs/Map/utils/logger.d.ts +0 -17
- package/lib/cjs/Map/utils/toolkit.d.ts +0 -129
- package/lib/esm/Map/App.d.ts +0 -15
- package/lib/esm/Map/Map.d.ts +0 -16
- package/lib/esm/Map/components/CenterActiveAreaControl.d.ts +0 -5
- package/lib/esm/Map/components/DrawTools.d.ts +0 -18
- package/lib/esm/Map/components/LocationContext.d.ts +0 -7
- package/lib/esm/Map/components/MapFullscreenControl.d.ts +0 -22
- package/lib/esm/Map/components/Maps.d.ts +0 -22
- package/lib/esm/Map/config/appConfig.d.ts +0 -4
- package/lib/esm/Map/config/config.d.ts +0 -6
- package/lib/esm/Map/hooks/getGeoJSONTest.d.ts +0 -16
- package/lib/esm/Map/hooks/useLocationContext.d.ts +0 -1
- package/lib/esm/Map/index.d.ts +0 -1
- package/lib/esm/Map/models/index.d.ts +0 -2
- package/lib/esm/Map/models/location.d.ts +0 -6
- package/lib/esm/Map/models/locationSearch.d.ts +0 -4
- package/lib/esm/Map/models/point.d.ts +0 -6
- package/lib/esm/Map/utils/logger.d.ts +0 -17
- package/lib/esm/Map/utils/toolkit.d.ts +0 -129
- package/lib/images/layers-2x.png +0 -0
- package/lib/images/layers.png +0 -0
- package/lib/images/marker-icon-2x.png +0 -0
- package/lib/images/marker-icon.png +0 -0
- package/lib/images/marker-shadow.png +0 -0
- package/lib/styles/Map/index.scss +0 -50
- package/lib/styles/Scanner/index.scss +0 -110
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import React$1, { CSSProperties } from 'react';
|
|
3
2
|
import { IDetectedBarcode, IScannerProps } from '@yudiel/react-qr-scanner';
|
|
4
3
|
import { WebcamProps } from 'react-webcam';
|
|
5
|
-
import { MapContainerProps } from 'react-leaflet';
|
|
6
|
-
import { ControlPosition, LatLngTuple } from 'leaflet';
|
|
7
4
|
|
|
8
5
|
declare const PopperPlacement: {
|
|
9
6
|
readonly Center: "center";
|
|
@@ -110,6 +107,7 @@ type CameraProps = {
|
|
|
110
107
|
validateText?: string;
|
|
111
108
|
resetText?: string;
|
|
112
109
|
isShowVideoButton?: boolean;
|
|
110
|
+
isShowSwitchButton?: boolean;
|
|
113
111
|
} & Partial<WebcamProps>;
|
|
114
112
|
type TfileCapturedProps = {
|
|
115
113
|
fileStoreName?: string | null;
|
|
@@ -165,86 +163,6 @@ interface TooltipProps {
|
|
|
165
163
|
}
|
|
166
164
|
declare const TagInput: React$1.FC<TooltipProps>;
|
|
167
165
|
|
|
168
|
-
declare class Point {
|
|
169
|
-
id: number;
|
|
170
|
-
order: number;
|
|
171
|
-
latitude: number;
|
|
172
|
-
longitude: number;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
declare class Location {
|
|
176
|
-
id: number;
|
|
177
|
-
objId: string;
|
|
178
|
-
points: Point[];
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
type CenterActiveAreaControlProps = {
|
|
182
|
-
autoCenter?: boolean;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
/** Props interface for MapFullscreenControl component */
|
|
186
|
-
type MapFullscreenControlProps = {
|
|
187
|
-
/** Change the content of the button, can be HTML, default null */
|
|
188
|
-
content?: string | undefined;
|
|
189
|
-
/** Change the position of the button can be topleft, topright, bottomright or bottomleft, default topleft */
|
|
190
|
-
position?: ControlPosition | undefined;
|
|
191
|
-
/** Change the title of the button, default Full Screen */
|
|
192
|
-
title?: string | undefined;
|
|
193
|
-
/** Change the title of the button when fullscreen is on, default Exit Full Screen */
|
|
194
|
-
titleCancel?: string | undefined;
|
|
195
|
-
/** Force separate button to detach from zoom buttons, default false */
|
|
196
|
-
forceSeparateButton?: boolean | undefined;
|
|
197
|
-
/** Force use of pseudo full screen even if full screen API is available, default false */
|
|
198
|
-
forcePseudoFullscreen?: boolean | undefined;
|
|
199
|
-
/** Use pseudo fullscreen */
|
|
200
|
-
pseudoFullscreen?: boolean | undefined;
|
|
201
|
-
/** Dom element to render in full screen, false by default, fallback to map._container */
|
|
202
|
-
fullscreenElement?: false | HTMLElement | undefined;
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
type DrawToolsProps = {
|
|
206
|
-
position?: ControlPosition | undefined;
|
|
207
|
-
handleOnCreated?: (v: void) => void;
|
|
208
|
-
handleOnDeleted?: (v: void) => void;
|
|
209
|
-
handleOnEdited?: (v: void) => void;
|
|
210
|
-
draw?: drawType;
|
|
211
|
-
editable?: boolean;
|
|
212
|
-
};
|
|
213
|
-
type drawType = {
|
|
214
|
-
polyline?: boolean;
|
|
215
|
-
polygon?: boolean;
|
|
216
|
-
rectangle?: boolean;
|
|
217
|
-
circle?: boolean;
|
|
218
|
-
marker?: boolean;
|
|
219
|
-
circlemarker?: boolean;
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
type MapsProps = {
|
|
223
|
-
MapContainerProps?: MapContainerProps;
|
|
224
|
-
center?: LatLngTuple;
|
|
225
|
-
fullscreen?: MapFullscreenControlProps | boolean;
|
|
226
|
-
centerActiveArea?: CenterActiveAreaControlProps | boolean;
|
|
227
|
-
drawTools?: DrawToolsProps | boolean;
|
|
228
|
-
minZoom?: number;
|
|
229
|
-
maxZoom?: number;
|
|
230
|
-
zoom?: number;
|
|
231
|
-
data?: Location[];
|
|
232
|
-
toggleSatelliteView?: boolean;
|
|
233
|
-
singlePosition?: boolean;
|
|
234
|
-
onChange?: (locations: Location[]) => void;
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
declare const Map: React$1.FC<AppProps>;
|
|
238
|
-
type AppProps = MapsProps & {
|
|
239
|
-
onClose?: (() => void);
|
|
240
|
-
onSave?: ((locations: Location[]) => void);
|
|
241
|
-
onChange?: ((locations: Location[]) => void);
|
|
242
|
-
customButtons?: {
|
|
243
|
-
cancelButton?: HTMLElement;
|
|
244
|
-
saveButton?: HTMLElement;
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
|
|
248
166
|
interface MenuProps {
|
|
249
167
|
containerRef: React$1.RefObject<HTMLElement>;
|
|
250
168
|
className?: string;
|
|
@@ -408,4 +326,4 @@ interface Props {
|
|
|
408
326
|
}
|
|
409
327
|
declare const CrossIcon: React$1.FC<Props>;
|
|
410
328
|
|
|
411
|
-
export { AuthDownloadLink, BarLoader, Button, Camera, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ConfirmDialog, ContextMenu, CrossIcon, Dialog, DialogActions, DialogContent$1 as DialogContent, DialogFooter, DialogHeader, DialogContent as DialogTitle, Divider, DomContainer, ErrorDialog,
|
|
329
|
+
export { AuthDownloadLink, BarLoader, Button, Camera, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ConfirmDialog, ContextMenu, CrossIcon, Dialog, DialogActions, DialogContent$1 as DialogContent, DialogFooter, DialogHeader, DialogContent as DialogTitle, Divider, DomContainer, ErrorDialog, Menu, MenuGroup, MenuItem, Popper, PopupMenu, Scanner, Selected, Spinner, TagInput, ToggleButton, Tooltip, WarningDialog };
|
|
@@ -110,17 +110,21 @@
|
|
|
110
110
|
width: 100%;
|
|
111
111
|
height: 90%;
|
|
112
112
|
overflow: hidden;
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: column;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
align-items: center;
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
.camera-controls {
|
|
116
120
|
z-index: 999;
|
|
117
121
|
display: flex;
|
|
118
122
|
justify-content: center;
|
|
123
|
+
align-items: center;
|
|
119
124
|
gap: 1rem;
|
|
120
|
-
margin: 0 auto;
|
|
121
125
|
padding: 1rem;
|
|
122
126
|
width: 100%;
|
|
123
|
-
|
|
127
|
+
flex-direction: column;
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
.video-play-btn {
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
.btn {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
padding: 0.5rem 1rem;
|
|
6
|
+
border: 1px solid transparent;
|
|
7
|
+
border-radius: 0.375rem;
|
|
8
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
9
|
+
font-size: 0.875rem;
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
line-height: 1.25rem;
|
|
12
|
+
text-align: center;
|
|
13
|
+
text-transform: none;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
user-select: none;
|
|
17
|
+
background-color: #4F46E5;
|
|
18
|
+
color: #fff;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
outline: none;
|
|
21
|
+
transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.btn-default {
|
|
25
|
+
background-color: #4F46E5;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.btn-default:hover {
|
|
29
|
+
opacity: 0.8;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.select {
|
|
33
|
+
display: block;
|
|
34
|
+
width: 100%;
|
|
35
|
+
padding-left: 0.75rem;
|
|
36
|
+
color: #000;
|
|
37
|
+
padding-right: 2.5rem;
|
|
38
|
+
padding-top: 0.5rem;
|
|
39
|
+
padding-bottom: 0.5rem;
|
|
40
|
+
font-size: 1rem;
|
|
41
|
+
border-radius: 0.375rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* DIALOG */
|
|
45
|
+
.dialog-header {
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dialog-header h4 {
|
|
51
|
+
margin: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.dialog-mask {
|
|
55
|
+
overflow-x: hidden;
|
|
56
|
+
overflow-y: auto;
|
|
57
|
+
display: flex;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
padding-top: 2.5rem;
|
|
60
|
+
padding-bottom: 5rem;
|
|
61
|
+
background-color: #0005;
|
|
62
|
+
position: fixed;
|
|
63
|
+
inset: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.dialog-body {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
gap: 1.25rem;
|
|
70
|
+
padding: 1.25rem;
|
|
71
|
+
height: max-content;
|
|
72
|
+
background-color: white;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* DIALOG */
|
package/lib/styles/index.scss
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
@use "Selected";
|
|
15
15
|
@use "BarLoader";
|
|
16
16
|
@use "Camera";
|
|
17
|
-
@use "Map";
|
|
18
17
|
|
|
19
18
|
@include Icons.icons();
|
|
20
19
|
@include Popper.popper();
|
|
@@ -30,7 +29,6 @@
|
|
|
30
29
|
@include Selected.selected();
|
|
31
30
|
@include BarLoader.barLoader();
|
|
32
31
|
@include Camera.camera();
|
|
33
|
-
@include Map.map();
|
|
34
32
|
|
|
35
33
|
// @include popper();
|
|
36
34
|
// @include popper(
|
|
@@ -9,7 +9,4 @@ declare module '*.scss' {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// Add specific CSS module declarations
|
|
12
|
-
declare module 'leaflet/dist/leaflet.css';
|
|
13
|
-
declare module 'leaflet-draw/dist/leaflet.draw.css';
|
|
14
|
-
declare module 'leaflet.fullscreen/Control.FullScreen.css';
|
|
15
12
|
declare module './css/center-active-control.css';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortex-react-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "React UI",
|
|
5
5
|
"author": "Anthony",
|
|
6
6
|
"license": "MIT",
|
|
@@ -84,13 +84,10 @@
|
|
|
84
84
|
"@testing-library/react": "^11.1.0",
|
|
85
85
|
"@testing-library/user-event": "^12.1.10",
|
|
86
86
|
"@types/jest": "^26.0.15",
|
|
87
|
-
"@types/leaflet": "^1.7.10",
|
|
88
|
-
"@types/leaflet-draw": "^1.0.11",
|
|
89
|
-
"@types/leaflet.fullscreen": "^1.6.1",
|
|
90
87
|
"@types/node": "^22.10.5",
|
|
91
88
|
"@types/react": "^17.0.0",
|
|
92
89
|
"@types/react-dom": "^17.0.0",
|
|
93
|
-
"@yudiel/react-qr-scanner": "^2.
|
|
90
|
+
"@yudiel/react-qr-scanner": "^2.0.2",
|
|
94
91
|
"css-loader": "5.2.6",
|
|
95
92
|
"eslint-config-airbnb": "^18.2.1",
|
|
96
93
|
"eslint-plugin-import": "^2.25.2",
|
|
@@ -103,6 +100,7 @@
|
|
|
103
100
|
"react-dom": "^18.1.0",
|
|
104
101
|
"react-icons": "^5.3.0",
|
|
105
102
|
"react-scripts": "^5.0.1",
|
|
103
|
+
"react-webcam": "^7.2.0",
|
|
106
104
|
"rollup": "^2.60.2",
|
|
107
105
|
"rollup-plugin-copy": "^3.4.0",
|
|
108
106
|
"rollup-plugin-css-only": "^4.5.2",
|
|
@@ -121,14 +119,6 @@
|
|
|
121
119
|
"url-loader": "^4.1.1"
|
|
122
120
|
},
|
|
123
121
|
"dependencies": {
|
|
124
|
-
"@rollup/plugin-replace": "^5.0.2"
|
|
125
|
-
"leaflet": "^1.8.0",
|
|
126
|
-
"leaflet-active-area": "^1.2.1",
|
|
127
|
-
"leaflet-draw": "^1.0.4",
|
|
128
|
-
"leaflet.fullscreen": "^2.4.0",
|
|
129
|
-
"react-leaflet": "^4.0.0",
|
|
130
|
-
"react-leaflet-draw": "^0.20.4",
|
|
131
|
-
"react-webcam": "^7.2.0",
|
|
132
|
-
"screenfull": "^6.0.2"
|
|
122
|
+
"@rollup/plugin-replace": "^5.0.2"
|
|
133
123
|
}
|
|
134
124
|
}
|
package/lib/cjs/Map/App.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MapsProps } from './components/Maps';
|
|
3
|
-
import 'leaflet/dist/leaflet.css';
|
|
4
|
-
import 'leaflet-draw/dist/leaflet.draw.css';
|
|
5
|
-
import { Point } from './models';
|
|
6
|
-
declare const App: React.FC<AppProps>;
|
|
7
|
-
export type AppProps = MapsProps & {
|
|
8
|
-
onClose: (() => void);
|
|
9
|
-
onSave: ((points: Point[]) => void);
|
|
10
|
-
customButtons?: {
|
|
11
|
-
cancelButton?: HTMLElement;
|
|
12
|
-
saveButton?: HTMLElement;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export default App;
|
package/lib/cjs/Map/Map.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MapsProps } from './components/Maps';
|
|
3
|
-
import 'leaflet/dist/leaflet.css';
|
|
4
|
-
import 'leaflet-draw/dist/leaflet.draw.css';
|
|
5
|
-
import { Location } from './models';
|
|
6
|
-
declare const Map: React.FC<AppProps>;
|
|
7
|
-
export type AppProps = MapsProps & {
|
|
8
|
-
onClose?: (() => void);
|
|
9
|
-
onSave?: ((locations: Location[]) => void);
|
|
10
|
-
onChange?: ((locations: Location[]) => void);
|
|
11
|
-
customButtons?: {
|
|
12
|
-
cancelButton?: HTMLElement;
|
|
13
|
-
saveButton?: HTMLElement;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export default Map;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ControlPosition } from 'leaflet';
|
|
2
|
-
export declare const DrawTools: (props: DrawToolsProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export type DrawToolsProps = {
|
|
4
|
-
position?: ControlPosition | undefined;
|
|
5
|
-
handleOnCreated?: (v: void) => void;
|
|
6
|
-
handleOnDeleted?: (v: void) => void;
|
|
7
|
-
handleOnEdited?: (v: void) => void;
|
|
8
|
-
draw?: drawType;
|
|
9
|
-
editable?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type drawType = {
|
|
12
|
-
polyline?: boolean;
|
|
13
|
-
polygon?: boolean;
|
|
14
|
-
rectangle?: boolean;
|
|
15
|
-
circle?: boolean;
|
|
16
|
-
marker?: boolean;
|
|
17
|
-
circlemarker?: boolean;
|
|
18
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Location } from '../models';
|
|
3
|
-
export type LocationContent = {
|
|
4
|
-
locations: Location[];
|
|
5
|
-
setLocations: React.Dispatch<React.SetStateAction<Location[]>>;
|
|
6
|
-
};
|
|
7
|
-
export declare const LocationContext: import("react").Context<LocationContent>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import 'leaflet.fullscreen/Control.FullScreen.css';
|
|
2
|
-
import { ControlPosition } from 'leaflet';
|
|
3
|
-
export declare const MapFullscreenControl: (props: MapFullscreenControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
/** Props interface for MapFullscreenControl component */
|
|
5
|
-
export type MapFullscreenControlProps = {
|
|
6
|
-
/** Change the content of the button, can be HTML, default null */
|
|
7
|
-
content?: string | undefined;
|
|
8
|
-
/** Change the position of the button can be topleft, topright, bottomright or bottomleft, default topleft */
|
|
9
|
-
position?: ControlPosition | undefined;
|
|
10
|
-
/** Change the title of the button, default Full Screen */
|
|
11
|
-
title?: string | undefined;
|
|
12
|
-
/** Change the title of the button when fullscreen is on, default Exit Full Screen */
|
|
13
|
-
titleCancel?: string | undefined;
|
|
14
|
-
/** Force separate button to detach from zoom buttons, default false */
|
|
15
|
-
forceSeparateButton?: boolean | undefined;
|
|
16
|
-
/** Force use of pseudo full screen even if full screen API is available, default false */
|
|
17
|
-
forcePseudoFullscreen?: boolean | undefined;
|
|
18
|
-
/** Use pseudo fullscreen */
|
|
19
|
-
pseudoFullscreen?: boolean | undefined;
|
|
20
|
-
/** Dom element to render in full screen, false by default, fallback to map._container */
|
|
21
|
-
fullscreenElement?: false | HTMLElement | undefined;
|
|
22
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { MapContainerProps } from 'react-leaflet';
|
|
2
|
-
import { LatLngTuple } from 'leaflet';
|
|
3
|
-
import { Location } from '../models';
|
|
4
|
-
import { CenterActiveAreaControlProps } from './CenterActiveAreaControl';
|
|
5
|
-
import { MapFullscreenControlProps } from './MapFullscreenControl';
|
|
6
|
-
import { DrawToolsProps } from './DrawTools';
|
|
7
|
-
declare const Maps: (props: MapsProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export type MapsProps = {
|
|
9
|
-
MapContainerProps?: MapContainerProps;
|
|
10
|
-
center?: LatLngTuple;
|
|
11
|
-
fullscreen?: MapFullscreenControlProps | boolean;
|
|
12
|
-
centerActiveArea?: CenterActiveAreaControlProps | boolean;
|
|
13
|
-
drawTools?: DrawToolsProps | boolean;
|
|
14
|
-
minZoom?: number;
|
|
15
|
-
maxZoom?: number;
|
|
16
|
-
zoom?: number;
|
|
17
|
-
data?: Location[];
|
|
18
|
-
toggleSatelliteView?: boolean;
|
|
19
|
-
singlePosition?: boolean;
|
|
20
|
-
onChange?: (locations: Location[]) => void;
|
|
21
|
-
};
|
|
22
|
-
export default Maps;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const getGeoJSONTest: () => {
|
|
2
|
-
type: string;
|
|
3
|
-
features: {
|
|
4
|
-
type: string;
|
|
5
|
-
properties: {
|
|
6
|
-
"marker-color": string;
|
|
7
|
-
"marker-size": string;
|
|
8
|
-
"marker-symbol": string;
|
|
9
|
-
description: string;
|
|
10
|
-
};
|
|
11
|
-
geometry: {
|
|
12
|
-
type: string;
|
|
13
|
-
coordinates: number[];
|
|
14
|
-
};
|
|
15
|
-
}[];
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useLocationContext: () => import("../components/LocationContext").LocationContent;
|
package/lib/cjs/Map/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Map';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
interface LogOptions {
|
|
2
|
-
tags?: string[];
|
|
3
|
-
context?: any;
|
|
4
|
-
method?: Function | string;
|
|
5
|
-
}
|
|
6
|
-
export declare enum LogLevel {
|
|
7
|
-
Info = 0,
|
|
8
|
-
Warning = 1,
|
|
9
|
-
Error = 2
|
|
10
|
-
}
|
|
11
|
-
declare class Logger {
|
|
12
|
-
info(msg: any | any[], options?: LogOptions): void;
|
|
13
|
-
warn(msg: any | any[], options?: LogOptions): void;
|
|
14
|
-
error(msg: any | any[], options?: LogOptions): void;
|
|
15
|
-
}
|
|
16
|
-
declare const _default: Logger;
|
|
17
|
-
export default _default;
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
interface MapOptions {
|
|
2
|
-
transformIsoToDate?: boolean;
|
|
3
|
-
strictMapping?: boolean;
|
|
4
|
-
ignoreStrictMappingWhenNull?: boolean;
|
|
5
|
-
}
|
|
6
|
-
interface DiffOptions {
|
|
7
|
-
objectKey?: string;
|
|
8
|
-
predicate?: (item: any, array: any[]) => boolean;
|
|
9
|
-
format?: (item: any) => any;
|
|
10
|
-
alternativeFormat?: (item: any) => any;
|
|
11
|
-
}
|
|
12
|
-
export default class ToolKit {
|
|
13
|
-
/**
|
|
14
|
-
* Type checks
|
|
15
|
-
*/
|
|
16
|
-
static isEmailFormat(email: string): boolean;
|
|
17
|
-
static isDefined<T>(arg: T): arg is NonNullable<T>;
|
|
18
|
-
static isObject(arg: any): arg is Object;
|
|
19
|
-
static isString(arg: any): arg is string;
|
|
20
|
-
static isFunction(arg: any): arg is Function;
|
|
21
|
-
static isArray(arg: any): arg is any[];
|
|
22
|
-
static isBoolean(arg: any): arg is boolean;
|
|
23
|
-
static isNumber(arg: any): arg is number;
|
|
24
|
-
static isValidNumber(arg: any): arg is number;
|
|
25
|
-
static isNaN(arg: any): boolean;
|
|
26
|
-
static isFloat(value: number): boolean;
|
|
27
|
-
static isDate(arg: any): arg is Date;
|
|
28
|
-
static isValidDate(arg: any): arg is Date;
|
|
29
|
-
static hasValue(arg: any): boolean;
|
|
30
|
-
static isUndefined(arg: any): arg is undefined;
|
|
31
|
-
static isNull(arg: any): arg is null;
|
|
32
|
-
static isUndefinedOrNull(arg: any): arg is undefined | null;
|
|
33
|
-
static isNativeTypeObject(arg: any): boolean;
|
|
34
|
-
static isEmpty<T extends string | any[]>(arg: T): boolean;
|
|
35
|
-
static noop(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Array
|
|
38
|
-
*/
|
|
39
|
-
static take<T>(array: T[], count: number, from?: number): T[];
|
|
40
|
-
static addRange(src: any[], newElements: any[]): void;
|
|
41
|
-
static removeFromCollection<T>(array: T[], predicate: (item: T, index: number) => boolean): boolean;
|
|
42
|
-
static removeAt<T>(array: T[], index: number): boolean;
|
|
43
|
-
static replaceAt<T>(array: T[], index: number, item: T): void;
|
|
44
|
-
static replaceCollectionItem<T>(array: T[], item: T, predicate: (item: T, index: number) => boolean): void;
|
|
45
|
-
static clearCollection(collection: any[]): void;
|
|
46
|
-
static diffCollection(array: any[], values: any[], options?: DiffOptions): any[];
|
|
47
|
-
static findIndex<T>(array: T[], predicate: (item: T, index: number) => boolean): number;
|
|
48
|
-
static find<T>(array: T[], predicate: (item: T, index: number) => boolean): T | null;
|
|
49
|
-
static orderBy<T>(array: T[], propertyAccessor: string, options?: {
|
|
50
|
-
nullFirst?: boolean;
|
|
51
|
-
ascending?: boolean;
|
|
52
|
-
}): void;
|
|
53
|
-
static countCollection<T>(array: T[], predicate: (item: T, index: number) => boolean): number;
|
|
54
|
-
static isCollectionOf<T = any>(array: T[], instanceOf: any): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* String
|
|
57
|
-
*/
|
|
58
|
-
static fixedLenInteger(value: number, length: number): string;
|
|
59
|
-
static fixedLenString(value: string, length: number): string;
|
|
60
|
-
static toCamelCase(value: string): string;
|
|
61
|
-
static capitalize(value: string): string;
|
|
62
|
-
/**
|
|
63
|
-
* Number
|
|
64
|
-
*/
|
|
65
|
-
static randomNumber(minValue: number, maxValue: number): number;
|
|
66
|
-
/**
|
|
67
|
-
* Date
|
|
68
|
-
*/
|
|
69
|
-
static dateOnly(date: Date): Date;
|
|
70
|
-
static formatDateTime(date: Date, timezone?: string): string;
|
|
71
|
-
static formatDateTimeUTC: (date: Date) => string;
|
|
72
|
-
static formatDateUTC: (date: Date, customFn?: (year: string, month: string, day: string) => string) => string;
|
|
73
|
-
static formatDate: (date: Date, customFn?: (year: string, month: string, day: string) => string) => string;
|
|
74
|
-
static formatHourUTC: (value: Date | number, customFn?: (h: string, m: string, s: string) => string) => string;
|
|
75
|
-
static formatHour: (value: Date | number, customFn?: (h: string, m: string, s: string) => string) => string;
|
|
76
|
-
static parseDateUTC(input: string): Date | null;
|
|
77
|
-
static parseDate(input: string): Date | null;
|
|
78
|
-
static parseHour(input: string): Date | null;
|
|
79
|
-
static mergeDateAndTime(date: Date, time: Date): Date | null;
|
|
80
|
-
static safeParseIsoDate<T>(value: T): Date | T;
|
|
81
|
-
static safeParseDate<T>(value: T): Date | T;
|
|
82
|
-
static safeParseUTCDate<T>(value: T): Date | T;
|
|
83
|
-
/**
|
|
84
|
-
* Classes
|
|
85
|
-
*/
|
|
86
|
-
static getClassName(instance: any): string | null;
|
|
87
|
-
static getClassMethodName(instance: any, method: Function): string | null;
|
|
88
|
-
static className(...args: any[]): string | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* Utilities
|
|
91
|
-
*/
|
|
92
|
-
static getObjectKeysDeep(object: any, prefix?: string): string[];
|
|
93
|
-
static mapToShallowObject(target: any, src: any, filterPredicate?: (key: string, value: any) => boolean): void;
|
|
94
|
-
static mapToDeepObject(target: any, src: any, options?: MapOptions): void;
|
|
95
|
-
static getPropertySafe(obj: any, propertyAccessor: string): any | undefined;
|
|
96
|
-
static cast<T = any>(arg: any): T;
|
|
97
|
-
static safeJsonReplacer(_key: any, value: any): any;
|
|
98
|
-
static safeJsonReviver(_key: any, value: any): any;
|
|
99
|
-
static quickClone<T>(arg: T): T | null;
|
|
100
|
-
static hasProperty(obj: any, prop: string | number): boolean;
|
|
101
|
-
static pureObjectAssign(...values: any[]): any | null;
|
|
102
|
-
static getTimezones(): Record<string, {
|
|
103
|
-
utc: number;
|
|
104
|
-
dst: number;
|
|
105
|
-
code: string;
|
|
106
|
-
}>;
|
|
107
|
-
}
|
|
108
|
-
declare global {
|
|
109
|
-
interface Date {
|
|
110
|
-
updateTime(time: Date): void;
|
|
111
|
-
updateDate(date: Date): void;
|
|
112
|
-
isDstObserved(): boolean;
|
|
113
|
-
stdTimezoneOffset(): number;
|
|
114
|
-
toTimezone(timezone: string): Date;
|
|
115
|
-
getTimezones(): Record<string, {
|
|
116
|
-
u: number;
|
|
117
|
-
d: number;
|
|
118
|
-
c: string;
|
|
119
|
-
}>;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
export declare const removeFromCollection: <T>(array: T[], predicate: (item: T, index: number) => boolean) => boolean;
|
|
123
|
-
type ObserverCallback<T> = (data: T) => unknown;
|
|
124
|
-
export declare class Observer<T extends any = any, CallbackType extends Function = ObserverCallback<T>> {
|
|
125
|
-
protected subscribers: CallbackType[];
|
|
126
|
-
subscribe(callback: CallbackType): () => void;
|
|
127
|
-
notify(data: T): void;
|
|
128
|
-
}
|
|
129
|
-
export {};
|
package/lib/esm/Map/App.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MapsProps } from './components/Maps';
|
|
3
|
-
import 'leaflet/dist/leaflet.css';
|
|
4
|
-
import 'leaflet-draw/dist/leaflet.draw.css';
|
|
5
|
-
import { Point } from './models';
|
|
6
|
-
declare const App: React.FC<AppProps>;
|
|
7
|
-
export type AppProps = MapsProps & {
|
|
8
|
-
onClose: (() => void);
|
|
9
|
-
onSave: ((points: Point[]) => void);
|
|
10
|
-
customButtons?: {
|
|
11
|
-
cancelButton?: HTMLElement;
|
|
12
|
-
saveButton?: HTMLElement;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export default App;
|
package/lib/esm/Map/Map.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { MapsProps } from './components/Maps';
|
|
3
|
-
import 'leaflet/dist/leaflet.css';
|
|
4
|
-
import 'leaflet-draw/dist/leaflet.draw.css';
|
|
5
|
-
import { Location } from './models';
|
|
6
|
-
declare const Map: React.FC<AppProps>;
|
|
7
|
-
export type AppProps = MapsProps & {
|
|
8
|
-
onClose?: (() => void);
|
|
9
|
-
onSave?: ((locations: Location[]) => void);
|
|
10
|
-
onChange?: ((locations: Location[]) => void);
|
|
11
|
-
customButtons?: {
|
|
12
|
-
cancelButton?: HTMLElement;
|
|
13
|
-
saveButton?: HTMLElement;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export default Map;
|