@dexteel/mesf-core 2.1.8
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/CHANGELOG.md +5 -0
- package/dist/MESFMain.d.ts +4 -0
- package/dist/account/AuthProvider.d.ts +19 -0
- package/dist/account/account.d.ts +2 -0
- package/dist/account/changePassword.d.ts +2 -0
- package/dist/account/index.d.ts +6 -0
- package/dist/account/login-strategies/LoginAsGuest.d.ts +2 -0
- package/dist/account/login-strategies/LoginWithEmailAndPassword.d.ts +2 -0
- package/dist/account/login-strategies/azure-ad/AzureADAuthConfig.d.ts +37 -0
- package/dist/account/login-strategies/azure-ad/LoginWithAzureAD.d.ts +5 -0
- package/dist/account/login-strategies/azure-ad/LoginWithAzureADForm.d.ts +2 -0
- package/dist/account/login.d.ts +9 -0
- package/dist/account/logout.d.ts +8 -0
- package/dist/account/models/login.models.d.ts +15 -0
- package/dist/account/useToken.d.ts +10 -0
- package/dist/components/home/home.d.ts +3 -0
- package/dist/components/navigation/Header.d.ts +2 -0
- package/dist/components/navigation/MainContainer.d.ts +3 -0
- package/dist/components/navigation/Navigation.d.ts +3 -0
- package/dist/configuration/JobConfig.d.ts +2 -0
- package/dist/configuration/LogConfig.d.ts +2 -0
- package/dist/configuration/configuration.d.ts +6 -0
- package/dist/configuration/formatters.d.ts +7 -0
- package/dist/configuration/index.d.ts +8 -0
- package/dist/configuration/profileManager.d.ts +2 -0
- package/dist/configuration/shiftCrew.d.ts +2 -0
- package/dist/configuration/stylesGetters.d.ts +14 -0
- package/dist/configuration/usersManagment.d.ts +2 -0
- package/dist/configurationMenu.d.ts +17 -0
- package/dist/controls/charts/genericChart.d.ts +10 -0
- package/dist/controls/filters/dialogFilter.d.ts +12 -0
- package/dist/controls/filters/filters.d.ts +71 -0
- package/dist/controls/index.d.ts +6 -0
- package/dist/controls/panels.d.ts +62 -0
- package/dist/controls/tables/GenericTable.d.ts +5 -0
- package/dist/controls/tables/dataGrid.d.ts +10 -0
- package/dist/globalContext.d.ts +6 -0
- package/dist/index.cjs.js +3268 -0
- package/dist/index.d.ts +6 -0
- package/dist/routes/MESFMainRouter.d.ts +3 -0
- package/dist/services/ApiService.d.ts +36 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/utils.d.ts +21 -0
- package/package.json +96 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const AuthContext: React.Context<any>;
|
|
3
|
+
export declare type AuthConfig = {
|
|
4
|
+
guestIsEnabled: boolean;
|
|
5
|
+
useEmailAndPassword: boolean;
|
|
6
|
+
useAzureAD: boolean;
|
|
7
|
+
AzureConfig: AzureConfig;
|
|
8
|
+
};
|
|
9
|
+
export declare type AzureConfig = {
|
|
10
|
+
clientId: string;
|
|
11
|
+
authority: string;
|
|
12
|
+
redirectUri: string;
|
|
13
|
+
};
|
|
14
|
+
declare type AuthProviderProps = {
|
|
15
|
+
children: any;
|
|
16
|
+
authConfig: AuthConfig;
|
|
17
|
+
};
|
|
18
|
+
export declare const AuthProvider: ({ children, authConfig }: AuthProviderProps) => JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration object to be passed to MSAL instance on creation.
|
|
3
|
+
* For a full list of MSAL.js configuration parameters, visit:
|
|
4
|
+
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/configuration.md
|
|
5
|
+
*/
|
|
6
|
+
export declare const msalConfig: {
|
|
7
|
+
auth: {
|
|
8
|
+
clientId: string;
|
|
9
|
+
authority: string;
|
|
10
|
+
redirectUri: string;
|
|
11
|
+
};
|
|
12
|
+
cache: {
|
|
13
|
+
cacheLocation: string;
|
|
14
|
+
storeAuthStateInCookie: boolean;
|
|
15
|
+
};
|
|
16
|
+
system: {
|
|
17
|
+
loggerOptions: {
|
|
18
|
+
loggerCallback: (level: number, message: string, containsPii: boolean) => void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Scopes you add here will be prompted for user consent during sign-in.
|
|
24
|
+
* By default, MSAL.js will add OIDC scopes (openid, profile, email) to any login request.
|
|
25
|
+
* For more information about OIDC scopes, visit:
|
|
26
|
+
* https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes
|
|
27
|
+
*/
|
|
28
|
+
export declare const loginRequest: {
|
|
29
|
+
scopes: string[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Add here the scopes to request when obtaining an access token for MS Graph API. For more information, see:
|
|
33
|
+
* https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/resources-and-scopes.md
|
|
34
|
+
*/
|
|
35
|
+
export declare const graphConfig: {
|
|
36
|
+
graphMeEndpoint: string;
|
|
37
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { LoginParams } from "./models/login.models";
|
|
4
|
+
export declare function Login({ authConfig }: LoginParams): JSX.Element;
|
|
5
|
+
export declare namespace Login {
|
|
6
|
+
var propTypes: {
|
|
7
|
+
setToken: PropTypes.Requireable<(...args: any[]) => any>;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AuthConfig } from "../AuthProvider";
|
|
2
|
+
export declare type LoginParams = {
|
|
3
|
+
setToken?: Function;
|
|
4
|
+
authConfig: AuthConfig;
|
|
5
|
+
};
|
|
6
|
+
declare type Permission = string;
|
|
7
|
+
export declare type UserMESData = {
|
|
8
|
+
id: number;
|
|
9
|
+
firstName: string;
|
|
10
|
+
lastName: string;
|
|
11
|
+
username: string;
|
|
12
|
+
token: string;
|
|
13
|
+
permissions: Permission[];
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function useToken(): {
|
|
2
|
+
getUserName: () => string;
|
|
3
|
+
setToken: (userToken: any) => void;
|
|
4
|
+
clearToken: () => void;
|
|
5
|
+
getFirstName: () => any;
|
|
6
|
+
getLastName: () => any;
|
|
7
|
+
getUserId: () => any;
|
|
8
|
+
hasPermission: (permissionId: number) => boolean;
|
|
9
|
+
token: any;
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const CurrencyFormatter: Intl.NumberFormat;
|
|
2
|
+
declare const NumberFormatter: Intl.NumberFormat;
|
|
3
|
+
declare const IntegerFormatter: Intl.NumberFormat;
|
|
4
|
+
declare const DateTimeFormatter: Intl.DateTimeFormat;
|
|
5
|
+
declare const DateFormatter: Intl.DateTimeFormat;
|
|
6
|
+
declare const TimeFormatter: Intl.DateTimeFormat;
|
|
7
|
+
export { CurrencyFormatter, NumberFormatter, IntegerFormatter, DateTimeFormatter, DateFormatter, TimeFormatter };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const getShiftStyle: (shift: string) => {
|
|
3
|
+
color: string;
|
|
4
|
+
} | {
|
|
5
|
+
color?: undefined;
|
|
6
|
+
};
|
|
7
|
+
declare const getCrewStyle: (crew: string) => {
|
|
8
|
+
color: string;
|
|
9
|
+
} | {
|
|
10
|
+
color?: undefined;
|
|
11
|
+
};
|
|
12
|
+
declare const GetShiftColor: (props: any) => JSX.Element;
|
|
13
|
+
declare const GetCrewColor: (props: any) => JSX.Element;
|
|
14
|
+
export { getShiftStyle, getCrewStyle, GetShiftColor, GetCrewColor };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type SectionComponent = {
|
|
3
|
+
path: string;
|
|
4
|
+
sidebar: React.FunctionComponent;
|
|
5
|
+
main: React.FunctionComponent;
|
|
6
|
+
exact?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export interface SidebarType extends React.FunctionComponent<{
|
|
9
|
+
option?: string;
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
export declare type ConfigurationsType = [
|
|
13
|
+
SectionComponent[],
|
|
14
|
+
SidebarType
|
|
15
|
+
];
|
|
16
|
+
export default function Configuration(): JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare const BarChartControl: {
|
|
4
|
+
(props: any): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
data: PropTypes.Requireable<any[]>;
|
|
7
|
+
keys: PropTypes.Requireable<any[]>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export { BarChartControl };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare const ModalTreeFilterControl: {
|
|
4
|
+
(props: any): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
onClose: PropTypes.Validator<(...args: any[]) => any>;
|
|
7
|
+
open: PropTypes.Validator<boolean>;
|
|
8
|
+
title: PropTypes.Validator<string>;
|
|
9
|
+
data: PropTypes.Validator<object>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export { ModalTreeFilterControl };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Component } from "react";
|
|
2
|
+
declare type TreePickerControlProps = {
|
|
3
|
+
onSelect: (value: string, description: string, findNode: any) => void;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
};
|
|
6
|
+
export declare const TreePickerControl: (props: TreePickerControlProps) => JSX.Element;
|
|
7
|
+
interface DateControlProps {
|
|
8
|
+
value?: any;
|
|
9
|
+
onChange?: any;
|
|
10
|
+
title?: string;
|
|
11
|
+
styleGeneral?: any;
|
|
12
|
+
styleLabel?: any;
|
|
13
|
+
}
|
|
14
|
+
export declare function DateControl({ value, onChange, title, styleGeneral, styleLabel }: DateControlProps): JSX.Element;
|
|
15
|
+
export declare const DateTimeControl: (props: any) => JSX.Element;
|
|
16
|
+
export declare const SimpleTimeControl: (props: any) => JSX.Element;
|
|
17
|
+
interface SimpleInputSearchControlProps {
|
|
18
|
+
title?: string;
|
|
19
|
+
onChange?: any;
|
|
20
|
+
styleLabel?: any;
|
|
21
|
+
isNumeric?: boolean;
|
|
22
|
+
readOnly?: boolean;
|
|
23
|
+
value?: any;
|
|
24
|
+
name?: any;
|
|
25
|
+
styleTextBox?: any;
|
|
26
|
+
onKeyDown?: any;
|
|
27
|
+
lengthCharacters?: any;
|
|
28
|
+
}
|
|
29
|
+
export declare function SimpleInputSearchControl({ title, styleLabel, isNumeric, readOnly, value, onChange, name, styleTextBox, onKeyDown, lengthCharacters }: SimpleInputSearchControlProps): JSX.Element;
|
|
30
|
+
export declare class TimeControl extends Component<any> {
|
|
31
|
+
render(): JSX.Element;
|
|
32
|
+
}
|
|
33
|
+
export declare class SimpleTextControl extends Component<any> {
|
|
34
|
+
render(): JSX.Element;
|
|
35
|
+
}
|
|
36
|
+
export declare class SimplePasswordControl extends Component<any> {
|
|
37
|
+
render(): JSX.Element;
|
|
38
|
+
}
|
|
39
|
+
export declare const formatNumber: (value: number) => string;
|
|
40
|
+
export declare type NumericTextControlProps = {
|
|
41
|
+
value: any;
|
|
42
|
+
title: any;
|
|
43
|
+
styleLabel: any;
|
|
44
|
+
readOnly: any;
|
|
45
|
+
styleTextBox: any;
|
|
46
|
+
onChange: any;
|
|
47
|
+
name: any;
|
|
48
|
+
typeNumber: any;
|
|
49
|
+
};
|
|
50
|
+
export declare const NumericTextControl: (props: NumericTextControlProps) => JSX.Element;
|
|
51
|
+
export declare class HorizontalTextControl extends Component<any> {
|
|
52
|
+
render(): JSX.Element;
|
|
53
|
+
}
|
|
54
|
+
export declare class SimpleTextAreaControl extends Component<any> {
|
|
55
|
+
render(): JSX.Element;
|
|
56
|
+
}
|
|
57
|
+
interface SimpleSelectorControlProps {
|
|
58
|
+
title?: string;
|
|
59
|
+
dataSource?: any;
|
|
60
|
+
selectedValue?: any;
|
|
61
|
+
onChange?: any;
|
|
62
|
+
showColor?: boolean;
|
|
63
|
+
styleLabel?: any;
|
|
64
|
+
styleList?: any;
|
|
65
|
+
hasChoose?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export declare function SimpleSelectorControl({ title, dataSource, selectedValue, onChange, showColor, styleLabel, styleList, hasChoose }: SimpleSelectorControlProps): JSX.Element;
|
|
68
|
+
export declare const MultipleSelectorControl: (props: any) => JSX.Element;
|
|
69
|
+
export declare const CheckBoxControl: (props: any) => JSX.Element;
|
|
70
|
+
export declare const UploadFileControl: (props: any) => JSX.Element;
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Component, MouseEventHandler } from "react";
|
|
2
|
+
declare type GenericPanelProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
showPromptSuccess?: boolean;
|
|
6
|
+
showPromptError?: boolean;
|
|
7
|
+
onDismissSuccess?: MouseEventHandler;
|
|
8
|
+
onDismissError?: MouseEventHandler;
|
|
9
|
+
successMessage?: string;
|
|
10
|
+
error?: any;
|
|
11
|
+
children: any;
|
|
12
|
+
};
|
|
13
|
+
/********************MATERIAL UI STYLES********************************** */
|
|
14
|
+
/************************************************************************* */
|
|
15
|
+
declare const GenericPanel: ({ title, description, showPromptSuccess, showPromptError, onDismissSuccess, onDismissError, successMessage, error, children, }: GenericPanelProps) => JSX.Element;
|
|
16
|
+
declare type MasterDetailPanelProps = {
|
|
17
|
+
title: string;
|
|
18
|
+
onSave: MouseEventHandler;
|
|
19
|
+
onCancel: MouseEventHandler;
|
|
20
|
+
onDelete: MouseEventHandler;
|
|
21
|
+
saveStatus: boolean;
|
|
22
|
+
deleteStatus: boolean;
|
|
23
|
+
showSave: boolean;
|
|
24
|
+
showDelete: boolean;
|
|
25
|
+
};
|
|
26
|
+
declare class MasterDetailPanel extends Component<MasterDetailPanelProps> {
|
|
27
|
+
useStyles(): (props?: any) => import("@material-ui/styles").ClassNameMap<"root">;
|
|
28
|
+
render(): JSX.Element;
|
|
29
|
+
}
|
|
30
|
+
declare type ExtraButton = {
|
|
31
|
+
name: string;
|
|
32
|
+
onClick: MouseEventHandler;
|
|
33
|
+
};
|
|
34
|
+
declare type FilterPanelProps = {
|
|
35
|
+
onClickExport?: Function;
|
|
36
|
+
onClickReset: Function;
|
|
37
|
+
OnClickGo: Function;
|
|
38
|
+
showButtons: boolean;
|
|
39
|
+
showExport: boolean;
|
|
40
|
+
extraButtons?: ExtraButton[];
|
|
41
|
+
};
|
|
42
|
+
declare class FilterPanel extends Component<FilterPanelProps> {
|
|
43
|
+
onClickGo: MouseEventHandler;
|
|
44
|
+
onClickReset: MouseEventHandler;
|
|
45
|
+
onClickExport: MouseEventHandler;
|
|
46
|
+
constructor(props: FilterPanelProps);
|
|
47
|
+
ExportData(): void;
|
|
48
|
+
ResetFilterValues(): void;
|
|
49
|
+
GetFilterValues(): void;
|
|
50
|
+
render(): JSX.Element;
|
|
51
|
+
}
|
|
52
|
+
declare class LongFilterPanel extends Component<FilterPanelProps> {
|
|
53
|
+
onClickGo: MouseEventHandler;
|
|
54
|
+
onClickReset: MouseEventHandler;
|
|
55
|
+
onClickExport: MouseEventHandler;
|
|
56
|
+
constructor(props: any);
|
|
57
|
+
ExportData(): void;
|
|
58
|
+
ResetFilterValues(): void;
|
|
59
|
+
GetFilterValues(): void;
|
|
60
|
+
render(): JSX.Element;
|
|
61
|
+
}
|
|
62
|
+
export { GenericPanel, FilterPanel, MasterDetailPanel, LongFilterPanel };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
declare const DataGridControl: {
|
|
4
|
+
(props: any): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
columns: PropTypes.Requireable<any[]>;
|
|
7
|
+
rows: PropTypes.Requireable<any[]>;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export { DataGridControl };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ConfigurationsType } from "./configurationMenu";
|
|
3
|
+
declare const RouterContext: React.Context<React.FunctionComponent<{}>>;
|
|
4
|
+
declare const ConfigurationContext: React.Context<ConfigurationsType>;
|
|
5
|
+
declare const NavbarContext: React.Context<React.FunctionComponent<{}>>;
|
|
6
|
+
export { RouterContext, ConfigurationContext, NavbarContext };
|