@beinformed/react 1.0.0-beta.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.
Files changed (119) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE.md +1 -0
  3. package/dist/ErrorBoundaryFallback-D6YQem9P.d.cts +13 -0
  4. package/dist/ErrorBoundaryFallback-D6YQem9P.d.ts +13 -0
  5. package/dist/beforeRenderHooks-CNvsMmi8.d.cts +18 -0
  6. package/dist/beforeRenderHooks-Gb0tcmCY.d.ts +18 -0
  7. package/dist/chunk-347XDLN7.js +1 -0
  8. package/dist/chunk-347XDLN7.js.map +1 -0
  9. package/dist/chunk-3OP2KQ56.js +2 -0
  10. package/dist/chunk-3OP2KQ56.js.map +1 -0
  11. package/dist/chunk-4AC7YQ5Q.js +2 -0
  12. package/dist/chunk-4AC7YQ5Q.js.map +1 -0
  13. package/dist/chunk-6E5DAS6G.js +1 -0
  14. package/dist/chunk-6E5DAS6G.js.map +1 -0
  15. package/dist/chunk-6KRECIRI.js +2 -0
  16. package/dist/chunk-6KRECIRI.js.map +1 -0
  17. package/dist/chunk-A4USB53Q.js +2 -0
  18. package/dist/chunk-A4USB53Q.js.map +1 -0
  19. package/dist/chunk-AMFWIR2R.js +2 -0
  20. package/dist/chunk-AMFWIR2R.js.map +1 -0
  21. package/dist/chunk-B7PQLTVC.js +2 -0
  22. package/dist/chunk-B7PQLTVC.js.map +1 -0
  23. package/dist/chunk-DI7VM62A.js +2 -0
  24. package/dist/chunk-DI7VM62A.js.map +1 -0
  25. package/dist/chunk-FW4363Y4.js +2 -0
  26. package/dist/chunk-FW4363Y4.js.map +1 -0
  27. package/dist/chunk-HDOILTJ2.js +2 -0
  28. package/dist/chunk-HDOILTJ2.js.map +1 -0
  29. package/dist/chunk-JYAETKRB.js +2 -0
  30. package/dist/chunk-JYAETKRB.js.map +1 -0
  31. package/dist/chunk-K3DTH6XN.js +2 -0
  32. package/dist/chunk-K3DTH6XN.js.map +1 -0
  33. package/dist/chunk-KNEDBCHP.js +2 -0
  34. package/dist/chunk-KNEDBCHP.js.map +1 -0
  35. package/dist/chunk-MT7D3AJU.js +12 -0
  36. package/dist/chunk-MT7D3AJU.js.map +1 -0
  37. package/dist/chunk-RKGGCIUD.js +2 -0
  38. package/dist/chunk-RKGGCIUD.js.map +1 -0
  39. package/dist/chunk-UZIZDEU6.js +2 -0
  40. package/dist/chunk-UZIZDEU6.js.map +1 -0
  41. package/dist/chunk-VFLYA5WJ.js +2 -0
  42. package/dist/chunk-VFLYA5WJ.js.map +1 -0
  43. package/dist/chunk-VG3QU524.js +22 -0
  44. package/dist/chunk-VG3QU524.js.map +1 -0
  45. package/dist/chunk-WBPDMDW4.js +2 -0
  46. package/dist/chunk-WBPDMDW4.js.map +1 -0
  47. package/dist/chunk-X2C7CKOK.js +2 -0
  48. package/dist/chunk-X2C7CKOK.js.map +1 -0
  49. package/dist/chunk-X3N2NQVZ.js +2 -0
  50. package/dist/chunk-X3N2NQVZ.js.map +1 -0
  51. package/dist/chunk-Y7ESITVO.js +2 -0
  52. package/dist/chunk-Y7ESITVO.js.map +1 -0
  53. package/dist/chunk-YG7XDCNV.js +2 -0
  54. package/dist/chunk-YG7XDCNV.js.map +1 -0
  55. package/dist/chunk-YJNJVQFW.js +2 -0
  56. package/dist/chunk-YJNJVQFW.js.map +1 -0
  57. package/dist/chunk-Z2Y3OPVI.js +2 -0
  58. package/dist/chunk-Z2Y3OPVI.js.map +1 -0
  59. package/dist/client/index.cjs +12 -0
  60. package/dist/client/index.cjs.map +1 -0
  61. package/dist/client/index.d.cts +84 -0
  62. package/dist/client/index.d.ts +84 -0
  63. package/dist/client/index.js +2 -0
  64. package/dist/client/index.js.map +1 -0
  65. package/dist/components/index.cjs +12 -0
  66. package/dist/components/index.cjs.map +1 -0
  67. package/dist/components/index.d.cts +28 -0
  68. package/dist/components/index.d.ts +28 -0
  69. package/dist/components/index.js +2 -0
  70. package/dist/components/index.js.map +1 -0
  71. package/dist/hooks/index.cjs +2 -0
  72. package/dist/hooks/index.cjs.map +1 -0
  73. package/dist/hooks/index.d.cts +353 -0
  74. package/dist/hooks/index.d.ts +353 -0
  75. package/dist/hooks/index.js +2 -0
  76. package/dist/hooks/index.js.map +1 -0
  77. package/dist/i18n/index.cjs +2 -0
  78. package/dist/i18n/index.cjs.map +1 -0
  79. package/dist/i18n/index.d.cts +26 -0
  80. package/dist/i18n/index.d.ts +26 -0
  81. package/dist/i18n/index.js +2 -0
  82. package/dist/i18n/index.js.map +1 -0
  83. package/dist/index.cjs +32 -0
  84. package/dist/index.cjs.map +1 -0
  85. package/dist/index.d.cts +27 -0
  86. package/dist/index.d.ts +27 -0
  87. package/dist/index.js +2 -0
  88. package/dist/index.js.map +1 -0
  89. package/dist/redux/index.cjs +2 -0
  90. package/dist/redux/index.cjs.map +1 -0
  91. package/dist/redux/index.d.cts +458 -0
  92. package/dist/redux/index.d.ts +458 -0
  93. package/dist/redux/index.js +2 -0
  94. package/dist/redux/index.js.map +1 -0
  95. package/dist/server/index.cjs +22 -0
  96. package/dist/server/index.cjs.map +1 -0
  97. package/dist/server/index.d.cts +78 -0
  98. package/dist/server/index.d.ts +78 -0
  99. package/dist/server/index.js +2 -0
  100. package/dist/server/index.js.map +1 -0
  101. package/dist/styled-components.d-CrkOxzv5.d.cts +346 -0
  102. package/dist/styled-components.d-CrkOxzv5.d.ts +346 -0
  103. package/dist/theme/index.cjs +2 -0
  104. package/dist/theme/index.cjs.map +1 -0
  105. package/dist/theme/index.d.cts +112 -0
  106. package/dist/theme/index.d.ts +112 -0
  107. package/dist/theme/index.js +2 -0
  108. package/dist/theme/index.js.map +1 -0
  109. package/dist/types-CGXygEPz.d.cts +8 -0
  110. package/dist/types-CGXygEPz.d.ts +8 -0
  111. package/dist/useForm-CG_DMYfZ.d.cts +178 -0
  112. package/dist/useForm-DW-a5mcV.d.ts +178 -0
  113. package/dist/utils/index.cjs +2 -0
  114. package/dist/utils/index.cjs.map +1 -0
  115. package/dist/utils/index.d.cts +6 -0
  116. package/dist/utils/index.d.ts +6 -0
  117. package/dist/utils/index.js +2 -0
  118. package/dist/utils/index.js.map +1 -0
  119. package/package.json +125 -0
