cortex-react-ui 0.2.26 → 0.2.28
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/BarLoader/BarLoader.d.ts +9 -9
- package/lib/cjs/BarLoader/index.d.ts +1 -1
- package/lib/cjs/Button/Button.d.ts +11 -11
- package/lib/cjs/Button/index.d.ts +1 -1
- package/lib/cjs/Camera/Camera.d.ts +21 -21
- package/lib/cjs/Camera/FileStorageDb.d.ts +9 -9
- package/lib/cjs/Camera/index.d.ts +1 -1
- package/lib/cjs/Camera/useTimer.d.ts +6 -6
- package/lib/cjs/DatePicker/DatePicker.d.ts +7 -7
- package/lib/cjs/DatePicker/index.d.ts +1 -1
- package/lib/cjs/Dialog/ConfirmDialog.d.ts +11 -11
- package/lib/cjs/Dialog/Dialog.d.ts +12 -12
- package/lib/cjs/Dialog/DialogActions.d.ts +7 -7
- package/lib/cjs/Dialog/DialogContent.d.ts +7 -7
- package/lib/cjs/Dialog/DialogFooter.d.ts +7 -7
- package/lib/cjs/Dialog/DialogHeader.d.ts +7 -7
- package/lib/cjs/Dialog/DialogTitle.d.ts +9 -9
- package/lib/cjs/Dialog/ErrorDialog.d.ts +10 -10
- package/lib/cjs/Dialog/WarningDialog.d.ts +10 -10
- package/lib/cjs/Dialog/index.d.ts +9 -9
- package/lib/cjs/DomContainer/DomContainer.d.ts +7 -7
- package/lib/cjs/DomContainer/index.d.ts +1 -1
- package/lib/cjs/Icons/ChevronDownIcon.d.ts +6 -6
- package/lib/cjs/Icons/ChevronLeftIcon.d.ts +6 -6
- package/lib/cjs/Icons/ChevronRightIcon.d.ts +6 -6
- package/lib/cjs/Icons/CrossIcon.d.ts +6 -6
- package/lib/cjs/Icons/index.d.ts +4 -4
- package/lib/cjs/Input/Input.d.ts +7 -7
- package/lib/cjs/Input/index.d.ts +1 -1
- package/lib/cjs/Map/Map.d.ts +16 -16
- package/lib/cjs/Map/components/CenterActiveAreaControl.d.ts +5 -5
- package/lib/cjs/Map/components/DrawTools.d.ts +18 -19
- package/lib/cjs/Map/components/LocationContext.d.ts +7 -6
- package/lib/cjs/Map/components/MapFullscreenControl.d.ts +22 -23
- package/lib/cjs/Map/components/Maps.d.ts +22 -23
- package/lib/cjs/Map/config/appConfig.d.ts +4 -4
- package/lib/cjs/Map/config/config.d.ts +6 -6
- package/lib/cjs/Map/hooks/getGeoJSONTest.d.ts +16 -16
- package/lib/cjs/Map/hooks/useLocationContext.d.ts +1 -1
- package/lib/cjs/Map/index.d.ts +1 -1
- package/lib/cjs/Map/models/index.d.ts +2 -2
- package/lib/cjs/Map/models/location.d.ts +6 -6
- package/lib/cjs/Map/models/locationSearch.d.ts +4 -4
- package/lib/cjs/Map/models/point.d.ts +6 -6
- package/lib/cjs/Map/utils/logger.d.ts +17 -17
- package/lib/cjs/Map/utils/toolkit.d.ts +129 -129
- package/lib/cjs/Menu/AuthDownloadLink.d.ts +14 -14
- package/lib/cjs/Menu/ContextMenu.d.ts +13 -13
- package/lib/cjs/Menu/Divider.d.ts +6 -6
- package/lib/cjs/Menu/Menu.d.ts +10 -10
- package/lib/cjs/Menu/MenuGroup.d.ts +8 -8
- package/lib/cjs/Menu/MenuItem.d.ts +14 -14
- package/lib/cjs/Menu/PopupMenu.d.ts +16 -16
- package/lib/cjs/Menu/index.d.ts +7 -7
- package/lib/cjs/Popper/Popper.d.ts +38 -38
- package/lib/cjs/Popper/index.d.ts +1 -1
- package/lib/cjs/Scanner/Dialog.d.ts +8 -9
- package/lib/cjs/Scanner/DialogBody.d.ts +3 -3
- package/lib/cjs/Scanner/DialogMask.d.ts +3 -3
- package/lib/cjs/Scanner/ScanConfirmationDialog.d.ts +19 -19
- package/lib/cjs/Scanner/Scanner.d.ts +12 -12
- package/lib/cjs/Scanner/index.d.ts +1 -1
- package/lib/cjs/Select/Select.d.ts +6 -6
- package/lib/cjs/Select/index.d.ts +1 -1
- package/lib/cjs/Selected/Selected.d.ts +8 -8
- package/lib/cjs/Selected/index.d.ts +1 -1
- package/lib/cjs/Spinner/Spinner.d.ts +7 -7
- package/lib/cjs/Spinner/index.d.ts +1 -1
- package/lib/cjs/TagInput/TagInput.d.ts +12 -12
- package/lib/cjs/TagInput/TagItem.d.ts +9 -9
- package/lib/cjs/TagInput/TagSearchInput.d.ts +9 -9
- package/lib/cjs/TagInput/TagSuggestion.d.ts +13 -13
- package/lib/cjs/TagInput/TagSuggestionGroup.d.ts +8 -8
- package/lib/cjs/TagInput/TagSuggestionItem.d.ts +8 -8
- package/lib/cjs/TagInput/index.d.ts +1 -1
- package/lib/cjs/TagInput/types.d.ts +14 -14
- package/lib/cjs/TextField/TextField.d.ts +6 -6
- package/lib/cjs/TextField/TextFieldInput.d.ts +10 -10
- package/lib/cjs/TextField/index.d.ts +1 -1
- package/lib/cjs/ToggleButton/ToggleButton.d.ts +11 -11
- package/lib/cjs/ToggleButton/index.d.ts +1 -1
- package/lib/cjs/Tooltip/Tooltip.d.ts +12 -12
- package/lib/cjs/Tooltip/index.d.ts +1 -1
- package/lib/cjs/Transition/CSSTransition.d.ts +17 -17
- package/lib/cjs/Transition/Fade.d.ts +13 -13
- package/lib/cjs/index.d.ts +23 -23
- package/lib/cjs/index.js +30 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/utils/classNames.d.ts +1 -1
- package/lib/cjs/utils/forwardRef.d.ts +7 -35
- package/lib/cjs/utils/setRef.d.ts +2 -9
- package/lib/cjs/utils/useClickOutside.d.ts +2 -2
- package/lib/cjs/utils/useElement.d.ts +2 -2
- package/lib/cjs/utils/useForkRef.d.ts +10 -10
- package/lib/esm/BarLoader/BarLoader.d.ts +9 -9
- package/lib/esm/BarLoader/index.d.ts +1 -1
- package/lib/esm/Button/Button.d.ts +11 -11
- package/lib/esm/Button/index.d.ts +1 -1
- package/lib/esm/Camera/Camera.d.ts +21 -21
- package/lib/esm/Camera/FileStorageDb.d.ts +9 -9
- package/lib/esm/Camera/index.d.ts +1 -1
- package/lib/esm/Camera/useTimer.d.ts +6 -6
- package/lib/esm/DatePicker/DatePicker.d.ts +7 -7
- package/lib/esm/DatePicker/index.d.ts +1 -1
- package/lib/esm/Dialog/ConfirmDialog.d.ts +11 -11
- package/lib/esm/Dialog/Dialog.d.ts +12 -12
- package/lib/esm/Dialog/DialogActions.d.ts +7 -7
- package/lib/esm/Dialog/DialogContent.d.ts +7 -7
- package/lib/esm/Dialog/DialogFooter.d.ts +7 -7
- package/lib/esm/Dialog/DialogHeader.d.ts +7 -7
- package/lib/esm/Dialog/DialogTitle.d.ts +9 -9
- package/lib/esm/Dialog/ErrorDialog.d.ts +10 -10
- package/lib/esm/Dialog/WarningDialog.d.ts +10 -10
- package/lib/esm/Dialog/index.d.ts +9 -9
- package/lib/esm/DomContainer/DomContainer.d.ts +7 -7
- package/lib/esm/DomContainer/index.d.ts +1 -1
- package/lib/esm/Icons/ChevronDownIcon.d.ts +6 -6
- package/lib/esm/Icons/ChevronLeftIcon.d.ts +6 -6
- package/lib/esm/Icons/ChevronRightIcon.d.ts +6 -6
- package/lib/esm/Icons/CrossIcon.d.ts +6 -6
- package/lib/esm/Icons/index.d.ts +4 -4
- package/lib/esm/Input/Input.d.ts +7 -7
- package/lib/esm/Input/index.d.ts +1 -1
- package/lib/esm/Map/Map.d.ts +16 -16
- package/lib/esm/Map/components/CenterActiveAreaControl.d.ts +5 -5
- package/lib/esm/Map/components/DrawTools.d.ts +18 -19
- package/lib/esm/Map/components/LocationContext.d.ts +7 -6
- package/lib/esm/Map/components/MapFullscreenControl.d.ts +22 -23
- package/lib/esm/Map/components/Maps.d.ts +22 -23
- package/lib/esm/Map/config/appConfig.d.ts +4 -4
- package/lib/esm/Map/config/config.d.ts +6 -6
- package/lib/esm/Map/hooks/getGeoJSONTest.d.ts +16 -16
- package/lib/esm/Map/hooks/useLocationContext.d.ts +1 -1
- package/lib/esm/Map/index.d.ts +1 -1
- package/lib/esm/Map/models/index.d.ts +2 -2
- package/lib/esm/Map/models/location.d.ts +6 -6
- package/lib/esm/Map/models/locationSearch.d.ts +4 -4
- package/lib/esm/Map/models/point.d.ts +6 -6
- package/lib/esm/Map/utils/logger.d.ts +17 -17
- package/lib/esm/Map/utils/toolkit.d.ts +129 -129
- package/lib/esm/Menu/AuthDownloadLink.d.ts +14 -14
- package/lib/esm/Menu/ContextMenu.d.ts +13 -13
- package/lib/esm/Menu/Divider.d.ts +6 -6
- package/lib/esm/Menu/Menu.d.ts +10 -10
- package/lib/esm/Menu/MenuGroup.d.ts +8 -8
- package/lib/esm/Menu/MenuItem.d.ts +14 -14
- package/lib/esm/Menu/PopupMenu.d.ts +16 -16
- package/lib/esm/Menu/index.d.ts +7 -7
- package/lib/esm/Popper/Popper.d.ts +38 -38
- package/lib/esm/Popper/index.d.ts +1 -1
- package/lib/esm/Scanner/Dialog.d.ts +8 -9
- package/lib/esm/Scanner/DialogBody.d.ts +3 -3
- package/lib/esm/Scanner/DialogMask.d.ts +3 -3
- package/lib/esm/Scanner/ScanConfirmationDialog.d.ts +19 -19
- package/lib/esm/Scanner/Scanner.d.ts +12 -12
- package/lib/esm/Scanner/index.d.ts +1 -1
- package/lib/esm/Select/Select.d.ts +6 -6
- package/lib/esm/Select/index.d.ts +1 -1
- package/lib/esm/Selected/Selected.d.ts +8 -8
- package/lib/esm/Selected/index.d.ts +1 -1
- package/lib/esm/Spinner/Spinner.d.ts +7 -7
- package/lib/esm/Spinner/index.d.ts +1 -1
- package/lib/esm/TagInput/TagInput.d.ts +12 -12
- package/lib/esm/TagInput/TagItem.d.ts +9 -9
- package/lib/esm/TagInput/TagSearchInput.d.ts +9 -9
- package/lib/esm/TagInput/TagSuggestion.d.ts +13 -13
- package/lib/esm/TagInput/TagSuggestionGroup.d.ts +8 -8
- package/lib/esm/TagInput/TagSuggestionItem.d.ts +8 -8
- package/lib/esm/TagInput/index.d.ts +1 -1
- package/lib/esm/TagInput/types.d.ts +14 -14
- package/lib/esm/TextField/TextField.d.ts +6 -6
- package/lib/esm/TextField/TextFieldInput.d.ts +10 -10
- package/lib/esm/TextField/index.d.ts +1 -1
- package/lib/esm/ToggleButton/ToggleButton.d.ts +11 -11
- package/lib/esm/ToggleButton/index.d.ts +1 -1
- package/lib/esm/Tooltip/Tooltip.d.ts +12 -12
- package/lib/esm/Tooltip/index.d.ts +1 -1
- package/lib/esm/Transition/CSSTransition.d.ts +17 -17
- package/lib/esm/Transition/Fade.d.ts +13 -13
- package/lib/esm/index.d.ts +23 -23
- package/lib/esm/index.js +30 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/utils/classNames.d.ts +1 -1
- package/lib/esm/utils/forwardRef.d.ts +7 -35
- package/lib/esm/utils/setRef.d.ts +2 -9
- package/lib/esm/utils/useClickOutside.d.ts +2 -2
- package/lib/esm/utils/useElement.d.ts +2 -2
- package/lib/esm/utils/useForkRef.d.ts +10 -10
- package/lib/index.d.ts +333 -361
- package/package.json +60 -61
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export default Maps;
|
|
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,4 +1,4 @@
|
|
|
1
|
-
export default class AppConfig {
|
|
2
|
-
prod: boolean;
|
|
3
|
-
apiUrl: string;
|
|
4
|
-
}
|
|
1
|
+
export default class AppConfig {
|
|
2
|
+
prod: boolean;
|
|
3
|
+
apiUrl: string;
|
|
4
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import AppConfig from './appConfig';
|
|
2
|
-
declare class Config extends AppConfig {
|
|
3
|
-
constructor();
|
|
4
|
-
}
|
|
5
|
-
declare const _default: Config;
|
|
6
|
-
export default _default;
|
|
1
|
+
import AppConfig from './appConfig';
|
|
2
|
+
declare class Config extends AppConfig {
|
|
3
|
+
constructor();
|
|
4
|
+
}
|
|
5
|
+
declare const _default: Config;
|
|
6
|
+
export default _default;
|
|
@@ -1,16 +1,16 @@
|
|
|
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
|
+
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 +1 @@
|
|
|
1
|
-
export declare const useLocationContext: () => import("../components/LocationContext").LocationContent;
|
|
1
|
+
export declare const useLocationContext: () => import("../components/LocationContext").LocationContent;
|
package/lib/cjs/Map/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default } from './Map';
|
|
1
|
+
export { default } from './Map';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Location } from './location';
|
|
2
|
-
export { default as Point } from './point';
|
|
1
|
+
export { default as Location } from './location';
|
|
2
|
+
export { default as Point } from './point';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Point from "./point";
|
|
2
|
-
export default class Location {
|
|
3
|
-
id: number;
|
|
4
|
-
objId: string;
|
|
5
|
-
points: Point[];
|
|
6
|
-
}
|
|
1
|
+
import Point from "./point";
|
|
2
|
+
export default class Location {
|
|
3
|
+
id: number;
|
|
4
|
+
objId: string;
|
|
5
|
+
points: Point[];
|
|
6
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export default class LocationSearch {
|
|
2
|
-
objId: string[];
|
|
3
|
-
type: string;
|
|
4
|
-
}
|
|
1
|
+
export default class LocationSearch {
|
|
2
|
+
objId: string[];
|
|
3
|
+
type: string;
|
|
4
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export default class Point {
|
|
2
|
-
id: number;
|
|
3
|
-
order: number;
|
|
4
|
-
latitude: number;
|
|
5
|
-
longitude: number;
|
|
6
|
-
}
|
|
1
|
+
export default class Point {
|
|
2
|
+
id: number;
|
|
3
|
+
order: number;
|
|
4
|
+
latitude: number;
|
|
5
|
+
longitude: number;
|
|
6
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
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
|
+
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 +1,129 @@
|
|
|
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 {};
|
|
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 {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface AuthDownloadLinkProps {
|
|
3
|
-
url: string;
|
|
4
|
-
queryParams?: {
|
|
5
|
-
[key: string]: string | number | boolean;
|
|
6
|
-
};
|
|
7
|
-
token: string;
|
|
8
|
-
label?: string;
|
|
9
|
-
onStart?: (event: React.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
10
|
-
onCompleted?: () => void;
|
|
11
|
-
onError?: (error: Error) => void;
|
|
12
|
-
}
|
|
13
|
-
declare const AuthDownloadLink: React.FC<AuthDownloadLinkProps>;
|
|
14
|
-
export default AuthDownloadLink;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AuthDownloadLinkProps {
|
|
3
|
+
url: string;
|
|
4
|
+
queryParams?: {
|
|
5
|
+
[key: string]: string | number | boolean;
|
|
6
|
+
};
|
|
7
|
+
token: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
onStart?: (event: React.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
10
|
+
onCompleted?: () => void;
|
|
11
|
+
onError?: (error: Error) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const AuthDownloadLink: React.FC<AuthDownloadLinkProps>;
|
|
14
|
+
export default AuthDownloadLink;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PopperPlacement } from '../Popper/Popper';
|
|
3
|
-
export interface ContextMenuProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
open?: boolean;
|
|
7
|
-
placement?: ObjectValues<typeof PopperPlacement>;
|
|
8
|
-
container?: string | HTMLElement | React.RefObject<HTMLElement>;
|
|
9
|
-
onOpen?: () => void;
|
|
10
|
-
onClose?: () => void;
|
|
11
|
-
}
|
|
12
|
-
declare const ContextMenu: React.FC<ContextMenuProps>;
|
|
13
|
-
export default ContextMenu;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopperPlacement } from '../Popper/Popper';
|
|
3
|
+
export interface ContextMenuProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
placement?: ObjectValues<typeof PopperPlacement>;
|
|
8
|
+
container?: string | HTMLElement | React.RefObject<HTMLElement>;
|
|
9
|
+
onOpen?: () => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const ContextMenu: React.FC<ContextMenuProps>;
|
|
13
|
+
export default ContextMenu;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface DividerProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
}
|
|
5
|
-
declare const Divider: React.FC<DividerProps>;
|
|
6
|
-
export default Divider;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DividerProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const Divider: React.FC<DividerProps>;
|
|
6
|
+
export default Divider;
|
package/lib/cjs/Menu/Menu.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface MenuProps {
|
|
3
|
-
containerRef: React.RefObject<HTMLElement>;
|
|
4
|
-
className?: string;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
onClose?: () => void;
|
|
7
|
-
onClick?: (event: React.MouseEvent<HTMLUListElement> | undefined) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const Menu: React.FC<MenuProps>;
|
|
10
|
-
export default Menu;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MenuProps {
|
|
3
|
+
containerRef: React.RefObject<HTMLElement>;
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
onClose?: () => void;
|
|
7
|
+
onClick?: (event: React.MouseEvent<HTMLUListElement> | undefined) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const Menu: React.FC<MenuProps>;
|
|
10
|
+
export default Menu;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface MenuGroupProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
declare const MenuGroup: React.FC<MenuGroupProps>;
|
|
8
|
-
export default MenuGroup;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MenuGroupProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const MenuGroup: React.FC<MenuGroupProps>;
|
|
8
|
+
export default MenuGroup;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
export interface MenuItemProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
style?: CSSProperties | undefined;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
label?: string;
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
active?: boolean;
|
|
9
|
-
disable?: boolean;
|
|
10
|
-
itemTemplate?: React.ReactNode;
|
|
11
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
12
|
-
}
|
|
13
|
-
declare const MenuItem: React.FC<MenuItemProps>;
|
|
14
|
-
export default MenuItem;
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export interface MenuItemProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: CSSProperties | undefined;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
label?: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
disable?: boolean;
|
|
10
|
+
itemTemplate?: React.ReactNode;
|
|
11
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement> | undefined) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const MenuItem: React.FC<MenuItemProps>;
|
|
14
|
+
export default MenuItem;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PopperPlacement } from '../Popper/Popper';
|
|
3
|
-
export interface PopupMenuProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
open?: boolean;
|
|
7
|
-
placement?: ObjectValues<typeof PopperPlacement>;
|
|
8
|
-
anchorPosition?: {
|
|
9
|
-
top: number;
|
|
10
|
-
left: number;
|
|
11
|
-
};
|
|
12
|
-
anchorEl?: string | HTMLElement | React.RefObject<HTMLElement>;
|
|
13
|
-
onClose?: () => void;
|
|
14
|
-
}
|
|
15
|
-
declare const PopupMenu: React.FC<PopupMenuProps>;
|
|
16
|
-
export default PopupMenu;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PopperPlacement } from '../Popper/Popper';
|
|
3
|
+
export interface PopupMenuProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
placement?: ObjectValues<typeof PopperPlacement>;
|
|
8
|
+
anchorPosition?: {
|
|
9
|
+
top: number;
|
|
10
|
+
left: number;
|
|
11
|
+
};
|
|
12
|
+
anchorEl?: string | HTMLElement | React.RefObject<HTMLElement>;
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const PopupMenu: React.FC<PopupMenuProps>;
|
|
16
|
+
export default PopupMenu;
|
package/lib/cjs/Menu/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as Menu } from './Menu';
|
|
2
|
-
export { default as AuthDownloadLink } from './AuthDownloadLink';
|
|
3
|
-
export { default as ContextMenu } from './ContextMenu';
|
|
4
|
-
export { default as MenuItem } from './MenuItem';
|
|
5
|
-
export { default as Divider } from './Divider';
|
|
6
|
-
export { default as PopupMenu } from './PopupMenu';
|
|
7
|
-
export { default as MenuGroup } from './MenuGroup';
|
|
1
|
+
export { default as Menu } from './Menu';
|
|
2
|
+
export { default as AuthDownloadLink } from './AuthDownloadLink';
|
|
3
|
+
export { default as ContextMenu } from './ContextMenu';
|
|
4
|
+
export { default as MenuItem } from './MenuItem';
|
|
5
|
+
export { default as Divider } from './Divider';
|
|
6
|
+
export { default as PopupMenu } from './PopupMenu';
|
|
7
|
+
export { default as MenuGroup } from './MenuGroup';
|