@beinformed/react 1.0.0-beta.0 → 1.0.0-beta.2
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 +17 -0
- package/dist/{beforeRenderHooks-Gb0tcmCY.d.ts → beforeRenderHooks-B0CWdI7P.d.ts} +1 -1
- package/dist/{beforeRenderHooks-CNvsMmi8.d.cts → beforeRenderHooks-CKR6eECI.d.cts} +1 -1
- package/dist/chunk-4IDEBSD5.js +2 -0
- package/dist/chunk-4IDEBSD5.js.map +1 -0
- package/dist/chunk-6AKWSGWH.js +2 -0
- package/dist/chunk-6AKWSGWH.js.map +1 -0
- package/dist/chunk-6EK3TAMN.js +2 -0
- package/dist/chunk-6EK3TAMN.js.map +1 -0
- package/dist/{chunk-YJNJVQFW.js → chunk-7JMMW2FM.js} +2 -2
- package/dist/{chunk-YJNJVQFW.js.map → chunk-7JMMW2FM.js.map} +1 -1
- package/dist/{chunk-X2C7CKOK.js → chunk-A3D5R7MI.js} +2 -2
- package/dist/{chunk-X2C7CKOK.js.map → chunk-A3D5R7MI.js.map} +1 -1
- package/dist/{chunk-HDOILTJ2.js → chunk-BV77KA4Y.js} +2 -2
- package/dist/chunk-BV77KA4Y.js.map +1 -0
- package/dist/{chunk-K3DTH6XN.js → chunk-FBCZEJSD.js} +2 -2
- package/dist/chunk-FBCZEJSD.js.map +1 -0
- package/dist/{chunk-DI7VM62A.js → chunk-GD4NSZBN.js} +2 -2
- package/dist/chunk-GD4NSZBN.js.map +1 -0
- package/dist/chunk-HTR32BUX.js +2 -0
- package/dist/{chunk-6KRECIRI.js.map → chunk-HTR32BUX.js.map} +1 -1
- package/dist/chunk-ITSZQHGD.js +2 -0
- package/dist/chunk-ITSZQHGD.js.map +1 -0
- package/dist/chunk-JWOBKHOJ.js +2 -0
- package/dist/chunk-JWOBKHOJ.js.map +1 -0
- package/dist/chunk-KZB56W7Q.js +2 -0
- package/dist/chunk-KZB56W7Q.js.map +1 -0
- package/dist/chunk-KZLW2NHD.js +2 -0
- package/dist/chunk-KZLW2NHD.js.map +1 -0
- package/dist/{chunk-WBPDMDW4.js → chunk-L7DO7AZT.js} +2 -2
- package/dist/{chunk-WBPDMDW4.js.map → chunk-L7DO7AZT.js.map} +1 -1
- package/dist/{chunk-VG3QU524.js → chunk-OQK6SSUD.js} +3 -3
- package/dist/chunk-OQK6SSUD.js.map +1 -0
- package/dist/chunk-SPV6MD7J.js +2 -0
- package/dist/chunk-SPV6MD7J.js.map +1 -0
- package/dist/{chunk-Z2Y3OPVI.js → chunk-TAWZ2VIM.js} +2 -2
- package/dist/chunk-TAWZ2VIM.js.map +1 -0
- package/dist/{chunk-A4USB53Q.js → chunk-TDYPCNQI.js} +2 -2
- package/dist/{chunk-A4USB53Q.js.map → chunk-TDYPCNQI.js.map} +1 -1
- package/dist/chunk-VXOYOMNN.js +2 -0
- package/dist/chunk-VXOYOMNN.js.map +1 -0
- package/dist/chunk-WEJGEXAP.js +2 -0
- package/dist/chunk-WEJGEXAP.js.map +1 -0
- package/dist/client/index.cjs +5 -5
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +193 -69
- package/dist/hooks/index.d.ts +193 -69
- package/dist/hooks/index.js +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +22 -4
- package/dist/i18n/index.d.ts +22 -4
- package/dist/i18n/index.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/redux/index.cjs +1 -1
- package/dist/redux/index.cjs.map +1 -1
- package/dist/redux/index.d.cts +215 -28
- package/dist/redux/index.d.ts +215 -28
- package/dist/redux/index.js +1 -1
- package/dist/server/index.cjs +2 -2
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +3 -3
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +1 -1
- package/dist/{styled-components.d-CrkOxzv5.d.cts → styled-components.d-C19eFejP.d.cts} +7 -13
- package/dist/{styled-components.d-CrkOxzv5.d.ts → styled-components.d-C19eFejP.d.ts} +7 -13
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.cjs.map +1 -1
- package/dist/theme/index.d.cts +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/{useForm-DW-a5mcV.d.ts → useForm-BWwXFuv5.d.cts} +3 -3
- package/dist/{useForm-CG_DMYfZ.d.cts → useForm-DqaU9T78.d.ts} +3 -3
- package/dist/utils/index.cjs +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +6 -1
- package/dist/utils/index.d.ts +6 -1
- package/dist/utils/index.js +1 -1
- package/package.json +16 -16
- package/dist/chunk-3OP2KQ56.js +0 -2
- package/dist/chunk-3OP2KQ56.js.map +0 -1
- package/dist/chunk-4AC7YQ5Q.js +0 -2
- package/dist/chunk-4AC7YQ5Q.js.map +0 -1
- package/dist/chunk-6KRECIRI.js +0 -2
- package/dist/chunk-AMFWIR2R.js +0 -2
- package/dist/chunk-AMFWIR2R.js.map +0 -1
- package/dist/chunk-B7PQLTVC.js +0 -2
- package/dist/chunk-B7PQLTVC.js.map +0 -1
- package/dist/chunk-DI7VM62A.js.map +0 -1
- package/dist/chunk-HDOILTJ2.js.map +0 -1
- package/dist/chunk-JYAETKRB.js +0 -2
- package/dist/chunk-JYAETKRB.js.map +0 -1
- package/dist/chunk-K3DTH6XN.js.map +0 -1
- package/dist/chunk-RKGGCIUD.js +0 -2
- package/dist/chunk-RKGGCIUD.js.map +0 -1
- package/dist/chunk-UZIZDEU6.js +0 -2
- package/dist/chunk-UZIZDEU6.js.map +0 -1
- package/dist/chunk-VFLYA5WJ.js +0 -2
- package/dist/chunk-VFLYA5WJ.js.map +0 -1
- package/dist/chunk-VG3QU524.js.map +0 -1
- package/dist/chunk-X3N2NQVZ.js +0 -2
- package/dist/chunk-X3N2NQVZ.js.map +0 -1
- package/dist/chunk-Y7ESITVO.js +0 -2
- package/dist/chunk-Y7ESITVO.js.map +0 -1
- package/dist/chunk-YG7XDCNV.js +0 -2
- package/dist/chunk-YG7XDCNV.js.map +0 -1
- package/dist/chunk-Z2Y3OPVI.js.map +0 -1
package/dist/hooks/index.d.cts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as _beinformed_ui_models from '@beinformed/ui/models';
|
|
2
|
-
import { ListModel, DetailModel, TabModel, SourceReferenceCollection, ContentModel, Href, ModelCatalogModel, ConceptIndexModel, ConceptDetailModel, ContentIndexModel, ContentTOCModel, ContentTypeModel,
|
|
2
|
+
import { ListModel, DetailModel, TabModel, SourceReferenceCollection, ContentModel, Href, ListDetailModel, FilterCollection, IFilter, AttributeModel, LinkModel, LookupOptionsModel, ModelCatalogModel, ConceptIndexModel, ConceptDetailModel, ContentIndexModel, ContentTOCModel, ContentTypeModel, ResourceModel, ApplicationModel, ModularUIModel, CaseViewModel, GroupingPanelModel, UserProfileModel, ErrorResponse, CaseSearchModel } from '@beinformed/ui/models';
|
|
3
3
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
4
4
|
import { AuthenticationType, ModularUIResponse, ModularUIRequest } from '@beinformed/ui/modularui';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { EffectCallback, DependencyList } from 'react';
|
|
6
|
+
export { U as UpdateFormOptions, b as useAttributeUpdate, u as useForm, a as useFormNavigation, c as useRepeatableAttributeSet } from '../useForm-BWwXFuv5.cjs';
|
|
7
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-
|
|
8
|
+
import { b as Locales, B as ModelEntry, M as MessageObject, S as ShowNotificationArguments, P as PreferencesState, T as ProgressIndicatorState, V as RouterLocation, $ as RootState } from '../styled-components.d-C19eFejP.cjs';
|
|
9
|
+
import * as lodash from 'lodash';
|
|
9
10
|
import { ModularUIRequestOptions } from '@beinformed/ui/utils';
|
|
10
11
|
import 'history';
|
|
11
12
|
import 'redux';
|
|
@@ -25,15 +26,11 @@ declare const useLogin: () => {
|
|
|
25
26
|
* Indicates whether the user is currently authenticated.
|
|
26
27
|
*/
|
|
27
28
|
isAuthenticated: boolean;
|
|
29
|
+
primaryAuthenticationType: {} | undefined;
|
|
28
30
|
/**
|
|
29
31
|
* 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
|
*/
|
|
32
|
-
authenticationTypes:
|
|
33
|
-
name: string;
|
|
34
|
-
authentication: string;
|
|
35
|
-
isPrimary: boolean;
|
|
36
|
-
}[];
|
|
33
|
+
authenticationTypes: AuthenticationType[];
|
|
37
34
|
/**
|
|
38
35
|
* The current authentication error message, if any.
|
|
39
36
|
*/
|
|
@@ -101,15 +98,11 @@ declare const useLogout: () => {
|
|
|
101
98
|
* Indicates whether the user is currently authenticated.
|
|
102
99
|
*/
|
|
103
100
|
isAuthenticated: boolean;
|
|
101
|
+
primaryAuthenticationType: {} | undefined;
|
|
104
102
|
/**
|
|
105
103
|
* 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
104
|
*/
|
|
108
|
-
authenticationTypes:
|
|
109
|
-
name: string;
|
|
110
|
-
authentication: string;
|
|
111
|
-
isPrimary: boolean;
|
|
112
|
-
}[];
|
|
105
|
+
authenticationTypes: AuthenticationType[];
|
|
113
106
|
/**
|
|
114
107
|
* Initiates the logout process.
|
|
115
108
|
* 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.
|
|
@@ -137,6 +130,7 @@ declare const useLogout: () => {
|
|
|
137
130
|
arg: void;
|
|
138
131
|
unwrap: () => Promise<void>;
|
|
139
132
|
}) | undefined;
|
|
133
|
+
logoutUrl: string;
|
|
140
134
|
};
|
|
141
135
|
|
|
142
136
|
/**
|
|
@@ -144,30 +138,40 @@ declare const useLogout: () => {
|
|
|
144
138
|
*/
|
|
145
139
|
declare const useContentFromSourceReferences: (sourceReferences: SourceReferenceCollection, renderChildSections: boolean) => ContentModel[];
|
|
146
140
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
141
|
+
/**
|
|
142
|
+
* A replacement for useEffect that compares dependencies deeply.
|
|
143
|
+
*/
|
|
144
|
+
declare function useDeepCompareEffect(callback: EffectCallback, dependencies: DependencyList): void;
|
|
150
145
|
|
|
151
146
|
declare const useMessage: (id: string, defaultMessage?: string, placeholders?: MessageParameters | undefined) => string;
|
|
152
147
|
declare const useTranslate: () => ((id: string, defaultMessage?: string, placeholders?: MessageParameters | undefined) => string) & lodash.MemoizedFunction;
|
|
153
148
|
declare const useLocale: () => string;
|
|
149
|
+
declare const useLocales: () => Locales;
|
|
154
150
|
/**
|
|
155
151
|
* Retrieve all available locale codes
|
|
156
152
|
*/
|
|
157
153
|
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
154
|
/**
|
|
167
|
-
*
|
|
155
|
+
* A hook that returns a memoized function to update the application locale.
|
|
156
|
+
*
|
|
157
|
+
* @returns {(locale: string) => void} A memoized function to update the locale.
|
|
168
158
|
*/
|
|
169
|
-
declare const
|
|
159
|
+
declare const useUpdateLocale: () => (locale: string) => void;
|
|
170
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Configuration options for low-level modular UI requests.
|
|
163
|
+
*/
|
|
164
|
+
interface HookOptions {
|
|
165
|
+
key?: string;
|
|
166
|
+
origin?: string;
|
|
167
|
+
contextPath?: string;
|
|
168
|
+
removeOnUnmount?: boolean;
|
|
169
|
+
formdata?: string | undefined | null;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Configuration options for the useModularUIBasic hook.
|
|
173
|
+
* Allows for type enforcement, caching control, and reload behavior.
|
|
174
|
+
*/
|
|
171
175
|
interface UseModularUIBasicOptions<T> {
|
|
172
176
|
expectedModels?: string[];
|
|
173
177
|
targetModel?: new (modularuiResponse: ModularUIResponse) => T;
|
|
@@ -175,11 +179,69 @@ interface UseModularUIBasicOptions<T> {
|
|
|
175
179
|
origin?: string;
|
|
176
180
|
contextPath?: string;
|
|
177
181
|
cache?: boolean;
|
|
182
|
+
key?: string;
|
|
183
|
+
isReload?: boolean;
|
|
184
|
+
removeOnUnmount?: boolean;
|
|
185
|
+
formdata?: string | undefined | null;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* A simplified abstraction over useModularUI that includes automatic
|
|
189
|
+
* model validation and smart-reload logic based on router state.
|
|
190
|
+
*
|
|
191
|
+
* @param {string} defaultKey - The default identifier for the model.
|
|
192
|
+
* @param {string | Href} href - The endpoint to fetch.
|
|
193
|
+
* @param {UseModularUIBasicOptions} options - Extended configuration options.
|
|
194
|
+
*/
|
|
195
|
+
declare const useModularUIBasic: <T>(defaultKey: string, href: string | Href, options?: UseModularUIBasicOptions<T>) => T | undefined;
|
|
196
|
+
/**
|
|
197
|
+
* Determines if a model should be reloaded based on the 'reload' timestamp
|
|
198
|
+
* found in the React Router location state.
|
|
199
|
+
* This is used for "force refresh" scenarios where a user navigates to a
|
|
200
|
+
* page and expects fresh data (e.g., after a form submission elsewhere).
|
|
201
|
+
* @param {string} modelKey - The model type key.
|
|
202
|
+
* @param {string} url - The resource URL.
|
|
203
|
+
* @returns {boolean} True if the store data is stale compared to the reload signal.
|
|
204
|
+
*/
|
|
205
|
+
declare const useReload: (modelKey: string, url: string) => boolean;
|
|
206
|
+
|
|
207
|
+
interface ListNavigationOptions {
|
|
208
|
+
syncLocation?: boolean;
|
|
209
|
+
historyAction?: "push" | "replace";
|
|
178
210
|
}
|
|
211
|
+
declare const useList: (href: string | Href, options?: HookOptions) => ListModel | undefined;
|
|
212
|
+
declare const useListOrDetail: (href: string | Href, options?: HookOptions) => ListModel | DetailModel<_beinformed_ui_models.DetailData, _beinformed_ui_models.DetailPanelContributions> | undefined;
|
|
213
|
+
declare const useListDetail: (href: string | Href, options?: HookOptions) => ListDetailModel | undefined;
|
|
214
|
+
declare const useListNavigation: ({ syncLocation, historyAction, }?: ListNavigationOptions) => {
|
|
215
|
+
update: (list: ListModel, resetPage?: boolean) => void;
|
|
216
|
+
updateFilters: (list: ListModel, filters: FilterCollection | IFilter[]) => void;
|
|
217
|
+
updateFilter: (list: ListModel, filter: IFilter, value: string, attribute?: AttributeModel) => void;
|
|
218
|
+
updateSort: (list: ListModel, sortOption: string) => void;
|
|
219
|
+
updatePage: (list: ListModel, page: number) => void;
|
|
220
|
+
updatePageSize: (list: ListModel, pagesize: number) => void;
|
|
221
|
+
resetFilters: (list: ListModel) => void;
|
|
222
|
+
removeFilter: (list: ListModel, filter: IFilter) => void;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
interface UseLookupHook {
|
|
226
|
+
lookupOptions: LookupOptionsModel | null;
|
|
227
|
+
lookupLoading: boolean;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Lookup options call
|
|
231
|
+
*/
|
|
232
|
+
declare const useLookup: (lookupLink: LinkModel, filterInput?: string, minLength?: number, debounceMs?: number) => UseLookupHook;
|
|
233
|
+
|
|
234
|
+
type ModalHook = (modalId: string) => {
|
|
235
|
+
key: string | null;
|
|
236
|
+
size?: string | null;
|
|
237
|
+
visible: boolean;
|
|
238
|
+
show: () => void;
|
|
239
|
+
close: () => void;
|
|
240
|
+
};
|
|
179
241
|
/**
|
|
180
|
-
*
|
|
242
|
+
* Manage modals
|
|
181
243
|
*/
|
|
182
|
-
declare const
|
|
244
|
+
declare const useModal: ModalHook;
|
|
183
245
|
|
|
184
246
|
interface SearchFilter {
|
|
185
247
|
index?: string;
|
|
@@ -210,6 +272,61 @@ declare const useEntryDate: () => {
|
|
|
210
272
|
};
|
|
211
273
|
};
|
|
212
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Returns all models in the store that are instances of the provided class
|
|
277
|
+
* and match the current application locale.
|
|
278
|
+
*/
|
|
279
|
+
declare const useAllModelsByInstance: <T extends new (...args: never[]) => ResourceModel>(instance: T) => InstanceType<T>[];
|
|
280
|
+
/**
|
|
281
|
+
* Returns the first model found in the store that is an instance of the
|
|
282
|
+
* provided class and matches the current locale.
|
|
283
|
+
*/
|
|
284
|
+
declare const useFirstModelByInstance: <T extends new (...args: never[]) => ResourceModel>(instance: T) => InstanceType<T> | undefined;
|
|
285
|
+
/**
|
|
286
|
+
* Returns the model instance that is currently "active" based on the URL path.
|
|
287
|
+
* It checks if the current router location starts with the model's selfhref path.
|
|
288
|
+
*/
|
|
289
|
+
declare const useActiveModelByInstance: <T extends new (...args: never[]) => ResourceModel>(instance: T) => InstanceType<T> | undefined;
|
|
290
|
+
/**
|
|
291
|
+
* Retrieves a specific model from the store based on its unique Href.
|
|
292
|
+
* @param {Href | string} href - The Href object or string path of the model.
|
|
293
|
+
* @returns {ModularUIModel | null} The model matching the href or null.
|
|
294
|
+
*/
|
|
295
|
+
declare const useModelByHref: (href: Href | string) => _beinformed_ui_models.ModularUIModel | undefined;
|
|
296
|
+
/**
|
|
297
|
+
* Returns the unique store key (identifier) for a model associated with a specific Href.
|
|
298
|
+
* @param {Href | string} href - The Href object or string path.
|
|
299
|
+
* @returns {string | null | void} The internal key of the model.
|
|
300
|
+
*/
|
|
301
|
+
declare const useKeyByHref: (href: Href | string) => string | undefined;
|
|
302
|
+
/**
|
|
303
|
+
* Returns all internal keys found in the store for a specific Href.
|
|
304
|
+
* Useful if multiple versions/entries exist for the same path.
|
|
305
|
+
* @param {Href | string} href - The Href object or string path.
|
|
306
|
+
* @returns {Array<string>} An array of keys.
|
|
307
|
+
*/
|
|
308
|
+
declare const useAllKeysByHref: (href: Href | string) => string[];
|
|
309
|
+
/**
|
|
310
|
+
* Returns a list of simplified model info (key, href, label, type) for all
|
|
311
|
+
* models currently active in the navigation context (breadcrumbs).
|
|
312
|
+
* @returns {Array<{key: string, href: Href, label: string, type: string}>}
|
|
313
|
+
*/
|
|
314
|
+
declare const useActiveModels: () => {
|
|
315
|
+
key: string;
|
|
316
|
+
href: Href | undefined;
|
|
317
|
+
label: string;
|
|
318
|
+
type: string;
|
|
319
|
+
}[];
|
|
320
|
+
/**
|
|
321
|
+
* Returns all models in the store that have a status of MODULARUI_STATUS.FINISHED.
|
|
322
|
+
* @returns {Array<ModularUIModel>} An array of fully loaded models.
|
|
323
|
+
*/
|
|
324
|
+
declare const useAllFinishedModels: () => (_beinformed_ui_models.ModularUIModel | undefined)[];
|
|
325
|
+
/**
|
|
326
|
+
* Returns the current active application, without retrying to request it.
|
|
327
|
+
*/
|
|
328
|
+
declare const useCurrentApplication: () => ApplicationModel | null;
|
|
329
|
+
|
|
213
330
|
type ReloadCallback = (model: ModularUIModel | undefined) => boolean;
|
|
214
331
|
type UseModels = () => {
|
|
215
332
|
reload: (model: ModularUIModel, options?: Record<string, unknown>) => void;
|
|
@@ -221,14 +338,22 @@ type UseModels = () => {
|
|
|
221
338
|
declare const useModels: UseModels;
|
|
222
339
|
|
|
223
340
|
/**
|
|
224
|
-
*
|
|
341
|
+
* A custom hook to fetch and manage Be Informed modular UI resources.
|
|
342
|
+
* It handles automatic data fetching based on URL/query changes, manages Redux state
|
|
343
|
+
* synchronization, and provides cleanup logic when components unmount.
|
|
344
|
+
*
|
|
345
|
+
* @param {string} modelKey - A unique identifier for the type of model being fetched.
|
|
346
|
+
* @param {string | Href} url - The endpoint URL or Href instance to fetch data from.
|
|
347
|
+
* @param {RequestModularUIOptions} options - Configuration for the request (method, headers, etc.).
|
|
348
|
+
* @returns {ModelEntry} The model data retrieved from the Redux store.
|
|
225
349
|
*/
|
|
226
|
-
declare const useModularUI: (modelKey: string, url: string | Href, options?: ModularUIRequestOptions) => ModelEntry;
|
|
350
|
+
declare const useModularUI: (modelKey: string, url: string | Href, options?: ModularUIRequestOptions) => ModelEntry | undefined;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Generates the key that is used in the modular ui reducer of redux
|
|
354
|
+
*/
|
|
355
|
+
declare const useModularUIKey: (modelKey: string, url: string) => string;
|
|
227
356
|
|
|
228
|
-
interface HookOptions {
|
|
229
|
-
origin?: string;
|
|
230
|
-
contextPath?: string;
|
|
231
|
-
}
|
|
232
357
|
/**
|
|
233
358
|
* Load application
|
|
234
359
|
*/
|
|
@@ -241,14 +366,8 @@ declare const useTab: (href: string | Href, options?: HookOptions) => TabModel |
|
|
|
241
366
|
* Load caseview by href
|
|
242
367
|
*/
|
|
243
368
|
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
369
|
declare const useGroupingPanel: (href: string | Href, options?: HookOptions) => GroupingPanelModel | undefined;
|
|
249
370
|
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
371
|
declare const useUserProfile: (href: string | Href, options?: HookOptions) => UserProfileModel | undefined;
|
|
253
372
|
|
|
254
373
|
/**
|
|
@@ -261,10 +380,7 @@ declare const useNotification: () => {
|
|
|
261
380
|
messageType: string | undefined;
|
|
262
381
|
message: MessageObject | undefined;
|
|
263
382
|
error: ErrorResponse | undefined;
|
|
264
|
-
dismiss: () =>
|
|
265
|
-
payload: undefined;
|
|
266
|
-
type: "DISMISS_NOTIFICATION";
|
|
267
|
-
};
|
|
383
|
+
dismiss: () => void;
|
|
268
384
|
};
|
|
269
385
|
declare const useErrorNotification: () => (message: MessageObject, error?: ErrorResponse) => Promise<_reduxjs_toolkit.PayloadAction<void, string, {
|
|
270
386
|
arg: ShowNotificationArguments;
|
|
@@ -289,36 +405,41 @@ declare const useErrorNotification: () => (message: MessageObject, error?: Error
|
|
|
289
405
|
unwrap: () => Promise<void>;
|
|
290
406
|
};
|
|
291
407
|
|
|
408
|
+
declare const usePanel: (href?: string | Href, options?: HookOptions & {
|
|
409
|
+
fromRoute?: boolean;
|
|
410
|
+
}) => ListModel | GroupingPanelModel | DetailModel | CaseSearchModel | undefined;
|
|
411
|
+
|
|
292
412
|
declare const usePreference: (preferenceNames: string | string[]) => Pick<PreferencesState, string>;
|
|
293
413
|
|
|
294
414
|
declare const useProgressIndicator: () => {
|
|
295
|
-
start: () =>
|
|
296
|
-
|
|
297
|
-
|
|
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;
|
|
415
|
+
start: () => void;
|
|
416
|
+
finish: () => void;
|
|
417
|
+
reset: () => void;
|
|
418
|
+
update: (percentComplete: number) => void;
|
|
316
419
|
};
|
|
420
|
+
/**
|
|
421
|
+
*/
|
|
422
|
+
declare const useProgressIndicatorState: () => ProgressIndicatorState;
|
|
317
423
|
|
|
424
|
+
/**
|
|
425
|
+
* Returns the full location object from the router state.
|
|
426
|
+
*/
|
|
318
427
|
declare const useLocation: () => RouterLocation | undefined;
|
|
428
|
+
/**
|
|
429
|
+
* Returns the unique key of the current location.
|
|
430
|
+
*/
|
|
319
431
|
declare const useLocationKey: () => string;
|
|
432
|
+
/**
|
|
433
|
+
* Returns the current search (querystring) portion of the URL.
|
|
434
|
+
*/
|
|
320
435
|
declare const useQuerystring: () => string | undefined;
|
|
436
|
+
/**
|
|
437
|
+
* Returns the current URL pathname.
|
|
438
|
+
*/
|
|
321
439
|
declare const usePathname: () => string | undefined;
|
|
440
|
+
/**
|
|
441
|
+
* Provides navigation methods.
|
|
442
|
+
*/
|
|
322
443
|
declare const useNavigation: () => {
|
|
323
444
|
push: (location: RouterLocation | string, state?: RootState) => {
|
|
324
445
|
payload: {
|
|
@@ -350,4 +471,7 @@ declare const useNavigation: () => {
|
|
|
350
471
|
};
|
|
351
472
|
};
|
|
352
473
|
|
|
353
|
-
|
|
474
|
+
declare const useQuicksearch: (href: string | Href, options?: HookOptions) => CaseSearchModel | undefined;
|
|
475
|
+
declare const useSearch: (href: string | Href, options?: HookOptions) => CaseSearchModel | undefined;
|
|
476
|
+
|
|
477
|
+
export { type HookOptions, type SearchFilter, type UseModularUIBasicOptions, useActiveModelByInstance, useActiveModels, useAllFinishedModels, useAllKeysByHref, useAllModelsByInstance, useApplication, useCaseView, useCompleteSource, useConceptDetail, useConceptIndex, useConceptSearch, useContent, useContentFromSourceReferences, useContentIndex, useContentSearch, useContentTOC, useContentType, useCurrentApplication, useDeepCompareEffect, useDetailPanel, useEntryDate, useErrorNotification, useFirstModelByInstance, useGroupingPanel, useKeyByHref, useList, useListDetail, useListNavigation, useListOrDetail, useLocale, useLocaleCodes, useLocales, useLocation, useLocationKey, useLogin, useLogout, useLookup, useMessage, useModal, useModelByHref, useModelCatalog, useModels, useModularUI, useModularUIBasic, useModularUIKey, useModularUIRequest, useNavigation, useNotification, usePanel, usePathname, usePreference, useProgressIndicator, useProgressIndicatorState, useQuerystring, useQuicksearch, useRelatedConcepts, useReload, useRetrieveFormsOnModel, useSearch, useTab, useTranslate, useUpdateLocale, useUserProfile };
|