@@ -0,0 +1,78 @@
1
+ import { _ as BEIStore, a2 as Theme, V as RouterLocation, b as Locales, d as LocaleConfiguration } from '../styled-components.d-CrkOxzv5.cjs';
2
+ import react__default from 'react';
3
+ import { ServerStyleSheet } from 'styled-components';
4
+ import { H as HttpServletRequestJava } from '../types-CGXygEPz.cjs';
5
+ import { Reducer } from '@reduxjs/toolkit';
6
+ import { a as BeforeRenderHook } from '../beforeRenderHooks-CNvsMmi8.cjs';
7
+ import 'history';
8
+ import 'redux';
9
+ import '@beinformed/ui/models';
10
+ import '@beinformed/ui/types';
11
+ import 'immer';
12
+ import '@beinformed/ui/utils';
13
+ import '@beinformed/ui/settings';
14
+
15
+ declare const setApplication: (store: BEIStore) => void;
16
+
17
+ interface TemplateProps {
18
+ contextPath: string;
19
+ html: string;
20
+ head: Record<string, unknown>;
21
+ state: string;
22
+ UUID: string;
23
+ }
24
+ declare const htmlpage: (props?: Partial<TemplateProps>) => string;
25
+
26
+ interface Props {
27
+ store: BEIStore;
28
+ theme?: Theme | Theme[];
29
+ UUID: string;
30
+ render: () => react__default.ReactNode;
31
+ template?: (arg0: TemplateProps) => string;
32
+ }
33
+ declare const renderSSRMinimal: ({ store, theme, UUID, render, template, }: Props) => string;
34
+ declare const createHead: (sheet: ServerStyleSheet, helmetContext?: Record<string, unknown>) => Record<string, unknown>;
35
+
36
+ declare const getFullRequestUrl: (request: HttpServletRequestJava) => string;
37
+ declare const getFullRequestLocation: (request: HttpServletRequestJava) => RouterLocation;
38
+ declare const getCookieFromRequest: (request: HttpServletRequestJava, cookieName: string) => null | string;
39
+ declare const getPreferredLocale: (request: HttpServletRequestJava, locales: Locales) => void | string;
40
+
41
+ interface ServerPreferenceValue {
42
+ name: string;
43
+ defaultValue?: string | null;
44
+ type?: string;
45
+ }
46
+ declare const setServerPreferencesFromArray: (store: BEIStore, serverPreferences: (string | ServerPreferenceValue)[]) => void;
47
+ /**
48
+ * Server preferences can be suplied by an array of preference names,
49
+ * or an array of objects which has the name, an optional default value and an optional type.<br>
50
+ * When the type is set to string, a comma separated value is not converted to an array:
51
+ *
52
+ * @example
53
+ * // value becomes an array [default1, default2]
54
+ * { name: "prefName", defaultValue: "default1, default2" }
55
+ * // value remains a string "default1, default2"
56
+ * { name: "prefName", defaultValue: "default1, default2", type: "string" }
57
+ *
58
+ * @param store
59
+ * @param serverPreferences
60
+ */
61
+ declare const setServerPreferences: (store: BEIStore, serverPreferences: (string | ServerPreferenceValue)[]) => void;
62
+
63
+ interface serverProps {
64
+ request: HttpServletRequestJava;
65
+ locales?: LocaleConfiguration[];
66
+ customReducers?: Record<string, Reducer>;
67
+ theme?: Theme | Theme[];
68
+ serverPreferences?: (string | ServerPreferenceValue)[];
69
+ render: () => react__default.ReactNode;
70
+ template?: (arg0: TemplateProps) => string;
71
+ beforeRenderHooks?: BeforeRenderHook[];
72
+ preloadApplication?: boolean;
73
+ }
74
+ declare const serverNoSSR: ({ request, locales, customReducers, serverPreferences, theme, render, template, beforeRenderHooks, preloadApplication, }: serverProps) => string;
75
+
76
+ declare const dehydrate: (store: BEIStore) => string;
77
+
78
+ export { HttpServletRequestJava, type ServerPreferenceValue, type TemplateProps, createHead, dehydrate, getCookieFromRequest, getFullRequestLocation, getFullRequestUrl, getPreferredLocale, htmlpage, renderSSRMinimal, serverNoSSR, setApplication, setServerPreferences, setServerPreferencesFromArray };
@@ -0,0 +1,78 @@
1
+ import { _ as BEIStore, a2 as Theme, V as RouterLocation, b as Locales, d as LocaleConfiguration } from '../styled-components.d-CrkOxzv5.js';
2
+ import react__default from 'react';
3
+ import { ServerStyleSheet } from 'styled-components';
4
+ import { H as HttpServletRequestJava } from '../types-CGXygEPz.js';
5
+ import { Reducer } from '@reduxjs/toolkit';
6
+ import { a as BeforeRenderHook } from '../beforeRenderHooks-Gb0tcmCY.js';
7
+ import 'history';
8
+ import 'redux';
9
+ import '@beinformed/ui/models';
10
+ import '@beinformed/ui/types';
11
+ import 'immer';
12
+ import '@beinformed/ui/utils';
13
+ import '@beinformed/ui/settings';
14
+
15
+ declare const setApplication: (store: BEIStore) => void;
16
+
17
+ interface TemplateProps {
18
+ contextPath: string;
19
+ html: string;
20
+ head: Record<string, unknown>;
21
+ state: string;
22
+ UUID: string;
23
+ }
24
+ declare const htmlpage: (props?: Partial<TemplateProps>) => string;
25
+
26
+ interface Props {
27
+ store: BEIStore;
28
+ theme?: Theme | Theme[];
29
+ UUID: string;
30
+ render: () => react__default.ReactNode;
31
+ template?: (arg0: TemplateProps) => string;
32
+ }
33
+ declare const renderSSRMinimal: ({ store, theme, UUID, render, template, }: Props) => string;
34
+ declare const createHead: (sheet: ServerStyleSheet, helmetContext?: Record<string, unknown>) => Record<string, unknown>;
35
+
36
+ declare const getFullRequestUrl: (request: HttpServletRequestJava) => string;
37
+ declare const getFullRequestLocation: (request: HttpServletRequestJava) => RouterLocation;
38
+ declare const getCookieFromRequest: (request: HttpServletRequestJava, cookieName: string) => null | string;
39
+ declare const getPreferredLocale: (request: HttpServletRequestJava, locales: Locales) => void | string;
40
+
41
+ interface ServerPreferenceValue {
42
+ name: string;
43
+ defaultValue?: string | null;
44
+ type?: string;
45
+ }
46
+ declare const setServerPreferencesFromArray: (store: BEIStore, serverPreferences: (string | ServerPreferenceValue)[]) => void;
47
+ /**
48
+ * Server preferences can be suplied by an array of preference names,
49
+ * or an array of objects which has the name, an optional default value and an optional type.<br>
50
+ * When the type is set to string, a comma separated value is not converted to an array:
51
+ *
52
+ * @example
53
+ * // value becomes an array [default1, default2]
54
+ * { name: "prefName", defaultValue: "default1, default2" }
55
+ * // value remains a string "default1, default2"
56
+ * { name: "prefName", defaultValue: "default1, default2", type: "string" }
57
+ *
58
+ * @param store
59
+ * @param serverPreferences
60
+ */
61
+ declare const setServerPreferences: (store: BEIStore, serverPreferences: (string | ServerPreferenceValue)[]) => void;
62
+
63
+ interface serverProps {
64
+ request: HttpServletRequestJava;
65
+ locales?: LocaleConfiguration[];
66
+ customReducers?: Record<string, Reducer>;
67
+ theme?: Theme | Theme[];
68
+ serverPreferences?: (string | ServerPreferenceValue)[];
69
+ render: () => react__default.ReactNode;
70
+ template?: (arg0: TemplateProps) => string;
71
+ beforeRenderHooks?: BeforeRenderHook[];
72
+ preloadApplication?: boolean;
73
+ }
74
+ declare const serverNoSSR: ({ request, locales, customReducers, serverPreferences, theme, render, template, beforeRenderHooks, preloadApplication, }: serverProps) => string;
75
+
76
+ declare const dehydrate: (store: BEIStore) => string;
77
+
78
+ export { HttpServletRequestJava, type ServerPreferenceValue, type TemplateProps, createHead, dehydrate, getCookieFromRequest, getFullRequestLocation, getFullRequestUrl, getPreferredLocale, htmlpage, renderSSRMinimal, serverNoSSR, setApplication, setServerPreferences, setServerPreferencesFromArray };
@@ -0,0 +1,2 @@
1
+ import{a as e,b as f,c as g,d as h,e as i,f as j,g as k,h as l}from"../chunk-VG3QU524.js";import{a,b,c,d}from"../chunk-HDOILTJ2.js";import"../chunk-3OP2KQ56.js";import"../chunk-Y7ESITVO.js";import"../chunk-YG7XDCNV.js";import"../chunk-JYAETKRB.js";import"../chunk-4AC7YQ5Q.js";import"../chunk-DI7VM62A.js";import"../chunk-A4USB53Q.js";import"../chunk-K3DTH6XN.js";import"../chunk-WBPDMDW4.js";import"../chunk-6KRECIRI.js";import"../chunk-FW4363Y4.js";export{i as createHead,g as dehydrate,c as getCookieFromRequest,b as getFullRequestLocation,a as getFullRequestUrl,d as getPreferredLocale,f as htmlpage,h as renderSSRMinimal,l as serverNoSSR,e as setApplication,k as setServerPreferences,j as setServerPreferencesFromArray};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,346 @@
1
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
2
+ import { Reducer } from '@reduxjs/toolkit';
3
+ import * as history from 'history';
4
+ import { Location, Action } from 'history';
5
+ import * as redux from 'redux';
6
+ import { ErrorResponse, BaseCollection, ModularUIModel, Href } from '@beinformed/ui/models';
7
+ import { MessageParameters } from '@beinformed/ui/types';
8
+ import { immerable } from 'immer';
9
+ import { ModularUIRequestOptions, UpdateHandler } from '@beinformed/ui/utils';
10
+ import { Setting as Setting$1 } from '@beinformed/ui/settings';
11
+ import { DefaultTheme } from 'styled-components';
12
+
13
+ interface ProgressIndicatorState {
14
+ count: number;
15
+ timestamp: number;
16
+ percentComplete: number;
17
+ }
18
+ declare const progressIndicatorReducer: redux.Reducer<ProgressIndicatorState> & {
19
+ getInitialState: () => ProgressIndicatorState;
20
+ };
21
+
22
+ interface LocaleConfiguration {
23
+ code: string;
24
+ messages: Record<string, string>;
25
+ errors?: Record<string, string>;
26
+ nativeName?: string;
27
+ }
28
+ interface MessageObject {
29
+ id: string;
30
+ defaultMessage?: string;
31
+ parameters?: MessageParameters;
32
+ }
33
+
34
+ interface NotificationState {
35
+ render: boolean;
36
+ messageType: string | undefined;
37
+ message: MessageObject | undefined;
38
+ error: ErrorResponse | undefined;
39
+ }
40
+ interface ShowNotificationArguments {
41
+ type: NOTIFICATION_TYPES | undefined;
42
+ message: MessageObject | undefined;
43
+ error?: ErrorResponse | undefined;
44
+ timeout?: number;
45
+ }
46
+ declare enum NOTIFICATION_TYPES {
47
+ SUCCESS = "SUCCESS",
48
+ INFO = "INFO",
49
+ WARNING = "WARNING",
50
+ ERROR = "ERROR"
51
+ }
52
+ declare const showNotification: _reduxjs_toolkit.AsyncThunk<void, ShowNotificationArguments, {
53
+ state?: unknown;
54
+ dispatch?: _reduxjs_toolkit.ThunkDispatch<unknown, unknown, redux.UnknownAction>;
55
+ extra?: unknown;
56
+ rejectValue?: unknown;
57
+ serializedErrorType?: unknown;
58
+ pendingMeta?: unknown;
59
+ fulfilledMeta?: unknown;
60
+ rejectedMeta?: unknown;
61
+ }>;
62
+ declare const dismissNotification: _reduxjs_toolkit.ActionCreatorWithoutPayload<"DISMISS_NOTIFICATION">;
63
+ declare const notificationReducer: redux.Reducer<NotificationState> & {
64
+ getInitialState: () => NotificationState;
65
+ };
66
+
67
+ interface ModelCatalogState {
68
+ entryDate: string | undefined;
69
+ }
70
+ declare const updateEntryDate: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[entryDate: string], string, "UPDATE_ENTRYDATE", never, never>;
71
+ /**
72
+ * Keep track of the entry date for the modelcatalog
73
+ */
74
+ declare const modelCatalogReducer: redux.Reducer<ModelCatalogState> & {
75
+ getInitialState: () => ModelCatalogState;
76
+ };
77
+
78
+ interface ModalState {
79
+ key: string;
80
+ visible: boolean;
81
+ size?: string;
82
+ }
83
+ interface ModalsState {
84
+ modals: ModalState[];
85
+ }
86
+ declare const showModal: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[key: string], string, "SHOW_MODAL", never, never>;
87
+ declare const closeModal: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[key: string], string, "CLOSE_MODAL", never, never>;
88
+ declare const modalsReducer: redux.Reducer<ModalsState> & {
89
+ getInitialState: () => ModalsState;
90
+ };
91
+
92
+ interface AuthState {
93
+ authenticated: boolean;
94
+ mustChangePassword: boolean;
95
+ error: string | null;
96
+ }
97
+ declare const loginSuccess: _reduxjs_toolkit.ActionCreatorWithoutPayload<"AUTHENTICATION_SUCCESS">;
98
+ declare const logoutSuccess: _reduxjs_toolkit.ActionCreatorWithoutPayload<"AUTHENTICATION_LOGOUT">;
99
+ declare const sendAuthenticationError: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[errorMessage: string], string, "AUTHENTICATION_ERROR", never, never>;
100
+ declare const resetAuthErrors: _reduxjs_toolkit.ActionCreatorWithoutPayload<"AUTHENTICATION_RESET_ERRORS">;
101
+ declare const saveChangePassword: _reduxjs_toolkit.ActionCreatorWithoutPayload<"CHANGE_PASSWORD">;
102
+ declare const authReducer: redux.Reducer<AuthState> & {
103
+ getInitialState: () => AuthState;
104
+ };
105
+
106
+ type RouterLocation = Location<{
107
+ from?: string;
108
+ modal?: boolean;
109
+ }>;
110
+ interface RouterState {
111
+ location: RouterLocation | undefined;
112
+ action: Action | undefined;
113
+ }
114
+ declare const locationChange: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[location: RouterLocation, action: Action], {
115
+ location: RouterLocation;
116
+ action: Action;
117
+ }, "ROUTER/LOCATION_CHANGE", never, never>;
118
+ declare const routerReducer: redux.Reducer<RouterState> & {
119
+ getInitialState: () => RouterState;
120
+ };
121
+
122
+ /**
123
+ * Create a locale
124
+ */
125
+ declare class Locale {
126
+ #private;
127
+ [immerable]: boolean;
128
+ constructor(locale: LocaleConfiguration);
129
+ /**
130
+ * Retrieve locale code
131
+ */
132
+ get code(): string;
133
+ /**
134
+ * Retrieve nativeName
135
+ */
136
+ get nativeName(): string;
137
+ /**
138
+ * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}
139
+ * where the ICU messageformat module uses {placeholder_name}.
140
+ * This method converts the ${} to {}
141
+ */
142
+ fixPlaceHolders(message: string | undefined): string | null;
143
+ /**
144
+ * Exported messages from Be Informed have placeholders in the syntax ${placeholder_name}
145
+ * where the ICU messageformat module uses {placeholder_name}.
146
+ * This method converts the ${} to {}
147
+ */
148
+ private fixPlaceHoldersInObject;
149
+ /**
150
+ * Retrieve message by id
151
+ */
152
+ getBaseMessage(id: string, defaultMessage?: string): string;
153
+ /**
154
+ * Format message using formatMessage library
155
+ */
156
+ formatMessage(message: string, parameters?: MessageParameters): string;
157
+ /**
158
+ * Retrieve a messages with replaced parameters
159
+ */
160
+ getMessage(id: string, defaultMessage?: string, parameters?: MessageParameters): string;
161
+ /**
162
+ * Add or change messages for this locale. It is not possible to remove messages.
163
+ */
164
+ update(messages?: Record<string, string>, errors?: Record<string, string>): void;
165
+ }
166
+
167
+ type ErrorMessageObject = Record<string, Record<string, string>>;
168
+ interface HydratedLocales {
169
+ collection: {
170
+ code: string;
171
+ messages: Record<string, string>;
172
+ errors: Record<string, string>;
173
+ }[];
174
+ }
175
+ /**
176
+ * Array of available locales
177
+ * Order of locales is the preferred order of locales.
178
+ * When user has an accept language header that does not correspond to the locales array,
179
+ * the first one is used as the preferred language
180
+ */
181
+ declare const availableLocales: LocaleConfiguration[];
182
+ /**
183
+ * Merge an object with custom error messages (exported and translated from be informed for example) and merge them with the existing translations.
184
+ */
185
+ declare const createLocalesWithConfiguredErrors: (configuredErrors: ErrorMessageObject) => LocaleConfiguration[];
186
+ /**
187
+ * Locales, collection of Locale
188
+ */
189
+ declare class Locales extends BaseCollection<Locale> {
190
+ constructor(locales?: LocaleConfiguration[]);
191
+ /**
192
+ * rehydrate
193
+ */
194
+ static rehydrate(hydatedLocales: HydratedLocales): Locales;
195
+ /**
196
+ * Check if locale with localeCode exists
197
+ */
198
+ hasLocale(localeCode: string): boolean;
199
+ /**
200
+ * Retrieve locales by localeCode from Locales collection
201
+ */
202
+ getLocale(localeCode: string): Locale;
203
+ /**
204
+ * Retrieve all available locale codes
205
+ */
206
+ get availableLocaleCodes(): string[];
207
+ /**
208
+ * Retrieve preferred locale based on the accept header of a browser
209
+ */
210
+ getPreferredLocale(acceptLanguageHeader: string | null): string | undefined;
211
+ /**
212
+ * Add or change messages and errors for the given locale.<br>
213
+ * It is not possible to remove messages.
214
+ */
215
+ update(locale: string, messages?: Record<string, string>, errors?: Record<string, string>): void;
216
+ }
217
+
218
+ interface I18nState {
219
+ locales: Locales;
220
+ locale: string;
221
+ }
222
+ declare const receiveLocale: (locale: string) => {
223
+ payload: string;
224
+ type: "UPDATE_LOCALE";
225
+ };
226
+ declare const updateLocale: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[locale: string], string, "UPDATE_LOCALE", never, never>;
227
+ declare const setLocales: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[locales: Locales, locale: string], {
228
+ locales: Locales;
229
+ locale: string;
230
+ }, "SET_LOCALES", never, never>;
231
+ declare const i18nReducer: redux.Reducer<I18nState> & {
232
+ getInitialState: () => I18nState;
233
+ };
234
+
235
+ interface ModelEntry {
236
+ status: string;
237
+ model?: ModularUIModel;
238
+ lastModification: number;
239
+ requestOptions?: ModularUIRequestOptions;
240
+ error?: ErrorResponse;
241
+ }
242
+ interface FetchModelPayload {
243
+ key: string;
244
+ href: Href | string;
245
+ options?: ModularUIRequestOptions;
246
+ }
247
+ interface FetchModelResult {
248
+ key: string;
249
+ model: ModularUIModel;
250
+ updateHandler?: UpdateHandler;
251
+ }
252
+
253
+ type ModularUIState = Record<string, ModelEntry>;
254
+ declare const modularUIReducer: redux.Reducer<ModularUIState> & {
255
+ getInitialState: () => ModularUIState;
256
+ };
257
+
258
+ type SimplePreferenceValue = null | string | boolean | Record<string, unknown>;
259
+ type PreferenceValue = SimplePreferenceValue | SimplePreferenceValue[];
260
+
261
+ type ThemePropValue = undefined | null | string | number | boolean | string[] | Record<string, Setting$1>;
262
+ type Theme = DefaultTheme;
263
+ interface UtilThemeProps {
264
+ theme: Theme;
265
+ }
266
+
267
+ type PreferencesState = Record<string, PreferenceValue> & {
268
+ theme?: Theme;
269
+ };
270
+ declare const setPreference: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[propertyName: string, propertyValue: PreferenceValue], {
271
+ key: string;
272
+ value: PreferenceValue;
273
+ }, "SET_PREFERENCE", never, never>;
274
+ declare const setPreferences: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[preferences: Record<string, PreferenceValue>], {
275
+ [x: string]: PreferenceValue;
276
+ }, "SET_PREFERENCES", never, never>;
277
+ declare const preferencesReducer: redux.Reducer<PreferencesState> & {
278
+ getInitialState: () => PreferencesState;
279
+ };
280
+
281
+ type ErrorState = null | ErrorResponse;
282
+ declare const saveError: _reduxjs_toolkit.ActionCreatorWithPreparedPayload<[error: ErrorResponse], ErrorResponse, "SAVE_ERROR", never, never>;
283
+ declare const errorReducer: redux.Reducer<ErrorState> & {
284
+ getInitialState: () => ErrorState;
285
+ };
286
+
287
+ declare const rootReducers: Reducer<{
288
+ router: RouterState;
289
+ preferences: PreferencesState;
290
+ modularui: ModularUIState;
291
+ i18n: I18nState;
292
+ auth: AuthState;
293
+ error: ErrorState;
294
+ modals: ModalsState;
295
+ modelcatalog: ModelCatalogState;
296
+ notification: NotificationState;
297
+ progressindicator: ProgressIndicatorState;
298
+ }, redux.UnknownAction, Partial<{
299
+ router: RouterState | undefined;
300
+ preferences: PreferencesState | undefined;
301
+ modularui: ModularUIState | undefined;
302
+ i18n: I18nState | undefined;
303
+ auth: AuthState | undefined;
304
+ error: ErrorState | undefined;
305
+ modals: ModalsState | undefined;
306
+ modelcatalog: ModelCatalogState | undefined;
307
+ notification: NotificationState | undefined;
308
+ progressindicator: ProgressIndicatorState | undefined;
309
+ }>>;
310
+ declare const setupStore: (preloadedState?: Partial<RootState>, customReducers?: Record<string, Reducer> | null, history?: history.History<unknown>) => _reduxjs_toolkit.EnhancedStore<{
311
+ router: RouterState;
312
+ preferences: PreferencesState;
313
+ modularui: ModularUIState;
314
+ i18n: I18nState;
315
+ auth: AuthState;
316
+ error: ErrorState;
317
+ modals: ModalsState;
318
+ modelcatalog: ModelCatalogState;
319
+ notification: NotificationState;
320
+ progressindicator: ProgressIndicatorState;
321
+ }, redux.UnknownAction, _reduxjs_toolkit.Tuple<[redux.StoreEnhancer<{
322
+ dispatch: _reduxjs_toolkit.ThunkDispatch<{
323
+ router: RouterState;
324
+ preferences: PreferencesState;
325
+ modularui: ModularUIState;
326
+ i18n: I18nState;
327
+ auth: AuthState;
328
+ error: ErrorState;
329
+ modals: ModalsState;
330
+ modelcatalog: ModelCatalogState;
331
+ notification: NotificationState;
332
+ progressindicator: ProgressIndicatorState;
333
+ }, undefined, redux.UnknownAction>;
334
+ }>, redux.StoreEnhancer]>>;
335
+ type BEIStore = ReturnType<typeof setupStore>;
336
+ type RootState = ReturnType<typeof rootReducers>;
337
+ type BEIDispatch = BEIStore["dispatch"];
338
+
339
+ declare module "styled-components" {
340
+ export interface DefaultTheme {
341
+ [key: string]: ThemePropValue;
342
+ settings?: Record<string, Setting>;
343
+ }
344
+ }
345
+
346
+ export { type RootState as $, type AuthState as A, type ModelEntry as B, type FetchModelResult as C, NOTIFICATION_TYPES as D, type ErrorState as E, type FetchModelPayload as F, showNotification as G, dismissNotification as H, type I18nState as I, notificationReducer as J, setPreference as K, Locale as L, type MessageObject as M, type NotificationState as N, setPreferences as O, type PreferencesState as P, preferencesReducer as Q, type PreferenceValue as R, type ShowNotificationArguments as S, type ProgressIndicatorState as T, progressIndicatorReducer as U, type RouterLocation as V, type RouterState as W, locationChange as X, routerReducer as Y, setupStore as Z, type BEIStore as _, availableLocales as a, type BEIDispatch as a0, type ThemePropValue as a1, type Theme as a2, type UtilThemeProps as a3, Locales as b, createLocalesWithConfiguredErrors as c, type LocaleConfiguration as d, logoutSuccess as e, saveChangePassword as f, authReducer as g, saveError as h, errorReducer as i, receiveLocale as j, setLocales as k, loginSuccess as l, i18nReducer as m, type ModalState as n, type ModalsState as o, showModal as p, closeModal as q, resetAuthErrors as r, sendAuthenticationError as s, modalsReducer as t, updateLocale as u, type ModelCatalogState as v, updateEntryDate as w, modelCatalogReducer as x, type ModularUIState as y, modularUIReducer as z };