react-luminus-components 1.3.25 → 1.3.27
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/dist/.vite/manifest.json +89 -74
- package/dist/PrimaryButton-C3toFFlE.cjs +1 -0
- package/dist/{PrimaryButton-Bewa28m7.js → PrimaryButton-CToGCd5i.js} +31 -25
- package/dist/{SimpleTooltip-B7H1sJLN.js → SimpleTooltip-0rNY6uR5.js} +1 -1
- package/dist/{SimpleTooltip-Cssc2MLs.cjs → SimpleTooltip-E2QIyvNE.cjs} +1 -1
- package/dist/{UserAvatarToggle-C1CRXpP2.js → UserAvatarToggle-CIpmuTVE.js} +66 -62
- package/dist/{UserAvatarToggle-DYIBvTYX.cjs → UserAvatarToggle-J8ZQDJ2r.cjs} +2 -2
- package/dist/components/Layout/MessageBoard/MessageBoard.d.ts +14 -0
- package/dist/components/Layout/MessageBoard/components/MessageList/MessageList.d.ts +12 -0
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageFilters/MessageFilters.d.ts +7 -0
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/MessageItem/MessageItem.d.ts +11 -0
- package/dist/components/Layout/MessageBoard/components/MessageList/comps/index.d.ts +2 -0
- package/dist/components/Layout/MessageBoard/components/index.d.ts +1 -0
- package/dist/components/Layout/index.d.ts +1 -0
- package/dist/components/common/AlertItem/AlertItem.d.ts +9 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +17 -5
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +10 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.d.ts +248 -1
- package/dist/contexts.es.js +161 -152
- package/dist/dateUtils-C47nO5qP.js +13 -0
- package/dist/dateUtils-Dy3knMZB.cjs +1 -0
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.d.ts +162 -1
- package/dist/hooks.es.js +73 -2944
- package/dist/{latinize-BQrinury.js → latinize-B-UfS78J.js} +41 -34
- package/dist/{latinize-DaqzUOla.cjs → latinize-Dl6DAk4g.cjs} +1 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.d.ts +56 -1
- package/dist/layout.es.js +13 -12
- package/dist/main.cjs.js +28 -1
- package/dist/main.d.ts +2 -1
- package/dist/main.es.js +3298 -2021
- package/dist/models/index.d.ts +3 -0
- package/dist/models/luminus-context-types/CommonLuminusIcons.d.ts +2 -0
- package/dist/models/luminus-context-types/ILocalizationContext.d.ts +7 -0
- package/dist/models/texts/MessageBoardTexts.d.ts +4 -0
- package/dist/models/types/BaseMessageBoardModel.d.ts +8 -0
- package/dist/parseISO-DTRVS-Fr.cjs +1 -0
- package/dist/{dateUtils-C7tHbjab.js → parseISO-DxNDV6y0.js} +37 -46
- package/dist/{searchUtils-Do20vjZW.cjs → searchUtils-CYFu8LBz.cjs} +1 -1
- package/dist/searchUtils-Dxbvcicv.js +7 -0
- package/dist/style.css +1 -1
- package/dist/useLocalStorageState-KNanBZsO.cjs +1 -0
- package/dist/{useLocalStorageState-DblJQuM7.js → useLocalStorageState-MzPp9GNd.js} +11 -10
- package/dist/{usePermissions-avh3rydq.js → usePermissions-BZKgvDp_.js} +5 -4
- package/dist/usePermissions-DB7RkdYM.cjs +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.d.ts +38 -1
- package/dist/utils.es.js +10 -10
- package/package.json +2 -2
- package/dist/PrimaryButton-DXGul-f9.cjs +0 -1
- package/dist/dateUtils-b-AkAh2Y.cjs +0 -1
- package/dist/searchUtils-Du4JnXdQ.js +0 -7
- package/dist/useLocalStorageState-CxsNjf78.cjs +0 -1
- package/dist/usePermissions-BEKIk6u3.cjs +0 -1
package/dist/contexts.d.ts
CHANGED
|
@@ -1 +1,248 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
|
|
3
|
+
import { Context } from 'react';
|
|
4
|
+
import { CreateAxiosDefaults } from 'axios';
|
|
5
|
+
import { Dispatch } from 'react';
|
|
6
|
+
import { GenericAbortSignal } from 'axios';
|
|
7
|
+
import { IconBaseProps } from 'react-icons';
|
|
8
|
+
import { JSX as JSX_2 } from 'react';
|
|
9
|
+
import { LinkProps } from 'react-router-dom';
|
|
10
|
+
import { Locale } from 'date-fns';
|
|
11
|
+
import { NavigateProps } from 'react-router-dom';
|
|
12
|
+
import { PublicClientApplication } from '@azure/msal-browser';
|
|
13
|
+
import { ReactNode } from 'react';
|
|
14
|
+
import { SetStateAction } from 'react';
|
|
15
|
+
|
|
16
|
+
declare type AppSearchTexts = {
|
|
17
|
+
searchPlaceholder: string;
|
|
18
|
+
amountFrom: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export declare const AuthContext: Context<IAuthContext>;
|
|
22
|
+
|
|
23
|
+
export declare const AuthProvider: ({ ...props }: Props_4) => JSX_2.Element;
|
|
24
|
+
|
|
25
|
+
declare type AxiosTexts = {
|
|
26
|
+
validationError: string;
|
|
27
|
+
networkError: string;
|
|
28
|
+
unexpectedError: string;
|
|
29
|
+
forbiddenError: string;
|
|
30
|
+
permissionError: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare type BaseProps = {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
declare type CommonLuminusIcons = 'edit' | 'delete' | 'info' | 'warning' | 'check' | 'danger';
|
|
38
|
+
|
|
39
|
+
declare type ConfirmTexts = {
|
|
40
|
+
yes: string;
|
|
41
|
+
no: string;
|
|
42
|
+
cancel: string;
|
|
43
|
+
confirm: string;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
declare type CustomSelectTexts = {
|
|
47
|
+
searchPlaceholder: string;
|
|
48
|
+
clearSelection: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export declare const DelegationContext: Context<IDelegationContext>;
|
|
52
|
+
|
|
53
|
+
export declare const DelegationProvider: ({ children, relativeEndpoint }: Props_5) => JSX_2.Element;
|
|
54
|
+
|
|
55
|
+
declare interface EmployeeSmallModel {
|
|
56
|
+
id: number;
|
|
57
|
+
name: string | null;
|
|
58
|
+
kid: string | null;
|
|
59
|
+
driverTrainingDate: string | null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare type ErrorBoundaryTexts = {
|
|
63
|
+
reloadButtonContent: ReactNode;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
declare type FormSubmitTexts = {
|
|
67
|
+
storno: string;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
declare type FormValidationTexts = {
|
|
71
|
+
required: string;
|
|
72
|
+
invalidDate: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
declare type HomeDashboardTexts = {
|
|
76
|
+
dashboardEdit: string;
|
|
77
|
+
dashboardEditDone: string;
|
|
78
|
+
pickWidgetToAdd: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
declare interface IAuthContext {
|
|
82
|
+
useMsal: boolean;
|
|
83
|
+
msalInstance: PublicClientApplication | null;
|
|
84
|
+
msalScopes: string[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare type IconComponentType = (props: {
|
|
88
|
+
icon: CommonLuminusIcons;
|
|
89
|
+
className?: string;
|
|
90
|
+
iconProps?: IconBaseProps;
|
|
91
|
+
}) => ReactNode;
|
|
92
|
+
|
|
93
|
+
export declare interface IDelegationContext {
|
|
94
|
+
delegation: NameIdIntModel | null;
|
|
95
|
+
setDelegation: Dispatch<SetStateAction<NameIdIntModel | null>>;
|
|
96
|
+
availableDelegations: UserDelegationModel[] | null;
|
|
97
|
+
setAvailableDelegations: React.Dispatch<React.SetStateAction<UserDelegationModel[] | null>>;
|
|
98
|
+
refreshAvailableDelegations: (signal?: GenericAbortSignal, loadCallCount?: number) => Promise<void>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare interface ILoadingContext {
|
|
102
|
+
isLoading: boolean;
|
|
103
|
+
startLoading: (key: string) => void;
|
|
104
|
+
stopLoading: (key: string) => void;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare interface ILocalizationContext {
|
|
108
|
+
language: string;
|
|
109
|
+
setLanguage: (lng: string) => void;
|
|
110
|
+
dateFnsLocale: Locale;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare interface ILuminusComponentsContext {
|
|
114
|
+
cookieDomain: string;
|
|
115
|
+
axiosOptions: CreateAxiosDefaults;
|
|
116
|
+
LinkComponent: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
117
|
+
NavigateComponent: (props: NavigateProps) => null;
|
|
118
|
+
localizationContext: Context<ILocalizationContext>;
|
|
119
|
+
language: string;
|
|
120
|
+
axiosTexts: AxiosTexts;
|
|
121
|
+
confirmTexts: ConfirmTexts;
|
|
122
|
+
formValidationTexts: FormValidationTexts;
|
|
123
|
+
homeDashboardTexts: HomeDashboardTexts;
|
|
124
|
+
formSubmitTexts: FormSubmitTexts;
|
|
125
|
+
appSearchTexts: AppSearchTexts;
|
|
126
|
+
customSelectTexts: CustomSelectTexts;
|
|
127
|
+
errorBoundaryTexts: ErrorBoundaryTexts;
|
|
128
|
+
widgetTexts: WidgetTexts;
|
|
129
|
+
texts: {
|
|
130
|
+
messageBoard: MessageBoardTexts;
|
|
131
|
+
};
|
|
132
|
+
ProjectIconComponent: IconComponentType;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
declare interface IUserContext {
|
|
136
|
+
user: UserModel | null;
|
|
137
|
+
userLoginState: UserLoginState;
|
|
138
|
+
loginUser: (token?: string) => Promise<boolean>;
|
|
139
|
+
logoutUser: () => void;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export declare const LoadingContext: Context<ILoadingContext>;
|
|
143
|
+
|
|
144
|
+
export declare const LoadingProvider: ({ children }: Props_2) => JSX_2.Element;
|
|
145
|
+
|
|
146
|
+
declare enum LoginState {
|
|
147
|
+
LOGGING_IN = 0,
|
|
148
|
+
LOGGED_IN = 1,
|
|
149
|
+
LOGGED_OUT = 2,
|
|
150
|
+
LOGIN_FAILED = 3
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export declare const LuminusComponentsContext: Context<ILuminusComponentsContext>;
|
|
154
|
+
|
|
155
|
+
export declare const LuminusComponentsProvider: ({ cookieDomain, axiosOptions, LinkComponent, NavigateComponent, language, axiosTexts, confirmTexts, formValidationTexts, homeDashboardTexts, formSubmitTexts, appSearchTexts, customSelectTexts, errorBoundaryTexts, widgetTexts, texts: { messageBoard }, ProjectIconComponent, localizationContext, children, }: Props) => JSX_2.Element;
|
|
156
|
+
|
|
157
|
+
declare type MessageBoardTexts = {
|
|
158
|
+
noMessages: string;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
declare type MsalProps = {
|
|
162
|
+
msalInstance: PublicClientApplication;
|
|
163
|
+
msalScopes: string[];
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
declare type NameIdIntModel = {
|
|
167
|
+
id: number;
|
|
168
|
+
name: string | null;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
declare type NameIdStringModel = {
|
|
172
|
+
id: string;
|
|
173
|
+
name: string | null;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
declare type Props = {
|
|
177
|
+
cookieDomain: string;
|
|
178
|
+
axiosOptions: CreateAxiosDefaults;
|
|
179
|
+
LinkComponent: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
180
|
+
NavigateComponent: (props: NavigateProps) => null;
|
|
181
|
+
language: string;
|
|
182
|
+
axiosTexts: AxiosTexts;
|
|
183
|
+
confirmTexts: ConfirmTexts;
|
|
184
|
+
formValidationTexts: FormValidationTexts;
|
|
185
|
+
homeDashboardTexts: HomeDashboardTexts;
|
|
186
|
+
formSubmitTexts: FormSubmitTexts;
|
|
187
|
+
appSearchTexts: AppSearchTexts;
|
|
188
|
+
customSelectTexts: CustomSelectTexts;
|
|
189
|
+
children: React.ReactNode;
|
|
190
|
+
errorBoundaryTexts: ErrorBoundaryTexts;
|
|
191
|
+
widgetTexts: WidgetTexts;
|
|
192
|
+
texts: {
|
|
193
|
+
messageBoard: MessageBoardTexts;
|
|
194
|
+
};
|
|
195
|
+
ProjectIconComponent: IconComponentType;
|
|
196
|
+
localizationContext: Context<ILocalizationContext>;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
declare type Props_2 = {
|
|
200
|
+
children: React.ReactNode;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
declare type Props_3 = {
|
|
204
|
+
children: React.ReactNode;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
declare type Props_4 = BaseProps & ({
|
|
208
|
+
useMsal?: false;
|
|
209
|
+
} | (MsalProps & {
|
|
210
|
+
useMsal: true;
|
|
211
|
+
}));
|
|
212
|
+
|
|
213
|
+
declare type Props_5 = {
|
|
214
|
+
children: React.ReactNode;
|
|
215
|
+
relativeEndpoint: string;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
export declare const UserContext: Context<IUserContext>;
|
|
219
|
+
|
|
220
|
+
declare interface UserDelegationModel {
|
|
221
|
+
id: number;
|
|
222
|
+
employee: EmployeeSmallModel;
|
|
223
|
+
from: string | null;
|
|
224
|
+
to: string | null;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
declare type UserLoginState = {
|
|
228
|
+
state: LoginState;
|
|
229
|
+
user: UserModel | null;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
declare type UserModel = {
|
|
233
|
+
personalNumber: number;
|
|
234
|
+
kid: string | null;
|
|
235
|
+
name: string | null;
|
|
236
|
+
photoId: number | null;
|
|
237
|
+
permissions: string[] | null;
|
|
238
|
+
orgUnit: NameIdStringModel;
|
|
239
|
+
cafmToken: string | null;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export declare const UserProvider: ({ children }: Props_3) => JSX_2.Element;
|
|
243
|
+
|
|
244
|
+
declare type WidgetTexts = {
|
|
245
|
+
fallbackError: string;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
export { }
|