@websolutespa/bom-mixer-hooks 3.0.1 → 3.1.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 +16 -0
- package/dist/index.d.ts +82 -135
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +448 -5933
- package/dist/index.js.map +1 -1
- package/package.json +25 -18
- package/src/useApi/useApi.test.tsx +193 -194
- package/src/useBodyScroll/useBodyScroll.test.ts +8 -8
- package/src/useBreakpoint/useBreakpoint.test.tsx +2 -2
- package/src/useClickAnyWhere/useClickAnyWhere.test.ts +2 -2
- package/src/useClickOut/useClickOut.test.tsx +5 -5
- package/src/useCollectionApi/useCollectionApi.test.tsx +194 -196
- package/src/useCurrency/useCurrency.test.tsx +2 -2
- package/src/useDateTimeFormat/useDateTimeFormat.test.tsx +2 -2
- package/src/useDebounce/useDebounce.test.ts +6 -6
- package/src/useDebounceCallback/useDebounceCallback.test.ts +7 -7
- package/src/useDebugChangedProps/useDebugChangedProps.test.tsx +3 -3
- package/src/useDomObserver/useDomObserver.test.ts +2 -2
- package/src/useEventListener/useEventListener.test.ts +15 -15
- package/src/useExtra/useExtra.test.tsx +2 -2
- package/src/useFilters/useFilters.test.ts +2 -2
- package/src/useGenericContext/useGenericContext.test.tsx +2 -2
- package/src/useGeolocation/useGeolocation.test.ts +4 -4
- package/src/useHttp/useHttp.test.tsx +197 -190
- package/src/useIdle/useIdle.test.ts +5 -5
- package/src/useInfiniteLoader/useInfiniteLoader.test.ts +3 -3
- package/src/useKeyboard/useKeyboard.test.tsx +13 -13
- package/src/useLabel/useLabel.test.tsx +2 -2
- package/src/useLayout/useLayout.test.tsx +2 -2
- package/src/useLazyModules/useLazyModules.test.tsx +2 -2
- package/src/useNumber/useNumber.test.tsx +2 -2
- package/src/usePage/usePage.test.tsx +2 -2
- package/src/usePagination/usePagination.test.ts +79 -79
- package/src/usePaginationLegacy/usePaginationLegacy.test.ts +1 -0
- package/src/usePortal/usePortal.test.ts +1 -1
- package/src/usePrevious/usePrevious.test.ts +1 -1
- package/src/useResize/useResize.test.ts +3 -3
- package/src/useSSR/useSSR.test.tsx +1 -1
- package/src/useScrollTo/useScrollTo.test.tsx +18 -18
- package/src/useSearchParams/useSearchParams.test.ts +65 -58
- package/src/useSearchParamsEncoded/useSearchParamsEncoded.test.ts +64 -57
- package/src/useSearchParamsQs/useSearchParamsQs.test.ts +82 -79
- package/src/useSorting/useSorting.test.ts +3 -3
- package/src/useSyncedRef/useSyncedRef.test.ts +2 -2
- package/src/useUnit/useUnit.test.tsx +2 -2
- package/src/useUnmountEffect/useUnmountEffect.test.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @websolutespa/bom-mixer-hooks
|
|
2
2
|
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3f7c21b: - Payload 3.91.0 and Next.js 16.4.2 (React 19.2.9): peer dependencies are now ranges, `payload` / `@payloadcms/*` `^3.91.0`, `next` `^16.3.3`, `react` / `react-dom` `^19.2.1`
|
|
8
|
+
- payload-plugin-bowl: the mixer context is built only for reads by an authenticated user (payload 3.90+ resolves the jwt user with the request query, populating tenants before `req.user` is set); email options typed with payload `SendEmailOptions`, no direct nodemailer dependency
|
|
9
|
+
- payload-plugin-storage: `AZURE_STORAGE_CONTAINER_ACCESS` (`private` default since payload 3.90, `blob`, `container`) for containers created by the plugin
|
|
10
|
+
- mixer web: `images.qualities` includes `IMAGE_QUALITY` (next 16 defaults to `[75]`)
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- d88019f: - library majors: uuid 14, marked 18 (llm text renderer ported to token renderers), mime 4, mime-types 3, iron-session 9, node-cron 4, html-to-text 10, react-error-boundary 6, react-dropzone 20 (import modal accepts `text/csv` `.csv`), fast-equals 6, schema-dts 2, json-schema-typed 9, dotenv 18 (quiet), chalk 6, giget 3, @clack/prompts 1, keeper secrets manager 17
|
|
15
|
+
- 12b6e2f: - test: replace the jest presets with shared vitest configurations, `@websolutespa/test/vitest` (`defineNodeConfig`, `defineDomConfig`, `definePayloadConfig`); drop jest dependencies
|
|
16
|
+
- declare every imported package and script binary in the package that uses it (no more reliance on hoisting), drop unused dependencies
|
|
17
|
+
- bom-mixer-checkout: `useCart.add` no longer mutates the previous cart state
|
|
18
|
+
|
|
3
19
|
## 3.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ApiRequestOptions } from "@websolutespa/bom-mixer-store";
|
|
2
2
|
import * as _websolutespa_bom_core0 from "@websolutespa/bom-core";
|
|
3
3
|
import { IAppExtended, IEquatable, IFeatureType, ILabel, ILayout, ILocalizable, ILocalized, IPage, QueryParams } from "@websolutespa/bom-core";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react from "react";
|
|
5
5
|
import React$1, { CSSProperties, ComponentProps, Dispatch, MutableRefObject, RefObject, SetStateAction, useEffect } from "react";
|
|
6
|
-
import * as
|
|
6
|
+
import * as zustand from "zustand";
|
|
7
7
|
import { ILazyModules, IMetaData, OpenGraphType, StructuredDataType, TwitterCardType } from "@websolutespa/bom-mixer-models";
|
|
8
8
|
import { NextRouter } from "next/router";
|
|
9
9
|
|
|
10
10
|
//#region src/useApi/useApi.d.ts
|
|
11
|
-
declare function useApiFetch<T = unknown>(pathname: string, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
12
|
-
declare function useApiGet<T = unknown>(pathname: string, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
13
|
-
declare function useApiPost<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
14
|
-
declare function useApiPut<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
15
|
-
declare function useApiPatch<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
16
|
-
declare function useApiDelete<T = unknown>(pathname: string, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
11
|
+
declare function useApiFetch<T = unknown>(pathname: string, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
12
|
+
declare function useApiGet<T = unknown>(pathname: string, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
13
|
+
declare function useApiPost<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
14
|
+
declare function useApiPut<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
15
|
+
declare function useApiPatch<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
16
|
+
declare function useApiDelete<T = unknown>(pathname: string, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
17
17
|
type Api = {
|
|
18
18
|
get: <T = unknown>(pathname: string, options?: ApiRequestOptions) => Promise<T>;
|
|
19
19
|
post: <T = unknown>(pathname: string, payload?: unknown, options?: ApiRequestOptions) => Promise<T>;
|
|
@@ -25,7 +25,6 @@ declare function useApi(): Api;
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/useAutosizeTextArea/useAutosizeTextArea.d.ts
|
|
27
27
|
declare function useAutosizeTextArea(textAreaRef: HTMLTextAreaElement | null, value: string): void;
|
|
28
|
-
//# sourceMappingURL=useAutosizeTextArea.d.ts.map
|
|
29
28
|
//#endregion
|
|
30
29
|
//#region src/useBodyScroll/useBodyScroll.d.ts
|
|
31
30
|
declare function useBodyScroll(elementRef?: RefObject<HTMLElement> | null, options?: BodyScrollOptions): [boolean, Dispatch<SetStateAction<boolean>>];
|
|
@@ -39,7 +38,6 @@ type BodyScrollOptions = {
|
|
|
39
38
|
scrollLayer?: boolean;
|
|
40
39
|
delayReset?: number;
|
|
41
40
|
};
|
|
42
|
-
//# sourceMappingURL=useBodyScroll.d.ts.map
|
|
43
41
|
//#endregion
|
|
44
42
|
//#region src/useBreakpoint/useBreakpoint.d.ts
|
|
45
43
|
type BreakpointType = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -53,12 +51,10 @@ declare function useBreakpoint(mediaQuery?: MediaQuery): Breakpoint;
|
|
|
53
51
|
//#endregion
|
|
54
52
|
//#region src/useClickAnyWhere/useClickAnyWhere.d.ts
|
|
55
53
|
declare function useClickAnyWhere(handler: (event: MouseEvent) => void): void;
|
|
56
|
-
//# sourceMappingURL=useClickAnyWhere.d.ts.map
|
|
57
54
|
//#endregion
|
|
58
55
|
//#region src/useClickOut/useClickOut.d.ts
|
|
59
56
|
type ClickOutGetContainer = () => HTMLElement | null;
|
|
60
57
|
declare function useClickOut(ref: RefObject<HTMLElement | null>, handler: (event: MouseEvent) => void): void;
|
|
61
|
-
//# sourceMappingURL=useClickOut.d.ts.map
|
|
62
58
|
//#endregion
|
|
63
59
|
//#region src/useCollectionApi/local.collection.d.ts
|
|
64
60
|
declare function localCollectionFetch<T = unknown>(pathname: string, options?: ApiRequestOptions, serviceOptions?: {
|
|
@@ -85,7 +81,6 @@ declare function localCollectionDelete<T = unknown>(url: string, options?: ApiRe
|
|
|
85
81
|
locale: string;
|
|
86
82
|
market: string;
|
|
87
83
|
}): Promise<T>;
|
|
88
|
-
//# sourceMappingURL=local.collection.d.ts.map
|
|
89
84
|
//#endregion
|
|
90
85
|
//#region src/useCollectionApi/useCollectionApi.d.ts
|
|
91
86
|
type CollectionApi = {
|
|
@@ -96,11 +91,11 @@ type CollectionApi = {
|
|
|
96
91
|
delete: <T = unknown>(pathname: string, options?: ApiRequestOptions) => Promise<T>;
|
|
97
92
|
};
|
|
98
93
|
declare function useCollectionApi(): CollectionApi;
|
|
99
|
-
declare function useCollectionApiGet<T = unknown>(pathname: string, params?: QueryParams, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
100
|
-
declare function useCollectionApiPost<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
101
|
-
declare function useCollectionApiPut<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
102
|
-
declare function useCollectionApiPatch<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
103
|
-
declare function useCollectionApiDelete<T = unknown>(pathname: string, options?: ApiRequestOptions): [T | undefined, boolean, any,
|
|
94
|
+
declare function useCollectionApiGet<T = unknown>(pathname: string, params?: QueryParams, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
95
|
+
declare function useCollectionApiPost<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
96
|
+
declare function useCollectionApiPut<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
97
|
+
declare function useCollectionApiPatch<T = unknown>(pathname: string, payload: unknown, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
98
|
+
declare function useCollectionApiDelete<T = unknown>(pathname: string, options?: ApiRequestOptions): [T | undefined, boolean, any, react.Dispatch<any>];
|
|
104
99
|
//#endregion
|
|
105
100
|
//#region src/useColorScheme/useColorScheme.d.ts
|
|
106
101
|
type ColorScheme = ('light' | 'dark') & string;
|
|
@@ -119,21 +114,16 @@ declare function useColorScheme<T>(selector: (state: State$1) => T): T;
|
|
|
119
114
|
//#endregion
|
|
120
115
|
//#region src/useCurrency/useCurrency.d.ts
|
|
121
116
|
declare function useCurrency(currency?: string, locale?: string): (value: number) => string;
|
|
122
|
-
//# sourceMappingURL=useCurrency.d.ts.map
|
|
123
117
|
//#endregion
|
|
124
118
|
//#region src/useCurrentState/useCurrentState.d.ts
|
|
125
119
|
declare function useCurrentState<S>(initialState: S | (() => S)): CurrentStateType<S>;
|
|
126
120
|
type CurrentStateType<S> = [S, Dispatch<SetStateAction<S>>, MutableRefObject<S>];
|
|
127
|
-
//# sourceMappingURL=useCurrentState.d.ts.map
|
|
128
121
|
//#endregion
|
|
129
122
|
//#region src/useDateTimeFormat/useDateTimeFormat.d.ts
|
|
130
123
|
declare function useDateTimeFormat(options?: Intl.DateTimeFormatOptions, locale?: string): (value: Date | string) => string;
|
|
131
|
-
//# sourceMappingURL=useDateTimeFormat.d.ts.map
|
|
132
124
|
//#endregion
|
|
133
125
|
//#region src/useDebounce/useDebounce.d.ts
|
|
134
126
|
declare function useDebounce<T>(value: T, msec?: number): T;
|
|
135
|
-
//# sourceMappingURL=useDebounce.d.ts.map
|
|
136
|
-
|
|
137
127
|
//#endregion
|
|
138
128
|
//#region src/useDebounceCallback/useDebounceCallback.d.ts
|
|
139
129
|
/**
|
|
@@ -143,24 +133,12 @@ declare function useDebounce<T>(value: T, msec?: number): T;
|
|
|
143
133
|
* @returns A memoized function that is debounced
|
|
144
134
|
*/
|
|
145
135
|
declare function useDebounceCallback<T extends (...args: any[]) => any>(callback: T, msec?: number): (...args: unknown[]) => void;
|
|
146
|
-
/**
|
|
147
|
-
* Makes passed function debounced, otherwise acts like `useCallback`.
|
|
148
|
-
*
|
|
149
|
-
* @param callback Function that will be debounced.
|
|
150
|
-
* @param deps Dependencies list when to update callback.
|
|
151
|
-
* @param delay Debounce delay.
|
|
152
|
-
* @param maxWait The maximum time `callback` is allowed to be delayed before
|
|
153
|
-
* it's invoked. 0 means no max wait.
|
|
154
|
-
*/
|
|
155
|
-
//# sourceMappingURL=useDebounceCallback.d.ts.map
|
|
156
136
|
//#endregion
|
|
157
137
|
//#region src/useDebugChangedProps/useDebugChangedProps.d.ts
|
|
158
138
|
declare function useDebugChangedProps(props: ComponentProps<any>): void;
|
|
159
|
-
//# sourceMappingURL=useDebugChangedProps.d.ts.map
|
|
160
139
|
//#endregion
|
|
161
140
|
//#region src/useDomObserver/useDomObserver.d.ts
|
|
162
141
|
declare function useDomObserver(ref: MutableRefObject<HTMLElement | null> | undefined, callback?: MutationCallback): void;
|
|
163
|
-
//# sourceMappingURL=useDomObserver.d.ts.map
|
|
164
142
|
//#endregion
|
|
165
143
|
//#region src/useUI/useUI.d.ts
|
|
166
144
|
type UIValue = string | number | boolean | undefined;
|
|
@@ -175,11 +153,10 @@ type UIStore = {
|
|
|
175
153
|
views: UIViews;
|
|
176
154
|
actions: UIActions;
|
|
177
155
|
};
|
|
178
|
-
declare const useUI:
|
|
156
|
+
declare const useUI: zustand.UseBoundStore<zustand.StoreApi<UIStore>>;
|
|
179
157
|
//#endregion
|
|
180
158
|
//#region src/useDrawer/useDrawer.d.ts
|
|
181
159
|
declare function useDrawer(): [drawer: UIValue, open: (value?: string) => void, close: () => void];
|
|
182
|
-
//# sourceMappingURL=useDrawer.d.ts.map
|
|
183
160
|
//#endregion
|
|
184
161
|
//#region src/useElementSize/useElementSize.d.ts
|
|
185
162
|
type Size = {
|
|
@@ -214,7 +191,7 @@ declare enum FilterMode {
|
|
|
214
191
|
SELECT = "select",
|
|
215
192
|
AND = "and",
|
|
216
193
|
OR = "or",
|
|
217
|
-
QUERY = "query"
|
|
194
|
+
QUERY = "query"
|
|
218
195
|
}
|
|
219
196
|
type IFilterOption = {
|
|
220
197
|
id: IEquatable;
|
|
@@ -250,14 +227,12 @@ declare class Filter<T> implements IFilter {
|
|
|
250
227
|
toggle(option: IFilterOption): void;
|
|
251
228
|
clear(): void;
|
|
252
229
|
}
|
|
253
|
-
//# sourceMappingURL=filter.d.ts.map
|
|
254
230
|
//#endregion
|
|
255
231
|
//#region src/useFilters/filter.service.d.ts
|
|
256
232
|
declare function getFilters<T>(items: T[], featureTypes: IFeatureType[], filterMap: (key: string, item: T, value: IEquatable) => boolean, params?: FilterParams | null): Filter<T>[];
|
|
257
233
|
declare function getFilteredItems<T>(items: T[], selectedFilters: Filter<T>[]): T[];
|
|
258
234
|
declare function setFilters<T>(items: T[], filters: Filter<T>[], filter?: Filter<T>, values?: IEquatable[]): T[];
|
|
259
235
|
declare function filtersToParams<T>(filters: Filter<T>[]): FilterParams | null;
|
|
260
|
-
//# sourceMappingURL=filter.service.d.ts.map
|
|
261
236
|
//#endregion
|
|
262
237
|
//#region src/useFilters/useFilters.d.ts
|
|
263
238
|
declare function useFilters<T>(items: T[], featureTypes: IFeatureType[], filterItem: (key: string, item: T, value: IEquatable) => boolean, initialValues?: FilterParams | null): UseFiltersResultType<T>;
|
|
@@ -267,19 +242,15 @@ type UseFiltersResultType<T> = {
|
|
|
267
242
|
setFilter: (filter?: Filter<T>, values?: IEquatable[]) => void;
|
|
268
243
|
itemsWithOmittedKeys: (...keys: string[]) => T[];
|
|
269
244
|
};
|
|
270
|
-
//# sourceMappingURL=useFilters.d.ts.map
|
|
271
245
|
//#endregion
|
|
272
246
|
//#region src/useFocusTrap/useFocusTrap.d.ts
|
|
273
247
|
declare function useFocusTrap<T extends HTMLElement>(ref: MutableRefObject<T | null>, options?: {
|
|
274
248
|
disabled?: boolean;
|
|
275
249
|
selectors?: string;
|
|
276
250
|
}): [boolean, (value: boolean) => void];
|
|
277
|
-
//# sourceMappingURL=useFocusTrap.d.ts.map
|
|
278
251
|
//#endregion
|
|
279
252
|
//#region src/useGenericContext/useGenericContext.d.ts
|
|
280
|
-
declare const createGenericContext: <T>(defaultContext?: T | null) => readonly [() => NonNullable<T>,
|
|
281
|
-
//# sourceMappingURL=useGenericContext.d.ts.map
|
|
282
|
-
|
|
253
|
+
declare const createGenericContext: <T>(defaultContext?: T | null) => readonly [() => NonNullable<T>, react.Provider<T | undefined>, react.Context<T | undefined>];
|
|
283
254
|
//#endregion
|
|
284
255
|
//#region src/useGeolocation/geolocation.service.d.ts
|
|
285
256
|
/**
|
|
@@ -308,15 +279,12 @@ type GeoLocationSensorState = {
|
|
|
308
279
|
};
|
|
309
280
|
declare function getCurrentPosition(options?: PositionOptions): Promise<GeoLocationSensorState>;
|
|
310
281
|
declare function hasGeolocation(): boolean;
|
|
311
|
-
//# sourceMappingURL=geolocation.service.d.ts.map
|
|
312
282
|
//#endregion
|
|
313
283
|
//#region src/useGeolocation/useGeolocation.d.ts
|
|
314
284
|
declare function useGeolocation(options?: PositionOptions): GeoLocationSensorState;
|
|
315
|
-
//# sourceMappingURL=useGeolocation.d.ts.map
|
|
316
285
|
//#endregion
|
|
317
286
|
//#region src/useIdle/useIdle.d.ts
|
|
318
287
|
declare function useIdle(delay?: number, immediate?: boolean): boolean;
|
|
319
|
-
//# sourceMappingURL=useIdle.d.ts.map
|
|
320
288
|
//#endregion
|
|
321
289
|
//#region src/useInfiniteLoader/useInfiniteLoader.d.ts
|
|
322
290
|
declare function useInfiniteLoader<T = any>(items: T[], perPage?: number, delayInMs?: number): [T[], () => void, boolean];
|
|
@@ -324,12 +292,9 @@ declare function useInfiniteLoader<T = any>(items: T[], perPage?: number, delayI
|
|
|
324
292
|
//#region src/useIntersectionObserver/useIntersectionObserver.d.ts
|
|
325
293
|
declare function useIntersectionObserver(ref: MutableRefObject<Node | null>, options?: IntersectionObserverInit): boolean;
|
|
326
294
|
declare function isElement(node?: Node): node is Element;
|
|
327
|
-
//# sourceMappingURL=useIntersectionObserver.d.ts.map
|
|
328
295
|
//#endregion
|
|
329
296
|
//#region src/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts
|
|
330
297
|
declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
331
|
-
//# sourceMappingURL=useIsomorphicLayoutEffect.d.ts.map
|
|
332
|
-
|
|
333
298
|
//#endregion
|
|
334
299
|
//#region src/useKeyboard/codes.d.ts
|
|
335
300
|
/**
|
|
@@ -416,15 +381,14 @@ declare enum KeyCode {
|
|
|
416
381
|
Equal = 187,
|
|
417
382
|
Minus = 189,
|
|
418
383
|
Backquote = 192,
|
|
419
|
-
Backslash = 220
|
|
384
|
+
Backslash = 220
|
|
420
385
|
}
|
|
421
386
|
declare enum KeyMod {
|
|
422
387
|
CtrlCmd = 2048,
|
|
423
388
|
Shift = 1024,
|
|
424
389
|
Alt = 512,
|
|
425
|
-
WinCtrl = 256
|
|
390
|
+
WinCtrl = 256
|
|
426
391
|
}
|
|
427
|
-
//# sourceMappingURL=codes.d.ts.map
|
|
428
392
|
//#endregion
|
|
429
393
|
//#region src/useKeyboard/useKeyboard.d.ts
|
|
430
394
|
declare const useKeyboard: UseKeyboard;
|
|
@@ -447,7 +411,6 @@ type KeyboardResult = {
|
|
|
447
411
|
};
|
|
448
412
|
type UseKeyboardHandler = (event: React$1.KeyboardEvent | KeyboardEvent) => void;
|
|
449
413
|
type UseKeyboard = (handler: UseKeyboardHandler, keyBindings: Array<number> | number, options?: KeyboardOptions) => KeyboardResult;
|
|
450
|
-
//# sourceMappingURL=useKeyboard.d.ts.map
|
|
451
414
|
//#endregion
|
|
452
415
|
//#region src/useLabel/useLabel.d.ts
|
|
453
416
|
type ILabelContext = (key: string, params?: Record<string, any>) => string;
|
|
@@ -523,15 +486,12 @@ declare function MetaDataProvider({
|
|
|
523
486
|
//#endregion
|
|
524
487
|
//#region src/useModal/useModal.d.ts
|
|
525
488
|
declare function useModal(): [modal: UIValue, open: (value?: string) => void, close: () => void];
|
|
526
|
-
//# sourceMappingURL=useModal.d.ts.map
|
|
527
489
|
//#endregion
|
|
528
490
|
//#region src/useMounted/useMounted.d.ts
|
|
529
491
|
declare function useMounted(): boolean;
|
|
530
|
-
//# sourceMappingURL=useMounted.d.ts.map
|
|
531
492
|
//#endregion
|
|
532
493
|
//#region src/useNumber/useNumber.d.ts
|
|
533
494
|
declare function useNumber(options?: Intl.NumberFormatOptions, locale?: string): (value: number) => string;
|
|
534
|
-
//# sourceMappingURL=useNumber.d.ts.map
|
|
535
495
|
//#endregion
|
|
536
496
|
//#region src/usePage/usePage.d.ts
|
|
537
497
|
type IPageContext = ILocalized<IPage>;
|
|
@@ -539,56 +499,6 @@ declare const usePage: () => {
|
|
|
539
499
|
[x: string]: unknown;
|
|
540
500
|
id: _websolutespa_bom_core0.IEquatable;
|
|
541
501
|
schema: string;
|
|
542
|
-
title: string;
|
|
543
|
-
abstract?: string | undefined;
|
|
544
|
-
description?: string | undefined;
|
|
545
|
-
media?: {
|
|
546
|
-
[x: string]: unknown;
|
|
547
|
-
id?: string | undefined;
|
|
548
|
-
alt?: string | undefined;
|
|
549
|
-
filename?: string | undefined;
|
|
550
|
-
mimeType?: string | undefined;
|
|
551
|
-
filesize?: number | undefined;
|
|
552
|
-
focalX?: number | undefined;
|
|
553
|
-
focalY?: number | undefined;
|
|
554
|
-
createdAt?: string | Date | undefined;
|
|
555
|
-
updatedAt?: (Date | string) | undefined;
|
|
556
|
-
url?: string | undefined;
|
|
557
|
-
title?: string | undefined;
|
|
558
|
-
abstract?: string | undefined;
|
|
559
|
-
type: _websolutespa_bom_core0.IMediaType;
|
|
560
|
-
src?: string | undefined;
|
|
561
|
-
media?: /*elided*/any | undefined;
|
|
562
|
-
width?: string | number | undefined;
|
|
563
|
-
height?: string | number | undefined;
|
|
564
|
-
} | undefined;
|
|
565
|
-
meta?: {
|
|
566
|
-
title?: string | undefined;
|
|
567
|
-
description?: string | undefined;
|
|
568
|
-
keywords?: string | undefined;
|
|
569
|
-
robots?: string | undefined;
|
|
570
|
-
image?: {
|
|
571
|
-
[x: string]: unknown;
|
|
572
|
-
id?: string | undefined;
|
|
573
|
-
alt?: string | undefined;
|
|
574
|
-
filename?: string | undefined;
|
|
575
|
-
mimeType?: string | undefined;
|
|
576
|
-
filesize?: number | undefined;
|
|
577
|
-
focalX?: number | undefined;
|
|
578
|
-
focalY?: number | undefined;
|
|
579
|
-
createdAt?: string | Date | undefined;
|
|
580
|
-
updatedAt?: (Date | string) | undefined;
|
|
581
|
-
url?: string | undefined;
|
|
582
|
-
title?: string | undefined;
|
|
583
|
-
abstract?: string | undefined;
|
|
584
|
-
type: _websolutespa_bom_core0.IMediaType;
|
|
585
|
-
src?: string | undefined;
|
|
586
|
-
media?: /*elided*/any | undefined;
|
|
587
|
-
width?: string | number | undefined;
|
|
588
|
-
height?: string | number | undefined;
|
|
589
|
-
} | undefined;
|
|
590
|
-
} | undefined;
|
|
591
|
-
components?: _websolutespa_bom_core0.IComponent[] | undefined;
|
|
592
502
|
category: {
|
|
593
503
|
readonly [x: number]: string;
|
|
594
504
|
[x: string]: unknown;
|
|
@@ -871,14 +781,73 @@ declare const usePage: () => {
|
|
|
871
781
|
href: string;
|
|
872
782
|
};
|
|
873
783
|
slug: string;
|
|
874
|
-
|
|
784
|
+
title: string;
|
|
785
|
+
_status?: string | undefined;
|
|
786
|
+
abstract?: string | undefined;
|
|
787
|
+
components?: _websolutespa_bom_core0.IComponent[] | undefined;
|
|
788
|
+
createdAt?: Date | undefined;
|
|
789
|
+
description?: string | undefined;
|
|
875
790
|
isDefault?: boolean | undefined;
|
|
876
|
-
|
|
877
|
-
order?: number | undefined;
|
|
791
|
+
isProtected?: boolean | undefined;
|
|
878
792
|
markets?: string[] | undefined;
|
|
879
|
-
|
|
793
|
+
media?: {
|
|
794
|
+
[x: string]: unknown;
|
|
795
|
+
id?: string | undefined;
|
|
796
|
+
alt?: string | undefined;
|
|
797
|
+
filename?: string | undefined;
|
|
798
|
+
mimeType?: string | undefined;
|
|
799
|
+
filesize?: number | undefined;
|
|
800
|
+
focalX?: number | undefined;
|
|
801
|
+
focalY?: number | undefined;
|
|
802
|
+
createdAt?: string | Date | undefined;
|
|
803
|
+
updatedAt?: (Date | string) | undefined;
|
|
804
|
+
url?: string | undefined;
|
|
805
|
+
title?: string | undefined;
|
|
806
|
+
abstract?: string | undefined;
|
|
807
|
+
type: _websolutespa_bom_core0.IMediaType;
|
|
808
|
+
src?: string | undefined;
|
|
809
|
+
media?: /*elided*/any | undefined;
|
|
810
|
+
width?: string | number | undefined;
|
|
811
|
+
height?: string | number | undefined;
|
|
812
|
+
} | undefined;
|
|
813
|
+
meta?: {
|
|
814
|
+
title?: string | undefined;
|
|
815
|
+
description?: string | undefined;
|
|
816
|
+
keywords?: string | undefined;
|
|
817
|
+
robots?: string | undefined;
|
|
818
|
+
image?: {
|
|
819
|
+
[x: string]: unknown;
|
|
820
|
+
id?: string | undefined;
|
|
821
|
+
alt?: string | undefined;
|
|
822
|
+
filename?: string | undefined;
|
|
823
|
+
mimeType?: string | undefined;
|
|
824
|
+
filesize?: number | undefined;
|
|
825
|
+
focalX?: number | undefined;
|
|
826
|
+
focalY?: number | undefined;
|
|
827
|
+
createdAt?: string | Date | undefined;
|
|
828
|
+
updatedAt?: (Date | string) | undefined;
|
|
829
|
+
url?: string | undefined;
|
|
830
|
+
title?: string | undefined;
|
|
831
|
+
abstract?: string | undefined;
|
|
832
|
+
type: _websolutespa_bom_core0.IMediaType;
|
|
833
|
+
src?: string | undefined;
|
|
834
|
+
media?: /*elided*/any | undefined;
|
|
835
|
+
width?: string | number | undefined;
|
|
836
|
+
height?: string | number | undefined;
|
|
837
|
+
} | undefined;
|
|
838
|
+
} | undefined;
|
|
839
|
+
order?: number | undefined;
|
|
840
|
+
publicRedirect?: _websolutespa_bom_core0.IEquatable | {
|
|
841
|
+
[x: string]: unknown;
|
|
842
|
+
id: _websolutespa_bom_core0.IEquatable;
|
|
843
|
+
schema?: string | undefined;
|
|
844
|
+
} | {
|
|
845
|
+
relationTo: string;
|
|
846
|
+
value: _websolutespa_bom_core0.IEquatable | _websolutespa_bom_core0.IEquatable[];
|
|
847
|
+
} | undefined;
|
|
848
|
+
template?: string | undefined;
|
|
880
849
|
updatedAt?: Date | undefined;
|
|
881
|
-
|
|
850
|
+
useSplat?: boolean | undefined;
|
|
882
851
|
alternates: _websolutespa_bom_core0.IRoute[];
|
|
883
852
|
breadcrumb: _websolutespa_bom_core0.IRouteLink[];
|
|
884
853
|
href: string;
|
|
@@ -938,7 +907,6 @@ declare function usePageLoading(options?: {
|
|
|
938
907
|
pageRoute: IPageRoute | undefined;
|
|
939
908
|
previousPageRoute: IPageRoute | undefined;
|
|
940
909
|
};
|
|
941
|
-
//# sourceMappingURL=usePageLoading.d.ts.map
|
|
942
910
|
//#endregion
|
|
943
911
|
//#region src/usePagination/pagination.service.d.ts
|
|
944
912
|
type IPaginationItem = any;
|
|
@@ -962,7 +930,6 @@ declare function isPaginationInfo(item: unknown): item is IPaginationInfo;
|
|
|
962
930
|
declare function getPagedItems<T extends IPaginationItem = IPaginationItem>(items: T[], page: number, perPage: number): T[];
|
|
963
931
|
declare function getMoreItems<T extends IPaginationItem = IPaginationItem>(items: T[], page: number, perPage: number): T[];
|
|
964
932
|
declare function getPaginationInfo<T extends IPaginationItem = IPaginationItem>(items: T[], options?: IPaginationOptions): IPaginationInfo<T>;
|
|
965
|
-
//# sourceMappingURL=pagination.service.d.ts.map
|
|
966
933
|
//#endregion
|
|
967
934
|
//#region src/usePagination/usePagination.d.ts
|
|
968
935
|
declare function usePagination<T extends IPaginationItem = IPaginationItem>(items: T[], options?: {
|
|
@@ -977,7 +944,6 @@ declare function usePagination<T extends IPaginationItem = IPaginationItem>(item
|
|
|
977
944
|
goToPreviousPage: () => void;
|
|
978
945
|
setPerPage: (perPage: number) => void;
|
|
979
946
|
};
|
|
980
|
-
//# sourceMappingURL=usePagination.d.ts.map
|
|
981
947
|
//#endregion
|
|
982
948
|
//#region src/usePaginationLegacy/pagination-legacy.service.d.ts
|
|
983
949
|
type IPaginationLegacyInfo<T = any> = {
|
|
@@ -990,7 +956,6 @@ type IPaginationLegacyInfo<T = any> = {
|
|
|
990
956
|
declare function isPaginationLegacyInfo(item: unknown): item is IPaginationLegacyInfo<any>;
|
|
991
957
|
declare function getPagedItemsLegacy<T>(items: T[], page: number, perPage: number): T[];
|
|
992
958
|
declare function getPaginationLegacyInfo<T>(items: T[], page?: number, perPage?: number): IPaginationLegacyInfo<T>;
|
|
993
|
-
//# sourceMappingURL=pagination-legacy.service.d.ts.map
|
|
994
959
|
//#endregion
|
|
995
960
|
//#region src/usePaginationLegacy/usePaginationLegacy.d.ts
|
|
996
961
|
declare function usePaginationLegacy<T>($items: T[], $page?: number, $perPage?: number): {
|
|
@@ -1003,17 +968,14 @@ declare function usePaginationLegacy<T>($items: T[], $page?: number, $perPage?:
|
|
|
1003
968
|
goToPage: (page: number) => void;
|
|
1004
969
|
setPerPage: (perPage: number) => void;
|
|
1005
970
|
};
|
|
1006
|
-
//# sourceMappingURL=usePaginationLegacy.d.ts.map
|
|
1007
971
|
//#endregion
|
|
1008
972
|
//#region src/usePortal/usePortal.d.ts
|
|
1009
973
|
declare function usePortal(name?: string, getContainer?: () => HTMLElement | null): HTMLElement | null;
|
|
1010
974
|
declare function createElementWithId(id: string): HTMLElement;
|
|
1011
975
|
declare function getUID(): string;
|
|
1012
|
-
//# sourceMappingURL=usePortal.d.ts.map
|
|
1013
976
|
//#endregion
|
|
1014
977
|
//#region src/usePrevious/usePrevious.d.ts
|
|
1015
978
|
declare function usePrevious<T>(state: T): T | undefined | null;
|
|
1016
|
-
//# sourceMappingURL=usePrevious.d.ts.map
|
|
1017
979
|
//#endregion
|
|
1018
980
|
//#region src/useRealSize/useRealSize.d.ts
|
|
1019
981
|
type SizeType = {
|
|
@@ -1023,7 +985,6 @@ type SizeType = {
|
|
|
1023
985
|
type SizeResult = [SizeType, () => void];
|
|
1024
986
|
declare function useRealSize<T extends HTMLElement>(ref: MutableRefObject<T | null>): SizeResult;
|
|
1025
987
|
declare function getRealSize(element: HTMLElement | null): SizeType;
|
|
1026
|
-
//# sourceMappingURL=useRealSize.d.ts.map
|
|
1027
988
|
//#endregion
|
|
1028
989
|
//#region src/useReducedMotion/useReducedMotion.d.ts
|
|
1029
990
|
type Props = {
|
|
@@ -1045,11 +1006,9 @@ declare function useReducedMotionLocal(): {
|
|
|
1045
1006
|
setReducedMotionLocal: (reducedMotionLocal: boolean) => void;
|
|
1046
1007
|
toggleReducedMotionLocal: () => void;
|
|
1047
1008
|
};
|
|
1048
|
-
//# sourceMappingURL=useReducedMotionLocal.d.ts.map
|
|
1049
1009
|
//#endregion
|
|
1050
1010
|
//#region src/useResize/useResize.d.ts
|
|
1051
1011
|
declare function useResize(callback: () => unknown, immediate?: boolean): void;
|
|
1052
|
-
//# sourceMappingURL=useResize.d.ts.map
|
|
1053
1012
|
//#endregion
|
|
1054
1013
|
//#region src/useScroll/useScroll.d.ts
|
|
1055
1014
|
type Scroll = {
|
|
@@ -1060,18 +1019,15 @@ declare function useScroll(): Scroll;
|
|
|
1060
1019
|
//#endregion
|
|
1061
1020
|
//#region src/useScrollDirection/useScrollDirection.d.ts
|
|
1062
1021
|
declare function useScrollDirection(callback?: (top: number, left: number) => number): number;
|
|
1063
|
-
//# sourceMappingURL=useScrollDirection.d.ts.map
|
|
1064
1022
|
//#endregion
|
|
1065
1023
|
//#region src/useScrolled/useScrolled.d.ts
|
|
1066
1024
|
declare function useScrolled(callback?: (top: number, left: number) => boolean): boolean;
|
|
1067
|
-
//# sourceMappingURL=useScrolled.d.ts.map
|
|
1068
1025
|
//#endregion
|
|
1069
1026
|
//#region src/useScrollTo/useScrollTo.d.ts
|
|
1070
1027
|
declare function useScrollTo(offset?: number): (event: React.MouseEvent<HTMLElement>) => void;
|
|
1071
1028
|
declare function scrollToSelector(selector?: string, offset?: number): void;
|
|
1072
1029
|
declare function scrollToRelativeY(y?: number, offset?: number): void;
|
|
1073
1030
|
declare function scrollToY(y?: number): void;
|
|
1074
|
-
//# sourceMappingURL=useScrollTo.d.ts.map
|
|
1075
1031
|
//#endregion
|
|
1076
1032
|
//#region src/useSearchParams/useSearchParams.d.ts
|
|
1077
1033
|
declare function getSearchParams(url: string, key?: string): IParams | string | null;
|
|
@@ -1100,7 +1056,6 @@ type IUseSearchParamsValueResult = Omit<IUseSearchParamsResult, 'params'> & {
|
|
|
1100
1056
|
params: string | null;
|
|
1101
1057
|
};
|
|
1102
1058
|
declare function useSearchParamsValue(key: string): IUseSearchParamsValueResult;
|
|
1103
|
-
//# sourceMappingURL=useSearchParams.d.ts.map
|
|
1104
1059
|
//#endregion
|
|
1105
1060
|
//#region src/useSearchParamsEncoded/useSearchParamsEncoded.d.ts
|
|
1106
1061
|
declare function getSearchParamsEncoded(url: string, key?: string): {} | null;
|
|
@@ -1125,7 +1080,6 @@ type IUseSearchParamsEncodedResult = {
|
|
|
1125
1080
|
replaceParamsSilently: (params: IParamsEncoded) => void;
|
|
1126
1081
|
};
|
|
1127
1082
|
declare function useSearchParamsEncoded(key?: string): IUseSearchParamsEncodedResult;
|
|
1128
|
-
//# sourceMappingURL=useSearchParamsEncoded.d.ts.map
|
|
1129
1083
|
//#endregion
|
|
1130
1084
|
//#region src/useSearchParamsQs/useSearchParamsQs.d.ts
|
|
1131
1085
|
type IParamsQs = Record<string, any>;
|
|
@@ -1146,7 +1100,6 @@ declare function pushSearchParamsQsSilently(router: NextRouter, value: IParamsQs
|
|
|
1146
1100
|
declare function replaceSearchParamsQs(router: NextRouter, value: IParamsQs, key?: string): void;
|
|
1147
1101
|
declare function replaceSearchParamsQsSilently(router: NextRouter, value: IParamsQs, key?: string): void;
|
|
1148
1102
|
declare function useSearchParamsQs(key?: string): IUseSearchParamsQsResult;
|
|
1149
|
-
//# sourceMappingURL=useSearchParamsQs.d.ts.map
|
|
1150
1103
|
//#endregion
|
|
1151
1104
|
//#region src/useSorting/useSorting.d.ts
|
|
1152
1105
|
type Sorting<T> = {
|
|
@@ -1158,7 +1111,6 @@ declare function useSorting<T>(items_: T[], callback_: (items: T[], sort?: IEqua
|
|
|
1158
1111
|
sort: string | number | undefined;
|
|
1159
1112
|
setSort: (sort?: IEquatable) => void;
|
|
1160
1113
|
};
|
|
1161
|
-
//# sourceMappingURL=useSorting.d.ts.map
|
|
1162
1114
|
//#endregion
|
|
1163
1115
|
//#region src/useSSR/useSSR.d.ts
|
|
1164
1116
|
type SSRState = {
|
|
@@ -1167,7 +1119,6 @@ type SSRState = {
|
|
|
1167
1119
|
};
|
|
1168
1120
|
declare const detectIsBrowser: () => boolean;
|
|
1169
1121
|
declare function useSSR(): SSRState;
|
|
1170
|
-
//# sourceMappingURL=useSSR.d.ts.map
|
|
1171
1122
|
//#endregion
|
|
1172
1123
|
//#region src/useSyncedRef/useSyncedRef.d.ts
|
|
1173
1124
|
/**
|
|
@@ -1178,12 +1129,9 @@ declare function useSSR(): SSRState;
|
|
|
1178
1129
|
declare function useSyncedRef<T>(value: T): {
|
|
1179
1130
|
readonly current: T;
|
|
1180
1131
|
};
|
|
1181
|
-
//# sourceMappingURL=useSyncedRef.d.ts.map
|
|
1182
1132
|
//#endregion
|
|
1183
1133
|
//#region src/useUnit/useUnit.d.ts
|
|
1184
1134
|
declare function useUnit(unit?: string, locale?: string): (value: number) => string;
|
|
1185
|
-
//# sourceMappingURL=useUnit.d.ts.map
|
|
1186
|
-
|
|
1187
1135
|
//#endregion
|
|
1188
1136
|
//#region src/useUnmountEffect/useUnmountEffect.d.ts
|
|
1189
1137
|
/**
|
|
@@ -1192,7 +1140,6 @@ declare function useUnit(unit?: string, locale?: string): (value: number) => str
|
|
|
1192
1140
|
* @param effect Effector to run on unmount
|
|
1193
1141
|
*/
|
|
1194
1142
|
declare function useUnmountEffect(effect: CallableFunction): void;
|
|
1195
|
-
//# sourceMappingURL=useUnmountEffect.d.ts.map
|
|
1196
1143
|
//#endregion
|
|
1197
1144
|
//#region src/useWindowSize/useWindowSize.d.ts
|
|
1198
1145
|
type WindowSize = {
|