@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.
- package/CHANGELOG.md +12 -0
- package/LICENSE.md +1 -0
- package/dist/ErrorBoundaryFallback-D6YQem9P.d.cts +13 -0
- package/dist/ErrorBoundaryFallback-D6YQem9P.d.ts +13 -0
- package/dist/beforeRenderHooks-CNvsMmi8.d.cts +18 -0
- package/dist/beforeRenderHooks-Gb0tcmCY.d.ts +18 -0
- package/dist/chunk-347XDLN7.js +1 -0
- package/dist/chunk-347XDLN7.js.map +1 -0
- package/dist/chunk-3OP2KQ56.js +2 -0
- package/dist/chunk-3OP2KQ56.js.map +1 -0
- package/dist/chunk-4AC7YQ5Q.js +2 -0
- package/dist/chunk-4AC7YQ5Q.js.map +1 -0
- package/dist/chunk-6E5DAS6G.js +1 -0
- package/dist/chunk-6E5DAS6G.js.map +1 -0
- package/dist/chunk-6KRECIRI.js +2 -0
- package/dist/chunk-6KRECIRI.js.map +1 -0
- package/dist/chunk-A4USB53Q.js +2 -0
- package/dist/chunk-A4USB53Q.js.map +1 -0
- package/dist/chunk-AMFWIR2R.js +2 -0
- package/dist/chunk-AMFWIR2R.js.map +1 -0
- package/dist/chunk-B7PQLTVC.js +2 -0
- package/dist/chunk-B7PQLTVC.js.map +1 -0
- package/dist/chunk-DI7VM62A.js +2 -0
- package/dist/chunk-DI7VM62A.js.map +1 -0
- package/dist/chunk-FW4363Y4.js +2 -0
- package/dist/chunk-FW4363Y4.js.map +1 -0
- package/dist/chunk-HDOILTJ2.js +2 -0
- package/dist/chunk-HDOILTJ2.js.map +1 -0
- package/dist/chunk-JYAETKRB.js +2 -0
- package/dist/chunk-JYAETKRB.js.map +1 -0
- package/dist/chunk-K3DTH6XN.js +2 -0
- package/dist/chunk-K3DTH6XN.js.map +1 -0
- package/dist/chunk-KNEDBCHP.js +2 -0
- package/dist/chunk-KNEDBCHP.js.map +1 -0
- package/dist/chunk-MT7D3AJU.js +12 -0
- package/dist/chunk-MT7D3AJU.js.map +1 -0
- package/dist/chunk-RKGGCIUD.js +2 -0
- package/dist/chunk-RKGGCIUD.js.map +1 -0
- package/dist/chunk-UZIZDEU6.js +2 -0
- package/dist/chunk-UZIZDEU6.js.map +1 -0
- package/dist/chunk-VFLYA5WJ.js +2 -0
- package/dist/chunk-VFLYA5WJ.js.map +1 -0
- package/dist/chunk-VG3QU524.js +22 -0
- package/dist/chunk-VG3QU524.js.map +1 -0
- package/dist/chunk-WBPDMDW4.js +2 -0
- package/dist/chunk-WBPDMDW4.js.map +1 -0
- package/dist/chunk-X2C7CKOK.js +2 -0
- package/dist/chunk-X2C7CKOK.js.map +1 -0
- package/dist/chunk-X3N2NQVZ.js +2 -0
- package/dist/chunk-X3N2NQVZ.js.map +1 -0
- package/dist/chunk-Y7ESITVO.js +2 -0
- package/dist/chunk-Y7ESITVO.js.map +1 -0
- package/dist/chunk-YG7XDCNV.js +2 -0
- package/dist/chunk-YG7XDCNV.js.map +1 -0
- package/dist/chunk-YJNJVQFW.js +2 -0
- package/dist/chunk-YJNJVQFW.js.map +1 -0
- package/dist/chunk-Z2Y3OPVI.js +2 -0
- package/dist/chunk-Z2Y3OPVI.js.map +1 -0
- package/dist/client/index.cjs +12 -0
- package/dist/client/index.cjs.map +1 -0
- package/dist/client/index.d.cts +84 -0
- package/dist/client/index.d.ts +84 -0
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -0
- package/dist/components/index.cjs +12 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.d.cts +28 -0
- package/dist/components/index.d.ts +28 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +353 -0
- package/dist/hooks/index.d.ts +353 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/i18n/index.cjs +2 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +26 -0
- package/dist/i18n/index.d.ts +26 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/redux/index.cjs +2 -0
- package/dist/redux/index.cjs.map +1 -0
- package/dist/redux/index.d.cts +458 -0
- package/dist/redux/index.d.ts +458 -0
- package/dist/redux/index.js +2 -0
- package/dist/redux/index.js.map +1 -0
- package/dist/server/index.cjs +22 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +78 -0
- package/dist/server/index.d.ts +78 -0
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -0
- package/dist/styled-components.d-CrkOxzv5.d.cts +346 -0
- package/dist/styled-components.d-CrkOxzv5.d.ts +346 -0
- package/dist/theme/index.cjs +2 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.d.cts +112 -0
- package/dist/theme/index.d.ts +112 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/types-CGXygEPz.d.cts +8 -0
- package/dist/types-CGXygEPz.d.ts +8 -0
- package/dist/useForm-CG_DMYfZ.d.cts +178 -0
- package/dist/useForm-DW-a5mcV.d.ts +178 -0
- package/dist/utils/index.cjs +2 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +6 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import * as _beinformed_ui_models from '@beinformed/ui/models';
|
|
2
|
+
import { ListModel, DetailModel, TabModel, SourceReferenceCollection, ContentModel, Href, ModelCatalogModel, ConceptIndexModel, ConceptDetailModel, ContentIndexModel, ContentTOCModel, ContentTypeModel, ModularUIModel, ApplicationModel, CaseViewModel, GroupingPanelModel, ListDetailModel, CaseSearchModel, UserProfileModel, ErrorResponse } from '@beinformed/ui/models';
|
|
3
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
4
|
+
import { AuthenticationType, ModularUIResponse, ModularUIRequest } from '@beinformed/ui/modularui';
|
|
5
|
+
export { U as UpdateFormOptions, b as useAttributeUpdate, u as useForm, a as useFormNavigation, c as useRepeatableAttributeSet } from '../useForm-DW-a5mcV.js';
|
|
6
|
+
import * as lodash from 'lodash';
|
|
7
|
+
import { MessageParameters, ISO_DATE } from '@beinformed/ui/types';
|
|
8
|
+
import { B as ModelEntry, M as MessageObject, S as ShowNotificationArguments, P as PreferencesState, V as RouterLocation, $ as RootState } from '../styled-components.d-CrkOxzv5.js';
|
|
9
|
+
import { ModularUIRequestOptions } from '@beinformed/ui/utils';
|
|
10
|
+
import 'history';
|
|
11
|
+
import 'redux';
|
|
12
|
+
import 'immer';
|
|
13
|
+
import '@beinformed/ui/settings';
|
|
14
|
+
import 'styled-components';
|
|
15
|
+
|
|
16
|
+
declare const useRetrieveFormsOnModel: (model: ListModel | DetailModel | TabModel) => null;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Provides access to authentication state and actions.
|
|
20
|
+
* Includes functionality for standard username/password login and redirect-based login.
|
|
21
|
+
* @returns An object containing authentication status, available authentication types, error messages, and login/logout functions.
|
|
22
|
+
*/
|
|
23
|
+
declare const useLogin: () => {
|
|
24
|
+
/**
|
|
25
|
+
* Indicates whether the user is currently authenticated.
|
|
26
|
+
*/
|
|
27
|
+
isAuthenticated: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* An array of available authentication types supported by the application.
|
|
30
|
+
* Defaults to an array containing the `DEFAULT_AUTHENTICATION_TYPE` if no types are available in the application state.
|
|
31
|
+
*/
|
|
32
|
+
authenticationTypes: {
|
|
33
|
+
name: string;
|
|
34
|
+
authentication: string;
|
|
35
|
+
isPrimary: boolean;
|
|
36
|
+
}[];
|
|
37
|
+
/**
|
|
38
|
+
* The current authentication error message, if any.
|
|
39
|
+
*/
|
|
40
|
+
errorMessage: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Resets the authentication error message in the Redux store.
|
|
43
|
+
*/
|
|
44
|
+
resetErrors: () => {
|
|
45
|
+
payload: undefined;
|
|
46
|
+
type: "AUTHENTICATION_RESET_ERRORS";
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Attempts to log in the user with the provided username and password.
|
|
50
|
+
* Dispatches the `login` action to the Redux store.
|
|
51
|
+
* @param username The username for authentication.
|
|
52
|
+
* @param password The password for authentication.
|
|
53
|
+
*/
|
|
54
|
+
login: (username: string, password: string) => Promise<_reduxjs_toolkit.PayloadAction<void, string, {
|
|
55
|
+
arg: {
|
|
56
|
+
username: string;
|
|
57
|
+
password: string;
|
|
58
|
+
};
|
|
59
|
+
requestId: string;
|
|
60
|
+
requestStatus: "fulfilled";
|
|
61
|
+
}, never> | _reduxjs_toolkit.PayloadAction<unknown, string, {
|
|
62
|
+
arg: {
|
|
63
|
+
username: string;
|
|
64
|
+
password: string;
|
|
65
|
+
};
|
|
66
|
+
requestId: string;
|
|
67
|
+
requestStatus: "rejected";
|
|
68
|
+
aborted: boolean;
|
|
69
|
+
condition: boolean;
|
|
70
|
+
} & ({
|
|
71
|
+
rejectedWithValue: true;
|
|
72
|
+
} | ({
|
|
73
|
+
rejectedWithValue: false;
|
|
74
|
+
} & {})), _reduxjs_toolkit.SerializedError>> & {
|
|
75
|
+
__linterBrands: "SafePromise";
|
|
76
|
+
} & {
|
|
77
|
+
abort: (reason?: string) => void;
|
|
78
|
+
requestId: string;
|
|
79
|
+
arg: {
|
|
80
|
+
username: string;
|
|
81
|
+
password: string;
|
|
82
|
+
};
|
|
83
|
+
unwrap: () => Promise<void>;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Initiates a redirect-based login flow for a specific authentication type.
|
|
87
|
+
* If a redirect login is already in progress, it throws an `IllegalStateException` to prevent infinite loops.
|
|
88
|
+
* If the user is not currently authenticated, it sets a flag in the cache and redirects the browser to the authentication provider's redirect URI.
|
|
89
|
+
* @param authenticationType The authentication type to initiate the redirect for.
|
|
90
|
+
* @throws {IllegalStateException} If a redirect login is already in progress for a different authentication type.
|
|
91
|
+
*/
|
|
92
|
+
redirectLogin: (authenticationType: AuthenticationType) => void;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Provides access to logout functionality.
|
|
96
|
+
* Handles both standard logout and redirect-based logout scenarios.
|
|
97
|
+
* @returns An object containing the authentication status, available authentication types, and the logout function.
|
|
98
|
+
*/
|
|
99
|
+
declare const useLogout: () => {
|
|
100
|
+
/**
|
|
101
|
+
* Indicates whether the user is currently authenticated.
|
|
102
|
+
*/
|
|
103
|
+
isAuthenticated: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* An array of available authentication types supported by the application.
|
|
106
|
+
* Defaults to an array containing the `DEFAULT_AUTHENTICATION_TYPE` if no types are available in the application state.
|
|
107
|
+
*/
|
|
108
|
+
authenticationTypes: {
|
|
109
|
+
name: string;
|
|
110
|
+
authentication: string;
|
|
111
|
+
isPrimary: boolean;
|
|
112
|
+
}[];
|
|
113
|
+
/**
|
|
114
|
+
* Initiates the logout process.
|
|
115
|
+
* If a redirect login was in progress, it redirects the user to the server's logout endpoint with a return URL to the current origin.
|
|
116
|
+
* Otherwise, it dispatches the `logout` action to the Redux store.
|
|
117
|
+
*/
|
|
118
|
+
logout: () => (Promise<_reduxjs_toolkit.PayloadAction<void, string, {
|
|
119
|
+
arg: void;
|
|
120
|
+
requestId: string;
|
|
121
|
+
requestStatus: "fulfilled";
|
|
122
|
+
}, never> | _reduxjs_toolkit.PayloadAction<unknown, string, {
|
|
123
|
+
arg: void;
|
|
124
|
+
requestId: string;
|
|
125
|
+
requestStatus: "rejected";
|
|
126
|
+
aborted: boolean;
|
|
127
|
+
condition: boolean;
|
|
128
|
+
} & ({
|
|
129
|
+
rejectedWithValue: true;
|
|
130
|
+
} | ({
|
|
131
|
+
rejectedWithValue: false;
|
|
132
|
+
} & {})), _reduxjs_toolkit.SerializedError>> & {
|
|
133
|
+
__linterBrands: "SafePromise";
|
|
134
|
+
} & {
|
|
135
|
+
abort: (reason?: string) => void;
|
|
136
|
+
requestId: string;
|
|
137
|
+
arg: void;
|
|
138
|
+
unwrap: () => Promise<void>;
|
|
139
|
+
}) | undefined;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Hook to retrieve multiple source references at once
|
|
144
|
+
*/
|
|
145
|
+
declare const useContentFromSourceReferences: (sourceReferences: SourceReferenceCollection, renderChildSections: boolean) => ContentModel[];
|
|
146
|
+
|
|
147
|
+
type Callback = () => void | (() => void);
|
|
148
|
+
type DependencyList = unknown[];
|
|
149
|
+
declare function useDeepCompareEffect(callback: Callback, dependencies: DependencyList): void;
|
|
150
|
+
|
|
151
|
+
declare const useMessage: (id: string, defaultMessage?: string, placeholders?: MessageParameters | undefined) => string;
|
|
152
|
+
declare const useTranslate: () => ((id: string, defaultMessage?: string, placeholders?: MessageParameters | undefined) => string) & lodash.MemoizedFunction;
|
|
153
|
+
declare const useLocale: () => string;
|
|
154
|
+
/**
|
|
155
|
+
* Retrieve all available locale codes
|
|
156
|
+
*/
|
|
157
|
+
declare const useLocaleCodes: () => string[];
|
|
158
|
+
|
|
159
|
+
type ModalHook = (modalId: string) => {
|
|
160
|
+
key: string | null;
|
|
161
|
+
size?: string | null;
|
|
162
|
+
visible: boolean;
|
|
163
|
+
show: () => void;
|
|
164
|
+
close: () => void;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Manage modals
|
|
168
|
+
*/
|
|
169
|
+
declare const useModal: ModalHook;
|
|
170
|
+
|
|
171
|
+
interface UseModularUIBasicOptions<T> {
|
|
172
|
+
expectedModels?: string[];
|
|
173
|
+
targetModel?: new (modularuiResponse: ModularUIResponse) => T;
|
|
174
|
+
forceTargetModel?: boolean;
|
|
175
|
+
origin?: string;
|
|
176
|
+
contextPath?: string;
|
|
177
|
+
cache?: boolean;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* useModularUIBasic Hook
|
|
181
|
+
*/
|
|
182
|
+
declare const useModularUIBasic: <T>(key: string, href: string | Href, options?: UseModularUIBasicOptions<T>) => T | undefined;
|
|
183
|
+
|
|
184
|
+
interface SearchFilter {
|
|
185
|
+
index?: string;
|
|
186
|
+
label?: string;
|
|
187
|
+
type?: string | string[];
|
|
188
|
+
modelCategory?: string | string[];
|
|
189
|
+
entryDate?: string;
|
|
190
|
+
}
|
|
191
|
+
declare const useModelCatalog: (options?: UseModularUIBasicOptions<ModelCatalogModel>) => ModelCatalogModel | undefined;
|
|
192
|
+
declare const useConceptIndex: (href: string | Href, key?: string, options?: UseModularUIBasicOptions<ConceptIndexModel>) => ConceptIndexModel | undefined;
|
|
193
|
+
declare const useConceptDetail: (concept: string | Href, key?: string, options?: UseModularUIBasicOptions<ConceptDetailModel>) => ConceptDetailModel | undefined;
|
|
194
|
+
declare const useContentIndex: (href: string | Href, key?: string, options?: UseModularUIBasicOptions<ContentIndexModel>) => ContentIndexModel | undefined;
|
|
195
|
+
declare const useContentTOC: (content: string | Href, key?: string, options?: UseModularUIBasicOptions<ContentTOCModel>) => ContentTOCModel | undefined;
|
|
196
|
+
declare const useContent: (content: string | Href, key?: string, options?: UseModularUIBasicOptions<ContentModel>) => ContentModel | undefined;
|
|
197
|
+
declare const useCompleteSource: (content: string | Href, key?: string, options?: UseModularUIBasicOptions<ContentModel | ContentTOCModel>) => ContentModel | ContentTOCModel | undefined;
|
|
198
|
+
declare const useContentType: (contentType: string | Href, key?: string, options?: UseModularUIBasicOptions<ContentTypeModel>) => ContentTypeModel | undefined;
|
|
199
|
+
declare const useRelatedConcepts: (href: string | Href, key?: string, options?: UseModularUIBasicOptions<ConceptIndexModel>) => ConceptIndexModel | undefined;
|
|
200
|
+
declare const useConceptSearch: (filters: SearchFilter, key: string | "conceptSearch", options?: UseModularUIBasicOptions<ConceptIndexModel>) => ConceptIndexModel | undefined;
|
|
201
|
+
declare const useContentSearch: (filters: SearchFilter, key: string | "contentSearch", options?: UseModularUIBasicOptions<ContentIndexModel>) => ContentIndexModel | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* Retrieve and update the entrydate for the modelcatalog
|
|
204
|
+
*/
|
|
205
|
+
declare const useEntryDate: () => {
|
|
206
|
+
entryDate: string;
|
|
207
|
+
setEntryDate: (entryDate: ISO_DATE) => {
|
|
208
|
+
payload: string;
|
|
209
|
+
type: "UPDATE_ENTRYDATE";
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
type ReloadCallback = (model: ModularUIModel | undefined) => boolean;
|
|
214
|
+
type UseModels = () => {
|
|
215
|
+
reload: (model: ModularUIModel, options?: Record<string, unknown>) => void;
|
|
216
|
+
reloadWithFilter: (callbackFn: ReloadCallback, options?: Record<string, unknown>) => void;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* Hook that contains the reload property that can be used to reload a model
|
|
220
|
+
*/
|
|
221
|
+
declare const useModels: UseModels;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Use redux action and selector to retrieve the correct modular ui service model
|
|
225
|
+
*/
|
|
226
|
+
declare const useModularUI: (modelKey: string, url: string | Href, options?: ModularUIRequestOptions) => ModelEntry;
|
|
227
|
+
|
|
228
|
+
interface HookOptions {
|
|
229
|
+
origin?: string;
|
|
230
|
+
contextPath?: string;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Load application
|
|
234
|
+
*/
|
|
235
|
+
declare const useApplication: (options?: HookOptions) => ApplicationModel | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* Load a tab by href
|
|
238
|
+
*/
|
|
239
|
+
declare const useTab: (href: string | Href, options?: HookOptions) => TabModel | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* Load caseview by href
|
|
242
|
+
*/
|
|
243
|
+
declare const useCaseView: (href: string | Href, options?: HookOptions) => CaseViewModel | undefined;
|
|
244
|
+
declare const usePanel: (href: string | Href, options?: HookOptions) => ListModel | GroupingPanelModel | DetailModel<_beinformed_ui_models.DetailData, _beinformed_ui_models.DetailPanelContributions> | undefined;
|
|
245
|
+
declare const useList: (href: string | Href, options?: HookOptions) => ListModel | undefined;
|
|
246
|
+
declare const useListOrDetail: (href: string | Href, options?: HookOptions) => ListModel | DetailModel<_beinformed_ui_models.DetailData, _beinformed_ui_models.DetailPanelContributions> | undefined;
|
|
247
|
+
declare const useListDetail: (href: string | Href, options?: HookOptions) => ListDetailModel | undefined;
|
|
248
|
+
declare const useGroupingPanel: (href: string | Href, options?: HookOptions) => GroupingPanelModel | undefined;
|
|
249
|
+
declare const useDetailPanel: (href: string | Href, options?: HookOptions) => DetailModel<_beinformed_ui_models.DetailData, _beinformed_ui_models.DetailPanelContributions> | undefined;
|
|
250
|
+
declare const useQuicksearch: (href: string | Href, options?: HookOptions) => CaseSearchModel | undefined;
|
|
251
|
+
declare const useSearch: (href: string | Href, options?: HookOptions) => CaseSearchModel | undefined;
|
|
252
|
+
declare const useUserProfile: (href: string | Href, options?: HookOptions) => UserProfileModel | undefined;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Creates a ModularUIRequest with the locale as available in the redux store
|
|
256
|
+
*/
|
|
257
|
+
declare const useModularUIRequest: () => ((href: Href, options?: ModularUIRequestOptions) => ModularUIRequest);
|
|
258
|
+
|
|
259
|
+
declare const useNotification: () => {
|
|
260
|
+
render: boolean;
|
|
261
|
+
messageType: string | undefined;
|
|
262
|
+
message: MessageObject | undefined;
|
|
263
|
+
error: ErrorResponse | undefined;
|
|
264
|
+
dismiss: () => {
|
|
265
|
+
payload: undefined;
|
|
266
|
+
type: "DISMISS_NOTIFICATION";
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
declare const useErrorNotification: () => (message: MessageObject, error?: ErrorResponse) => Promise<_reduxjs_toolkit.PayloadAction<void, string, {
|
|
270
|
+
arg: ShowNotificationArguments;
|
|
271
|
+
requestId: string;
|
|
272
|
+
requestStatus: "fulfilled";
|
|
273
|
+
}, never> | _reduxjs_toolkit.PayloadAction<unknown, string, {
|
|
274
|
+
arg: ShowNotificationArguments;
|
|
275
|
+
requestId: string;
|
|
276
|
+
requestStatus: "rejected";
|
|
277
|
+
aborted: boolean;
|
|
278
|
+
condition: boolean;
|
|
279
|
+
} & ({
|
|
280
|
+
rejectedWithValue: true;
|
|
281
|
+
} | ({
|
|
282
|
+
rejectedWithValue: false;
|
|
283
|
+
} & {})), _reduxjs_toolkit.SerializedError>> & {
|
|
284
|
+
__linterBrands: "SafePromise";
|
|
285
|
+
} & {
|
|
286
|
+
abort: (reason?: string) => void;
|
|
287
|
+
requestId: string;
|
|
288
|
+
arg: ShowNotificationArguments;
|
|
289
|
+
unwrap: () => Promise<void>;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
declare const usePreference: (preferenceNames: string | string[]) => Pick<PreferencesState, string>;
|
|
293
|
+
|
|
294
|
+
declare const useProgressIndicator: () => {
|
|
295
|
+
start: () => {
|
|
296
|
+
payload: undefined;
|
|
297
|
+
type: "START_PROGRESS";
|
|
298
|
+
};
|
|
299
|
+
finish: () => {
|
|
300
|
+
payload: undefined;
|
|
301
|
+
type: "FINISH_PROGRESS";
|
|
302
|
+
};
|
|
303
|
+
reset: () => {
|
|
304
|
+
payload: undefined;
|
|
305
|
+
type: "RESET_PROGRESS";
|
|
306
|
+
};
|
|
307
|
+
update: (percentComplete: number) => {
|
|
308
|
+
payload: {
|
|
309
|
+
percentComplete: number;
|
|
310
|
+
};
|
|
311
|
+
type: "UPDATE_PROGRESS";
|
|
312
|
+
};
|
|
313
|
+
count: number;
|
|
314
|
+
timestamp: number;
|
|
315
|
+
percentComplete: number;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
declare const useLocation: () => RouterLocation | undefined;
|
|
319
|
+
declare const useLocationKey: () => string;
|
|
320
|
+
declare const useQuerystring: () => string | undefined;
|
|
321
|
+
declare const usePathname: () => string | undefined;
|
|
322
|
+
declare const useNavigation: () => {
|
|
323
|
+
push: (location: RouterLocation | string, state?: RootState) => {
|
|
324
|
+
payload: {
|
|
325
|
+
location: string | RouterLocation;
|
|
326
|
+
state: unknown;
|
|
327
|
+
};
|
|
328
|
+
type: "ROUTER/PUSH";
|
|
329
|
+
};
|
|
330
|
+
replace: (location: RouterLocation | string, state?: RootState) => {
|
|
331
|
+
payload: {
|
|
332
|
+
location: string | RouterLocation;
|
|
333
|
+
state: unknown;
|
|
334
|
+
};
|
|
335
|
+
type: "ROUTER/REPLACE";
|
|
336
|
+
};
|
|
337
|
+
go: (delta: number) => {
|
|
338
|
+
payload: {
|
|
339
|
+
delta: number;
|
|
340
|
+
};
|
|
341
|
+
type: "ROUTER/GO";
|
|
342
|
+
};
|
|
343
|
+
goBack: () => {
|
|
344
|
+
payload: undefined;
|
|
345
|
+
type: "ROUTER/GOBACK";
|
|
346
|
+
};
|
|
347
|
+
goForward: () => {
|
|
348
|
+
payload: undefined;
|
|
349
|
+
type: "ROUTER/GOFORWARD";
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
export { type SearchFilter, type UseModularUIBasicOptions, useApplication, useCaseView, useCompleteSource, useConceptDetail, useConceptIndex, useConceptSearch, useContent, useContentFromSourceReferences, useContentIndex, useContentSearch, useContentTOC, useContentType, useDeepCompareEffect, useDetailPanel, useEntryDate, useErrorNotification, useGroupingPanel, useList, useListDetail, useListOrDetail, useLocale, useLocaleCodes, useLocation, useLocationKey, useLogin, useLogout, useMessage, useModal, useModelCatalog, useModels, useModularUI, useModularUIBasic, useModularUIRequest, useNavigation, useNotification, usePanel, usePathname, usePreference, useProgressIndicator, useQuerystring, useQuicksearch, useRelatedConcepts, useRetrieveFormsOnModel, useSearch, useTab, useTranslate, useUserProfile };
|
|
@@ -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,I as M,J as N,K as O,L as P,M as Q,N as R,O as S,P as T,Q as U,R as V,S as W,T as X,U as Y,a,b,c,d,e as i,f as j,g as k,h as l,i as m,j as n,k as o,l as p,m as q,n as r,o as s,p as t,q as u,r as v,s as w,t as x,u as y,v as z,w as A,x as B,y as C,z as D}from"../chunk-UZIZDEU6.js";import{a as e,b as f,c as g,d as h}from"../chunk-RKGGCIUD.js";import"../chunk-Z2Y3OPVI.js";import"../chunk-Y7ESITVO.js";import"../chunk-JYAETKRB.js";import"../chunk-YJNJVQFW.js";import"../chunk-A4USB53Q.js";import"../chunk-WBPDMDW4.js";import"../chunk-6KRECIRI.js";import"../chunk-FW4363Y4.js";export{K as useApplication,o as useAttributeUpdate,M as useCaseView,D as useCompleteSource,z as useConceptDetail,y as useConceptIndex,G as useConceptSearch,C as useContent,j as useContentFromSourceReferences,A as useContentIndex,H as useContentSearch,B as useContentTOC,E as useContentType,k as useDeepCompareEffect,S as useDetailPanel,I as useEntryDate,X as useErrorNotification,m as useForm,n as useFormNavigation,R as useGroupingPanel,O as useList,Q as useListDetail,P as useListOrDetail,g as useLocale,h as useLocaleCodes,r as useLocation,s as useLocationKey,c as useLogin,d as useLogout,e as useMessage,q as useModal,x as useModelCatalog,J as useModels,l as useModularUI,w as useModularUIBasic,a as useModularUIRequest,v as useNavigation,W as useNotification,N as usePanel,u as usePathname,Y as usePreference,i as useProgressIndicator,t as useQuerystring,T as useQuicksearch,F as useRelatedConcepts,p as useRepeatableAttributeSet,b as useRetrieveFormsOnModel,U as useSearch,L as useTab,f as useTranslate,V as useUserProfile};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var Et=Object.create;var x=Object.defineProperty;var Tt=Object.getOwnPropertyDescriptor;var At=Object.getOwnPropertyNames;var $t=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty;var n=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),jt=(t,e)=>{for(var a in e)x(t,a,{get:e[a],enumerable:!0})},F=(t,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of At(e))!Lt.call(t,o)&&o!==a&&x(t,o,{get:()=>e[o],enumerable:!(r=Tt(e,o))||r.enumerable});return t};var I=(t,e,a)=>(a=t!=null?Et($t(t)):{},F(e||!t||!t.__esModule?x(a,"default",{value:t,enumerable:!0}):a,t)),Rt=t=>F(x({},"__esModule",{value:!0}),t);var K=n((rn,G)=>{"use strict";var Pt=typeof global=="object"&&global&&global.Object===Object&&global;G.exports=Pt});var k=n((nn,J)=>{"use strict";var Ft=K(),_t=typeof self=="object"&&self&&self.Object===Object&&self,qt=Ft||_t||Function("return this")();J.exports=qt});var A=n((on,W)=>{"use strict";var zt=k(),Bt=zt.Symbol;W.exports=Bt});var Q=n((sn,Z)=>{"use strict";var X=A(),Y=Object.prototype,Ut=Y.hasOwnProperty,Ht=Y.toString,b=X?X.toStringTag:void 0;function Vt(t){var e=Ut.call(t,b),a=t[b];try{t[b]=void 0;var r=!0}catch{}var o=Ht.call(t);return r&&(e?t[b]=a:delete t[b]),o}Z.exports=Vt});var te=n((ln,ee)=>{"use strict";var Gt=Object.prototype,Kt=Gt.toString;function Jt(t){return Kt.call(t)}ee.exports=Jt});var oe=n((dn,ne)=>{"use strict";var ae=A(),Wt=Q(),Xt=te(),Yt="[object Null]",Zt="[object Undefined]",re=ae?ae.toStringTag:void 0;function Qt(t){return t==null?t===void 0?Zt:Yt:re&&re in Object(t)?Wt(t):Xt(t)}ne.exports=Qt});var $=n((un,ie)=>{"use strict";function ea(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}ie.exports=ea});var le=n((cn,se)=>{"use strict";var ta=oe(),aa=$(),ra="[object AsyncFunction]",na="[object Function]",oa="[object GeneratorFunction]",ia="[object Proxy]";function sa(t){if(!aa(t))return!1;var e=ta(t);return e==na||e==oa||e==ra||e==ia}se.exports=sa});var ue=n((mn,de)=>{"use strict";var la=k(),da=la["__core-js_shared__"];de.exports=da});var ge=n((gn,me)=>{"use strict";var L=ue(),ce=function(){var t=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ua(t){return!!ce&&ce in t}me.exports=ua});var pe=n((hn,he)=>{"use strict";var ca=Function.prototype,ma=ca.toString;function ga(t){if(t!=null){try{return ma.call(t)}catch{}try{return t+""}catch{}}return""}he.exports=ga});var ve=n((pn,fe)=>{"use strict";var ha=le(),pa=ge(),fa=$(),va=pe(),ba=/[\\^$.*+?()[\]{}|]/g,Ca=/^\[object .+?Constructor\]$/,ya=Function.prototype,wa=Object.prototype,Ma=ya.toString,xa=wa.hasOwnProperty,ka=RegExp("^"+Ma.call(xa).replace(ba,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Sa(t){if(!fa(t)||pa(t))return!1;var e=ha(t)?ka:Ca;return e.test(va(t))}fe.exports=Sa});var Ce=n((fn,be)=>{"use strict";function Ia(t,e){return t?.[e]}be.exports=Ia});var j=n((vn,ye)=>{"use strict";var Ea=ve(),Ta=Ce();function Aa(t,e){var a=Ta(t,e);return Ea(a)?a:void 0}ye.exports=Aa});var C=n((bn,we)=>{"use strict";var $a=j(),La=$a(Object,"create");we.exports=La});var ke=n((Cn,xe)=>{"use strict";var Me=C();function ja(){this.__data__=Me?Me(null):{},this.size=0}xe.exports=ja});var Ie=n((yn,Se)=>{"use strict";function Ra(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}Se.exports=Ra});var Te=n((wn,Ee)=>{"use strict";var Oa=C(),Na="__lodash_hash_undefined__",Da=Object.prototype,Pa=Da.hasOwnProperty;function Fa(t){var e=this.__data__;if(Oa){var a=e[t];return a===Na?void 0:a}return Pa.call(e,t)?e[t]:void 0}Ee.exports=Fa});var $e=n((Mn,Ae)=>{"use strict";var _a=C(),qa=Object.prototype,za=qa.hasOwnProperty;function Ba(t){var e=this.__data__;return _a?e[t]!==void 0:za.call(e,t)}Ae.exports=Ba});var je=n((xn,Le)=>{"use strict";var Ua=C(),Ha="__lodash_hash_undefined__";function Va(t,e){var a=this.__data__;return this.size+=this.has(t)?0:1,a[t]=Ua&&e===void 0?Ha:e,this}Le.exports=Va});var Oe=n((kn,Re)=>{"use strict";var Ga=ke(),Ka=Ie(),Ja=Te(),Wa=$e(),Xa=je();function m(t){var e=-1,a=t==null?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}m.prototype.clear=Ga;m.prototype.delete=Ka;m.prototype.get=Ja;m.prototype.has=Wa;m.prototype.set=Xa;Re.exports=m});var De=n((Sn,Ne)=>{"use strict";function Ya(){this.__data__=[],this.size=0}Ne.exports=Ya});var Fe=n((In,Pe)=>{"use strict";function Za(t,e){return t===e||t!==t&&e!==e}Pe.exports=Za});var y=n((En,_e)=>{"use strict";var Qa=Fe();function er(t,e){for(var a=t.length;a--;)if(Qa(t[a][0],e))return a;return-1}_e.exports=er});var ze=n((Tn,qe)=>{"use strict";var tr=y(),ar=Array.prototype,rr=ar.splice;function nr(t){var e=this.__data__,a=tr(e,t);if(a<0)return!1;var r=e.length-1;return a==r?e.pop():rr.call(e,a,1),--this.size,!0}qe.exports=nr});var Ue=n((An,Be)=>{"use strict";var or=y();function ir(t){var e=this.__data__,a=or(e,t);return a<0?void 0:e[a][1]}Be.exports=ir});var Ve=n(($n,He)=>{"use strict";var sr=y();function lr(t){return sr(this.__data__,t)>-1}He.exports=lr});var Ke=n((Ln,Ge)=>{"use strict";var dr=y();function ur(t,e){var a=this.__data__,r=dr(a,t);return r<0?(++this.size,a.push([t,e])):a[r][1]=e,this}Ge.exports=ur});var We=n((jn,Je)=>{"use strict";var cr=De(),mr=ze(),gr=Ue(),hr=Ve(),pr=Ke();function g(t){var e=-1,a=t==null?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}g.prototype.clear=cr;g.prototype.delete=mr;g.prototype.get=gr;g.prototype.has=hr;g.prototype.set=pr;Je.exports=g});var Ye=n((Rn,Xe)=>{"use strict";var fr=j(),vr=k(),br=fr(vr,"Map");Xe.exports=br});var et=n((On,Qe)=>{"use strict";var Ze=Oe(),Cr=We(),yr=Ye();function wr(){this.size=0,this.__data__={hash:new Ze,map:new(yr||Cr),string:new Ze}}Qe.exports=wr});var at=n((Nn,tt)=>{"use strict";function Mr(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}tt.exports=Mr});var w=n((Dn,rt)=>{"use strict";var xr=at();function kr(t,e){var a=t.__data__;return xr(e)?a[typeof e=="string"?"string":"hash"]:a.map}rt.exports=kr});var ot=n((Pn,nt)=>{"use strict";var Sr=w();function Ir(t){var e=Sr(this,t).delete(t);return this.size-=e?1:0,e}nt.exports=Ir});var st=n((Fn,it)=>{"use strict";var Er=w();function Tr(t){return Er(this,t).get(t)}it.exports=Tr});var dt=n((_n,lt)=>{"use strict";var Ar=w();function $r(t){return Ar(this,t).has(t)}lt.exports=$r});var ct=n((qn,ut)=>{"use strict";var Lr=w();function jr(t,e){var a=Lr(this,t),r=a.size;return a.set(t,e),this.size+=a.size==r?0:1,this}ut.exports=jr});var gt=n((zn,mt)=>{"use strict";var Rr=et(),Or=ot(),Nr=st(),Dr=dt(),Pr=ct();function h(t){var e=-1,a=t==null?0:t.length;for(this.clear();++e<a;){var r=t[e];this.set(r[0],r[1])}}h.prototype.clear=Rr;h.prototype.delete=Or;h.prototype.get=Nr;h.prototype.has=Dr;h.prototype.set=Pr;mt.exports=h});var ft=n((Bn,pt)=>{"use strict";var ht=gt(),Fr="Expected a function";function R(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Fr);var a=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=a.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return a.cache=i.set(o,u)||i,u};return a.cache=new(R.Cache||ht),a}R.Cache=ht;pt.exports=R});var Gr={};jt(Gr,{Locale:()=>c,Locales:()=>d,availableLocales:()=>v,createLocalesWithConfiguredErrors:()=>Dt,languages:()=>E,setI18n:()=>Vr});module.exports=Rt(Gr);var E={attribute:{name:0,nativeName:1},rtl:{ar:1,dv:1,fa:1,ha:1,he:1,ks:1,ku:1,ps:1,ur:1,yi:1},lang:{aa:["Afar","Afar"],ab:["Abkhazian","\u0410\u04A7\u0441\u0443\u0430"],af:["Afrikaans","Afrikaans"],ak:["Akan","Akana"],am:["Amharic","\u12A0\u121B\u122D\u129B"],an:["Aragonese","Aragon\xE9s"],ar:["Arabic","\u0627\u0644\u0639\u0631\u0628\u064A\u0629"],as:["Assamese","\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE"],av:["Avar","\u0410\u0432\u0430\u0440"],ay:["Aymara","Aymar"],az:["Azerbaijani","Az\u0259rbaycanca / \u0622\u0630\u0631\u0628\u0627\u064A\u062C\u0627\u0646"],ba:["Bashkir","\u0411\u0430\u0448\u04A1\u043E\u0440\u0442"],be:["Belarusian","\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F"],bg:["Bulgarian","\u0411\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438"],bh:["Bihari","\u092D\u094B\u091C\u092A\u0941\u0930\u0940"],bi:["Bislama","Bislama"],bm:["Bambara","Bamanankan"],bn:["Bengali","\u09AC\u09BE\u0982\u09B2\u09BE"],bo:["Tibetan","\u0F56\u0F7C\u0F51\u0F0B\u0F61\u0F72\u0F42 / Bod skad"],br:["Breton","Brezhoneg"],bs:["Bosnian","Bosanski"],ca:["Catalan","Catal\xE0"],ce:["Chechen","\u041D\u043E\u0445\u0447\u0438\u0439\u043D"],ch:["Chamorro","Chamoru"],co:["Corsican","Corsu"],cr:["Cree","Nehiyaw"],cs:["Czech","\u010Cesky"],cu:["Old Church Slavonic / Old Bulgarian","\u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A / slov\u011Bn\u012Dsk\u016D"],cv:["Chuvash","\u0427\u0103\u0432\u0430\u0448"],cy:["Welsh","Cymraeg"],da:["Danish","Dansk"],de:["German","Deutsch"],dv:["Divehi","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0784\u07A6\u0790\u07B0"],dz:["Dzongkha","\u0F47\u0F7C\u0F44\u0F0B\u0F41"],ee:["Ewe","\u0190\u028B\u025B"],el:["Greek","\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"],en:["English","English"],eo:["Esperanto","Esperanto"],es:["Spanish","Espa\xF1ol"],et:["Estonian","Eesti"],eu:["Basque","Euskara"],fa:["Persian","\u0641\u0627\u0631\u0633\u06CC"],ff:["Peul","Fulfulde"],fi:["Finnish","Suomi"],fj:["Fijian","Na Vosa Vakaviti"],fo:["Faroese","F\xF8royskt"],fr:["French","Fran\xE7ais"],fy:["West Frisian","Frysk"],ga:["Irish","Gaeilge"],gd:["Scottish Gaelic","G\xE0idhlig"],gl:["Galician","Galego"],gn:["Guarani","Ava\xF1e'\u1EBD"],gu:["Gujarati","\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0"],gv:["Manx","Gaelg"],ha:["Hausa","\u0647\u064E\u0648\u064F\u0633\u064E"],he:["Hebrew","\u05E2\u05D1\u05E8\u05D9\u05EA"],hi:["Hindi","\u0939\u093F\u0928\u094D\u0926\u0940"],ho:["Hiri Motu","Hiri Motu"],hr:["Croatian","Hrvatski"],ht:["Haitian","Kr\xE8yol ayisyen"],hu:["Hungarian","Magyar"],hy:["Armenian","\u0540\u0561\u0575\u0565\u0580\u0565\u0576"],hz:["Herero","Otsiherero"],ia:["Interlingua","Interlingua"],id:["Indonesian","Bahasa Indonesia"],ie:["Interlingue","Interlingue"],ig:["Igbo","Igbo"],ii:["Sichuan Yi","\uA187\uA259 / \u56DB\u5DDD\u5F5D\u8BED"],ik:["Inupiak","I\xF1upiak"],io:["Ido","Ido"],is:["Icelandic","\xCDslenska"],it:["Italian","Italiano"],iu:["Inuktitut","\u1403\u14C4\u1483\u144E\u1450\u1466"],ja:["Japanese","\u65E5\u672C\u8A9E"],jv:["Javanese","Basa Jawa"],ka:["Georgian","\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8"],kg:["Kongo","KiKongo"],ki:["Kikuyu","G\u0129k\u0169y\u0169"],kj:["Kuanyama","Kuanyama"],kk:["Kazakh","\u049A\u0430\u0437\u0430\u049B\u0448\u0430"],kl:["Greenlandic","Kalaallisut"],km:["Cambodian","\u1797\u17B6\u179F\u17B6\u1781\u17D2\u1798\u17C2\u179A"],kn:["Kannada","\u0C95\u0CA8\u0CCD\u0CA8\u0CA1"],ko:["Korean","\uD55C\uAD6D\uC5B4"],kr:["Kanuri","Kanuri"],ks:["Kashmiri","\u0915\u0936\u094D\u092E\u0940\u0930\u0940 / \u0643\u0634\u0645\u064A\u0631\u064A"],ku:["Kurdish","Kurd\xEE / \u0643\u0648\u0631\u062F\u06CC"],kv:["Komi","\u041A\u043E\u043C\u0438"],kw:["Cornish","Kernewek"],ky:["Kirghiz","K\u0131rg\u0131zca / \u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430"],la:["Latin","Latina"],lb:["Luxembourgish","L\xEBtzebuergesch"],lg:["Ganda","Luganda"],li:["Limburgian","Limburgs"],ln:["Lingala","Ling\xE1la"],lo:["Laotian","\u0EA5\u0EB2\u0EA7 / Pha xa lao"],lt:["Lithuanian","Lietuvi\u0173"],lv:["Latvian","Latvie\u0161u"],mg:["Malagasy","Malagasy"],mh:["Marshallese","Kajin Majel / Ebon"],mi:["Maori","M\u0101ori"],mk:["Macedonian","\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438"],ml:["Malayalam","\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02"],mn:["Mongolian","\u041C\u043E\u043D\u0433\u043E\u043B"],mo:["Moldovan","Moldoveneasc\u0103"],mr:["Marathi","\u092E\u0930\u093E\u0920\u0940"],ms:["Malay","Bahasa Melayu"],mt:["Maltese","bil-Malti"],my:["Burmese","Myanmasa"],na:["Nauruan","Dorerin Naoero"],nd:["North Ndebele","Sindebele"],ne:["Nepali","\u0928\u0947\u092A\u093E\u0932\u0940"],ng:["Ndonga","Oshiwambo"],nl:["Dutch","Nederlands"],nn:["Norwegian Nynorsk","Norsk (nynorsk)"],no:["Norwegian","Norsk (bokm\xE5l / riksm\xE5l)"],nr:["South Ndebele","isiNdebele"],nv:["Navajo","Din\xE9 bizaad"],ny:["Chichewa","Chi-Chewa"],oc:["Occitan","Occitan"],oj:["Ojibwa","\u140A\u14C2\u1511\u14C8\u142F\u14A7\u140E\u14D0 / Anishinaabemowin"],om:["Oromo","Oromoo"],or:["Oriya","\u0B13\u0B21\u0B3C\u0B3F\u0B06"],os:["Ossetian / Ossetic","\u0418\u0440\u043E\u043D\u0430\u0443"],pa:["Panjabi / Punjabi","\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40 / \u092A\u0902\u091C\u093E\u092C\u0940 / \u067E\u0646\u062C\u0627\u0628\u064A"],pi:["Pali","P\u0101li / \u092A\u093E\u0934\u093F"],pl:["Polish","Polski"],ps:["Pashto","\u067E\u069A\u062A\u0648"],pt:["Portuguese","Portugu\xEAs"],qu:["Quechua","Runa Simi"],rm:["Raeto Romance","Rumantsch"],rn:["Kirundi","Kirundi"],ro:["Romanian","Rom\xE2n\u0103"],ru:["Russian","\u0420\u0443\u0441\u0441\u043A\u0438\u0439"],rw:["Rwandi","Kinyarwandi"],sa:["Sanskrit","\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D"],sc:["Sardinian","Sardu"],sd:["Sindhi","\u0938\u093F\u0928\u0927\u093F"],se:["Northern Sami","S\xE1megiella"],sg:["Sango","S\xE4ng\xF6"],sh:["Serbo-Croatian","Srpskohrvatski / \u0421\u0440\u043F\u0441\u043A\u043E\u0445\u0440\u0432\u0430\u0442\u0441\u043A\u0438"],si:["Sinhalese","\u0DC3\u0DD2\u0D82\u0DC4\u0DBD"],sk:["Slovak","Sloven\u010Dina"],sl:["Slovenian","Sloven\u0161\u010Dina"],sm:["Samoan","Gagana Samoa"],sn:["Shona","chiShona"],so:["Somalia","Soomaaliga"],sq:["Albanian","Shqip"],sr:["Serbian","\u0421\u0440\u043F\u0441\u043A\u0438"],ss:["Swati","SiSwati"],st:["Southern Sotho","Sesotho"],su:["Sundanese","Basa Sunda"],sv:["Swedish","Svenska"],sw:["Swahili","Kiswahili"],ta:["Tamil","\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"],te:["Telugu","\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"],tg:["Tajik","\u0422\u043E\u04B7\u0438\u043A\u04E3"],th:["Thai","\u0E44\u0E17\u0E22 / Phasa Thai"],ti:["Tigrinya","\u1275\u130D\u122D\u129B"],tk:["Turkmen","\u0422\u0443\u0440\u043A\u043C\u0435\u043D / \u062A\u0631\u0643\u0645\u0646"],tl:["Tagalog / Filipino","Tagalog"],tn:["Tswana","Setswana"],to:["Tonga","Lea Faka-Tonga"],tr:["Turkish","T\xFCrk\xE7e"],ts:["Tsonga","Xitsonga"],tt:["Tatar","Tatar\xE7a"],tw:["Twi","Twi"],ty:["Tahitian","Reo M\u0101`ohi"],ug:["Uyghur","Uy\u01A3urq\u0259 / \u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5"],uk:["Ukrainian","\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"],ur:["Urdu","\u0627\u0631\u062F\u0648"],uz:["Uzbek","\u040E\u0437\u0431\u0435\u043A"],ve:["Venda","Tshiven\u1E13a"],vi:["Vietnamese","Ti\u1EBFng Vi\u1EC7t"],vo:["Volap\xFCk","Volap\xFCk"],wa:["Walloon","Walon"],wo:["Wolof","Wollof"],xh:["Xhosa","isiXhosa"],yi:["Yiddish","\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9"],yo:["Yoruba","Yor\xF9b\xE1"],za:["Zhuang","Cuengh / T\xF4\xF4 / \u58EE\u8BED"],zh:["Chinese","\u4E2D\u6587"],zu:["Zulu","isiZulu"],pap:["Papiamento","Papiamento"]}};var _=require("@beinformed/ui/exceptions"),q=require("@beinformed/ui/settings"),T=I(require("format-message"),1),z=require("immer");var c=class{[z.immerable]=!0;#r;#e;#t;#a;constructor(e){this.#r=e.code,this.#e=this.fixPlaceHoldersInObject(e.messages),this.#t=this.fixPlaceHoldersInObject(e.errors),this.#a=e.nativeName,T.default.setup({missingTranslation:"ignore"})}get code(){return this.#r}get nativeName(){if(this.#a)return this.#a;let e=this.code.split("-");if(e.length>0){let a=e[0];if(a){let r=E.lang[a];if(r)return r[1]+(e[1]?` (${e[1].toUpperCase()})`:"")}}throw new _.IllegalStateException(`Can not find language name based on locale: ${this.code}`)}fixPlaceHolders(e){return typeof e=="string"?e.replace(/'\$\{(?<key>.*?)}'/g,"''{$<key>}''").replace(/\$\{(?<key>.*?)}/g,"{$<key>}"):null}fixPlaceHoldersInObject(e={}){return JSON.parse(JSON.stringify(e).replace(/'\$\{(?<key>.*?)}'/g,"''{$<key>}''").replace(/\$\{(?<key>.*?)}/g,"{$<key>}"))}getBaseMessage(e,a){if(!e&&!a)return"[message: id or defaultMessage missing]";let r=this.#e[e]||this.#t[e];return(typeof process>"u"||process.env.NODE_ENV!=="production")&&!r&&e&&(0,q.getBooleanSetting)("DEBUG_I18N_MESSAGE_NOT_FOUND")&&console.debug(`Message with id ${e} not found for locale ${this.code} in layout translations`),r||this.fixPlaceHolders(a)||e}formatMessage(e,a){return a?(0,T.default)(e,a):e}getMessage(e,a,r){let o=this.getBaseMessage(e,a);return this.formatMessage(o,r)}update(e={},a={}){this.#e={...this.#e,...this.fixPlaceHoldersInObject(e)},this.#t={...this.#t,...this.fixPlaceHoldersInObject(a)}}};var H=require("@beinformed/ui/exceptions"),V=require("@beinformed/ui/models");var B={"Constraint.Attribute.IncorrectValue":"Incorrect value","Constraint.Boolean.InvalidValue":"Invalid boolean value, only values 'true' or 'false' are valid","Constraint.BSN.InvalidFormat":"Must be a valid BSN","Constraint.Captcha.InvalidToken":"The captcha is invalid","Constraint.Choice.ConflictingAnswer":"Cannot select '${answer-option-key}' because this is not a relevant option, given the other answers","Constraint.Choice.ConflictingOptions":"Cannot select '${answer-option-key1}' and '${answer-option-key2}' at the same time","Constraint.Choice.InvalidOption":"Allowed options are: ${options}","Constraint.Choice.InvalidOption.General":"Value '${value}' is not allowed","Constraint.Choice.MultipleNotAllowed":"Selecting multiple options is not allowed","Constraint.ConfirmCurrentPassword.Invalid":"Must match the current password","Constraint.Date.AboveMaximum":"Must be on or before ${max-date}","Constraint.Date.BelowMinimum":"Must be on or after ${min-date}","Constraint.Date.InvalidFormat":"Must be entered in the format ${format}","Constraint.Date.NotOnDate":"Must be on ${date}","Constraint.Date.OutOfRange":"Must be between ${min-date} and ${max-date}","Constraint.DateRange.InvalidRange":"Start date must be before end date","Constraint.DateRange.Mandatory":"Field is mandatory: must contain at least a start or end date","Constraint.DateTime.AboveMaximum":"Must be before ${max-date-time}","Constraint.DateTime.BelowMinimum":"Must be at ${min-date-time} or after","Constraint.DateTime.InvalidFormat":"Must be entered in the format ${format}","Constraint.DateTime.OutOfRange":"Must be between ${min-date-time} and ${max-date-time}","Constraint.DateTimeRange.InvalidRange":"Start date-time must be before end date-time","Constraint.DateTimeRange.Mandatory":"Field is mandatory: must contain at least a start or end date-time","Constraint.Document.MimeTypeNotAllowed":"The document mime type is not valid for the selected document type","Constraint.Email.InvalidFormat":"Must be a valid e-mail address","Constraint.File.DataEmpty":"File does not exist or has no content","Constraint.File.InvalidExtension":"Allowed extensions are: ${extensions}","Constraint.File.InvalidFormat":"Must meet the requirements of the file name","Constraint.File.InvalidMimeType":"Allowed mime types are: ${mime-types}","Constraint.File.MaxFileSizeExceeded":"Maximum file upload size is ${max-filesize}","Constraint.File.OnlyAllowsOneFile":"Only one file is allowed","Constraint.IBAN.InvalidFormat":"Must be a valid IBAN number","Constraint.InvalidLengthBetween":"Length must be between ${min-length} and ${max-length} characters","Constraint.InvalidLengthExact":"Length must be precisely ${length} characters","Constraint.InvalidLengthTooLong":"Length must not be larger than ${max-length} characters","Constraint.InvalidLengthTooShort":"Length must be at least ${min-length} characters","Constraint.InvalidRegularExpression":"The value is not according the given regular expression ${regexp}","Constraint.Mandatory":"Field is mandatory","Constraint.Missing":"Field is mandatory","Constraint.Number.AboveMaximum":"Must be at most ${max-number}","Constraint.Number.BelowMinimum":"Must be at least ${min-number}","Constraint.Number.InvalidDecimal":"Must be a number with up to ${max-digits} decimal places","Constraint.Number.InvalidInteger":"Must be a whole number","Constraint.Number.InvalidLong":"Must be a whole number","Constraint.Number.OutOfRange":"Must be between ${min-number} and ${max-number}","Constraint.NumberRange.BothFieldsMandatory":"Must contain start and end value","Constraint.NumberRange.InvalidRange":"Start value must be less than the end value","Constraint.NumberRange.Mandatory":"Field is mandatory: must contain at least a start or end value","Constraint.Password.AlreadyUsed":"Must not have been used before","Constraint.Password.LowerAndUpperCaseMandatory":"Must contain both upper and lowercase characters","Constraint.Password.MinNumericCharactersMandatory":"Must contain ${min-numeric} or more numerical characters","Constraint.Password.MinSpecialCharactersMandatory":"Must contain ${min-special} or more special characters","Constraint.Password.ThreeConsecutiveCharactersNotAllowed":"Must not contain any character more than twice consecutively","Constraint.Password.Unchanged":"Must not be the same as the old password","Constraint.Password.UserNameSubstringNotAllowed":"Must not have 5 consecutive characters from username","Constraint.SortParameter.InvalidValue":"Invalid sort parameter. Allowed values: field+[asc|desc]","Constraint.Time.InvalidFormat":"Must be entered in the format ${format}","Constraint.TimeRange.InvalidRange":"Start time must be before end time","Constraint.TimeRange.Mandatory":"Field is mandatory: must contain at least a start or end time","Constraint.TimeStamp.AboveMaximum":"Must be on or before ${max-date}","Constraint.TimeStamp.BelowMinimum":"Must be on or after ${min-date}","Constraint.Timestamp.InvalidFormat":"Must be entered in the format ${format}","Constraint.TimeStampRange.InvalidRange":"Start value must be before end value","Constraint.TimeStampRange.Mandatory":"Field is mandatory: must contain at least a start or end value","Constraint.XML.InvalidFormat":"Must be well-formed XML","Constraint.ZipCode.InvalidFormat":"Must be a valid Dutch ZIP code, e.g. 1234AB","Error.AcceptHeaderRequired":"The 'Accept' request-header field must be provided","Error.Authentication.BlockedUser":"You have been logged out, because your account has been blocked","Error.Authentication.ConcurrentUser":"You have been logged out, since your username has been used at a different location.","Error.Authentication.InvalidCredentials":"Authentication failed","Error.Authentication.InvalidUsername":"You have been logged out, because your username is not valid anymore","Error.Authentication.Required":"Authentication is required","Error.Case.ConcurrentModification":"Another user has updated a case used in this task. As a result, this task can not be completed.","Error.ChangePasswordRequired":"User password is initial or expired, and must be changed ","Error.CodemapLookup.InvalidToken":"Token for codemap lookup is not valid","Error.DataStore.ConcurrentModification":"Another user has updated a record used in this task","Error.DataStore.RecordAlreadyExists":"","Error.DataStore.RowCannotBeLocked":"Another user has already locked a record used in this task","Error.Form.DataNotAvailableForId":"Service can not be completed, data not available for mandatory element ${elementid}","Error.Form.ObjectNotAllowed":"Object '${objectid}' is not allowed","Error.Form.ReadOnlyElementId":"Element '${elementid}' is read only","Error.Form.TooManyObjects":"Too many objects '${objectid}' provided","Error.Form.UndefinedElementId":"Undefined element '${elementid}'","Error.Form.UndefinedObject":"Undefined object(s) '${objectid}'","Error.GeneralError":"An unexpected error occurred","Error.MethodNotAllowed":"The given HTTP method is not allowed for this resource","Error.Parameter.InvalidValue":"The parameter contains characters that are not allowed","Error.Parameter.Mandatory":"Parameter ${parameter} is mandatory","Error.Parameter.NotAllowed":"Parameter '${parameter}' is not allowed","Error.ResourceNotFound":"The requested resource cannot be found","Validation.StandardCreateAndUpdateUserTask.PasswordsDoNotMatch":"Password and password confirmation do not match.","Validation.StandardCreateAndUpdateUserTask.UserEmailAlreadyExists":"A user with email address '${Email}' already exists","Validation.StandardCreateAndUpdateUserTask.UserNameAlreadyExists":"A user with username '${Username}' already exists","Validation.StandardCreateOrganizationTask.OrganizationAlreadyExists":"An organization with id '${ID}' already exists"};var U={"Constraint.Attribute.IncorrectValue":"Ongeldige waarde","Constraint.Boolean.InvalidValue":"Waarde voldoet niet aan het boolean formaat, alleen waarden 'true' en 'false' zijn toegestaan","Constraint.BSN.InvalidFormat":"Moet een geldig BSN zijn","Constraint.Captcha.InvalidToken":"Captcha is niet correct","Constraint.Choice.ConflictingAnswer":"'${answer-option-key}' kan niet worden gekozen omdat dit geen relevante optie is, gegeven de andere antwoorden","Constraint.Choice.ConflictingOptions":"'${answer-option-key1}' and '${answer-option-key2}' kunnen niet tegelijkertijd worden gekozen","Constraint.Choice.InvalidOption":"Toegestane waarden zijn: ${options}","Constraint.Choice.InvalidOption.General":"Waarde '${value}' is niet toegestaan","Constraint.Choice.MultipleNotAllowed":"Meerdere opties selecteren is niet toegestaan","Constraint.ConfirmCurrentPassword.Invalid":"Moet overeenkomen met het huidige wachtwoord","Constraint.Date.AboveMaximum":"Moet op of voor ${max-date} liggen","Constraint.Date.BelowMinimum":"Moet op of na ${min-date} liggen","Constraint.Date.InvalidFormat":"Moet worden opgegeven in het formaat ${format}","Constraint.Date.NotOnDate":"Moet op ${date} liggen","Constraint.Date.OutOfRange":"Moet tussen ${min-date} en ${max-date} liggen","Constraint.DateRange.InvalidRange":"De begindatum dient voor de einddatum te liggen","Constraint.DateRange.Mandatory":"Veld is verplicht: moet tenminste begin- of einddatum bevatten","Constraint.DateTime.AboveMaximum":"Moet voor ${max-date-time} liggen","Constraint.DateTime.BelowMinimum":"Moet op ${min-date-time} of later liggen","Constraint.DateTime.InvalidFormat":"Moet worden opgegeven in het formaat ${format}","Constraint.DateTime.OutOfRange":"Moet tussen ${min-date-time} en ${max-date-time} liggen","Constraint.DateTimeRange.InvalidRange":"De begindatumtijd dient voor de einddatumtijd te liggen","Constraint.DateTimeRange.Mandatory":"Veld is verplicht: moet tenminste begin- of einddatumtijd bevatten","Constraint.Document.MimeTypeNotAllowed":"Het document mime type voldoet niet aan het document type","Constraint.Email.InvalidFormat":"Moet een geldig emailadres zijn","Constraint.File.DataEmpty":"Bestand bestaat niet of heeft geen inhoud","Constraint.File.InvalidExtension":"Toegestane extensies zijn: ${extensions}","Constraint.File.InvalidFormat":"Voldoet niet aan de voorwaarden van een bestandsnaam","Constraint.File.InvalidMimeType":"Toegestane mime-types zijn: ${mime-types}","Constraint.File.MaxFileSizeExceeded":"De maximum file grootte voor upload is ${max-filesize}","Constraint.File.OnlyAllowsOneFile":"Er is slechts \xE9\xE9n bestand toegestaan","Constraint.IBAN.InvalidFormat":"Moet een geldig IBAN nummer zijn","Constraint.InvalidLengthBetween":"Lengte moet tussen ${min-length} en ${max-length} karakters liggen","Constraint.InvalidLengthExact":"Lengte moet precies ${length} karakters zijn","Constraint.InvalidLengthTooLong":"Lengte mag niet langer dan ${max-length} karakters zijn","Constraint.InvalidLengthTooShort":"Lengte moet tenminste ${min-length} karakters zijn","Constraint.InvalidRegularExpression":"De waarde voldoet niet aan de reguliere expressie ${regexp}","Constraint.Mandatory":"Veld is verplicht","Constraint.Missing":"Veld is verplicht","Constraint.Number.AboveMaximum":"Mag niet groter dan ${max-number} zijn","Constraint.Number.BelowMinimum":"Moet minstens ${min-number} zijn","Constraint.Number.InvalidDecimal":"Moet een getal zijn met maximaal ${max-digits} decimalen","Constraint.Number.InvalidInteger":"Moet een geheel getal zijn","Constraint.Number.InvalidLong":"Moet een geheel getal zijn","Constraint.Number.OutOfRange":"Moet tussen ${min-number} en ${max-number} liggen","Constraint.NumberRange.BothFieldsMandatory":"Moet zowel een begin- als een eindwaarde bevatten","Constraint.NumberRange.InvalidRange":"De beginwaarde dient kleiner te zijn dan de eindwaarde","Constraint.NumberRange.Mandatory":"Veld is verplicht: moet tenminste begin- of eindwaarde bevatten","Constraint.Password.AlreadyUsed":"Mag niet eerder zijn gebruikt","Constraint.Password.LowerAndUpperCaseMandatory":"Moet zowel hoofdletters als kleine letters bevatten","Constraint.Password.MinNumericCharactersMandatory":"Moet ${min-numeric} of meer numerieke karakters bevatten","Constraint.Password.MinSpecialCharactersMandatory":"Moet ${min-special} of meer speciale karakters bevatten","Constraint.Password.ThreeConsecutiveCharactersNotAllowed":"Mag niet meer dan twee dezelfde karakters achter elkaar bevatten","Constraint.Password.Unchanged":"Mag niet hetzelfde zijn als het oude wachtwoord","Constraint.Password.UserNameSubstringNotAllowed":"Mag niet vijf opeenvolgende karakters van de gebruikersnaam bevatten","Constraint.SortParameter.InvalidValue":"Ongeldige sorteerparameter. Toegestane waardes: veld+[asc|desc]","Constraint.Time.InvalidFormat":"Moet worden opgegeven in het formaat ${format}","Constraint.TimeRange.InvalidRange":"De begintijd dient voor de eindtijd te liggen","Constraint.TimeRange.Mandatory":"Veld is verplicht: moet tenminste begin- of eindtijd bevatten","Constraint.TimeStamp.AboveMaximum":"Moet op of voor ${max-date} liggen","Constraint.TimeStamp.BelowMinimum":"Moet op of na ${min-date} liggen","Constraint.Timestamp.InvalidFormat":"Moet worden opgegeven in het formaat ${format}","Constraint.TimeStampRange.InvalidRange":"De beginwaarde dient voor de eindwaarde te liggen","Constraint.TimeStampRange.Mandatory":"Veld is verplicht: moet tenminste begin- of eindwaarde bevatten","Constraint.XML.InvalidFormat":"Moet geldige XML zijn","Constraint.ZipCode.InvalidFormat":"Moet een geldige postcode zijn, bijvoorbeeld 1234AB","Error.AcceptHeaderRequired":"De 'Accept' request-header moet worden meegegeven","Error.Authentication.BlockedUser":"U bent uitgelogd omdat uw account geblokkeerd is","Error.Authentication.ConcurrentUser":"U bent uitgelogd omdat uw gebruikersnaam op een andere locatie is gebruikt om in te loggen.","Error.Authentication.InvalidCredentials":"Inloggen is mislukt","Error.Authentication.InvalidUsername":"U bent uitgelogd omdat uw gebruikersnaam niet meer geldig is","Error.Authentication.Required":"Autorisatie is vereist","Error.Case.ConcurrentModification":"Een andere gebruiker heeft het dossier aangepast waardoor deze taak nu niet meer is toegestaan","Error.ChangePasswordRequired":"Gebruikerswachtwoord is initieel of verlopen, en moet worden aangepast","Error.CodemapLookup.InvalidToken":"Token voor keuzelijst lookup is niet valide","Error.DataStore.ConcurrentModification":"Een andere gebruiker heeft de rij in de datastore reeds aangepast","Error.DataStore.RecordAlreadyExists":"","Error.DataStore.RowCannotBeLocked":"Een andere gebruiker heeft de rij in bewerking en daarom kan deze taak niet worden volbracht.","Error.Form.DataNotAvailableForId":"Service kan niet worden afgrond, data voor verplicht element ${elementid} is niet beschikbaar","Error.Form.ObjectNotAllowed":"Object '${objectid}' is niet toegestaan","Error.Form.ReadOnlyElementId":"Element '${elementid}' is alleen lezen","Error.Form.TooManyObjects":"Te veel objecten '${objectid}' aangeleverd","Error.Form.UndefinedElementId":"Element '${elementid}' is ongedefinieerd","Error.Form.UndefinedObject":"Object(en) '${objectid}' ongedefinieerd","Error.GeneralError":"Er is een onverwachte fout opgetreden","Error.MethodNotAllowed":"De opgegeven HTTP methode is niet toegestaan op deze resource","Error.Parameter.InvalidValue":"De parameter bevat karakters die niet zijn toegestaan","Error.Parameter.Mandatory":"De parameter ${parameter} is verplicht","Error.Parameter.NotAllowed":"Parameter '${parameter}' is niet toegestaan","Error.ResourceNotFound":"De opgevraagde resource kan niet worden gevonden","Validation.StandardCreateAndUpdateUserTask.PasswordsDoNotMatch":"Het wachtwoord en de wachtwoordbevestiging komen niet overeen","Validation.StandardCreateAndUpdateUserTask.UserEmailAlreadyExists":"Een gebruiker met e-mailadres '${Email}' bestaat al","Validation.StandardCreateAndUpdateUserTask.UserNameAlreadyExists":"Een gebruiker met gebruikersnaam '${Username}' bestaat al","Validation.StandardCreateOrganizationTask.OrganizationAlreadyExists":"Een organisatie met id '${ID}' bestaat al"};var v=[{code:"en",messages:{},errors:B},{code:"nl",messages:{},errors:U}],Dt=t=>v.map(e=>t[e.code]?{...e,errors:{...e.errors,...t[e.code]}}:e),d=class t extends V.BaseCollection{constructor(e=v){super(e.map(a=>new c(a)))}static rehydrate(e){return e&&e.collection?new t(e.collection.map(a=>({code:a.code,messages:a.messages,errors:a.errors}))):new t([])}hasLocale(e){return this.some(a=>e.startsWith(a.code))}getLocale(e){if(this.hasLocale(e)){let a=this.find(r=>e.startsWith(r.code));if(a)return a}throw new H.IllegalArgumentException(`Locale configuration for locale ${e} not found`)}get availableLocaleCodes(){return this.map(e=>e.code)}getPreferredLocale(e){if(e!=null){let r=(e.match(/[-A-Za-z]{2,10}/gu)||[]).filter(o=>this.availableLocaleCodes.some(i=>o.startsWith(i))).map(o=>this.availableLocaleCodes.find(i=>o.startsWith(i)));if(r.length>0)return r[0]}return this.availableLocaleCodes[0]}update(e,a={},r={}){this.hasLocale(e)?this.getLocale(e).update(a,r):this.add(new c({code:e,messages:a,errors:r}))}};var Mt=require("polished");var yt=I(ft(),1),O=require("reselect");var p=require("react-redux"),Un=p.useDispatch.withTypes(),vt=p.useSelector.withTypes(),Hn=p.useStore.withTypes();var bt=t=>t.i18n?.locale??"en",Ct=t=>t.i18n.locales;var _r=(0,O.createSelector)([Ct,bt],(t,e)=>(0,yt.default)((a,r,o)=>t.getLocale(e).getMessage(a,r,o),(...a)=>JSON.stringify(a))),wt=(t,e,a)=>vt(_r)(t,e,a);var Wn=(0,O.createSelector)(t=>t.i18n.locales,t=>t.map(e=>e.code));var S=require("react/jsx-runtime"),qr=({className:t,id:e,defaultMessage:a,children:r,data:o,screenreaderOnly:i=!1,allowHTML:u=!1})=>{let s=wt(e,a||r,o);if(i){let f={...(0,Mt.hideVisually)()};return(0,S.jsx)("span",{className:t,style:f,children:s})}return u?(0,S.jsx)("span",{className:t,dangerouslySetInnerHTML:{__html:s}}):(0,S.jsx)("span",{className:t,children:s})};qr.displayName="BI.Message";var D=require("@beinformed/ui/exceptions"),kt=require("@beinformed/ui/settings"),St=I(require("deepmerge"),1);var l=require("@beinformed/ui/utils"),M=require("@reduxjs/toolkit");var zr=(0,M.createAction)("UPDATE_LOCALE",t=>({payload:t})),N=(0,M.createAction)("SET_LOCALES",(t,e)=>({payload:{locales:t,locale:e}})),Br=()=>typeof navigator<"u"&&navigator?.language&&navigator?.language.split("-")[0]||"en",Ur={locales:new d,locale:Br()},to=(0,M.createReducer)(Ur,t=>{t.addCase(zr,(e,a)=>{e.locales?.length>1?(0,l.setCookie)("locale",a.payload):(0,l.clearCookie)("locale"),l.Cache.clear(),e.locale=a.payload}).addCase(N,(e,a)=>{let{locale:r,locales:o}=a.payload;e.locales.length>1?(0,l.setCookie)("locale",r):(0,l.clearCookie)("locale"),e.locales=o,r&&(e.locale=r)})});var Hr=(t,e)=>t.getCookieByName(e),xt=(t,e)=>{let r=Hr(t,"locale")||t.getHeader("Accept-Language");return r===null?e.availableLocaleCodes[0]:e.getPreferredLocale(r)};var Vr=(t,e=[],a)=>{if(!Array.isArray(e))throw new D.IllegalArgumentException("locales must be an array of objects");if(!a)throw new D.IllegalArgumentException("missing request argument");let r=v.map(s=>{let f=s.code,P=e.find(It=>It.code===f);return P?(0,St.default)(s,P):s});e.forEach(s=>{r.some(f=>f.code===s.code)||r.push(s)});let o=r.filter(s=>(0,kt.getEnabledLocales)().includes(s.code)),i=new d(o),u=xt(a,i);t.dispatch(N(i,u??"en"))};0&&(module.exports={Locale,Locales,availableLocales,createLocalesWithConfiguredErrors,languages,setI18n});
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|