maquinaweb-ui 2.74.0 → 2.75.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics/provider.d.ts +2 -2
- package/dist/container-animation/container-animation.d.ts +2 -2
- package/dist/container-animation/container-animation.d.ts.map +1 -1
- package/dist/date-field/DateField.d.ts +2 -2
- package/dist/date-hour-field/DateHourField.d.ts +2 -2
- package/dist/input-suggest/input-suggest.d.ts +2 -2
- package/dist/input-suggest/input-suggest.d.ts.map +1 -1
- package/dist/kanban-dnd/kanban-card-item.d.ts +2 -2
- package/dist/kanban-dnd/kanban-dnd-monitor.d.ts +2 -2
- package/dist/kanban-dnd/kanban-dropzone.d.ts +2 -2
- package/dist/kanban-dnd/kanban-selector.d.ts +2 -2
- package/dist/landing-text/landing-text.d.ts +2 -2
- package/dist/landing-text/server-landing-text.d.ts +2 -2
- package/dist/page-header/page-header.d.ts +2 -2
- package/dist/remote-selector/remote-selector.d.ts +3 -3
- package/dist/server-infinite-scroll/server-infinite-scroll-items.d.ts +16 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-items.d.ts.map +1 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-items.js +42 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-items.js.map +1 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-list.d.ts +20 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-list.d.ts.map +1 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-list.js +121 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-list.js.map +1 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-observer.d.ts +23 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-observer.d.ts.map +1 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-observer.js +54 -0
- package/dist/server-infinite-scroll/server-infinite-scroll-observer.js.map +1 -0
- package/dist/server-infinite-scroll/server-infinite-scroll.d.ts +13 -0
- package/dist/server-infinite-scroll/server-infinite-scroll.d.ts.map +1 -0
- package/dist/server-infinite-scroll/server-infinite-scroll.js +32 -0
- package/dist/server-infinite-scroll/server-infinite-scroll.js.map +1 -0
- package/dist/server-infinite-scroll/types.d.ts +50 -0
- package/dist/server-infinite-scroll/types.d.ts.map +1 -0
- package/dist/server-infinite-scroll.d.ts +6 -0
- package/dist/server-infinite-scroll.js +6 -0
- package/dist/split-text-poor/split-text-poor.d.ts.map +1 -1
- package/dist/toggle-field/ToggleGroup.d.ts +2 -2
- package/package.json +6 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnalyticsConfig } from "./types.js";
|
|
2
2
|
import { trackConversion, trackEvent, trackPageView } from "./core.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/analytics/provider.d.ts
|
|
6
6
|
declare function AnalyticsProvider({
|
|
@@ -9,7 +9,7 @@ declare function AnalyticsProvider({
|
|
|
9
9
|
}: {
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
config?: AnalyticsConfig;
|
|
12
|
-
}):
|
|
12
|
+
}): react_jsx_runtime3.JSX.Element;
|
|
13
13
|
declare function useAnalytics(): {
|
|
14
14
|
enabled: boolean;
|
|
15
15
|
trackPageView: typeof trackPageView;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps, ElementType } from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/container-animation/container-animation.d.ts
|
|
5
5
|
type ContainerAnimationProps<T extends ElementType = 'div'> = ComponentProps<'div'> & ComponentProps<T> & {
|
|
@@ -23,7 +23,7 @@ declare const ContainerAnimation: <T extends ElementType = "div">({
|
|
|
23
23
|
distance,
|
|
24
24
|
hideNotInView,
|
|
25
25
|
...props
|
|
26
|
-
}: ContainerAnimationProps<T>) =>
|
|
26
|
+
}: ContainerAnimationProps<T>) => react_jsx_runtime9.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { ContainerAnimation, ContainerAnimationProps };
|
|
29
29
|
//# sourceMappingURL=container-animation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-animation.d.ts","names":[],"sources":["../../src/components/container-animation/container-animation.tsx"],"sourcesContent":[],"mappings":";;;;KAiDY,kCAAkC,uBAC5C,wBACE,eAAe;;;EAFP,KAAA,CAAA,EAAA,MAAA;EAAkC,QAAA,CAAA,EAAA,MAAA;EAC5C,QAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;EACiB,aAAA,CAAA,EAAA,OAAA;EAAf,EAAA,CAAA,EAOO,CAPP,GAAA,MAAA;EAOO,SAAA,CAAA,EAAA,MAAA;CAAC;AAEN,cAEA,kBAkCL,EAAA,CAAA,UAlCqC,WAkCrC,GAAA,KAAA,CAAA,CAAA;EAAA,SAAA;EAAA,QAAA;EAAA,QAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,EAAA,EAlC0D,EAkC1D;EAAA,QAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAvBE,uBAuBF,CAvB0B,CAuB1B,CAAA,EAAA,GAvB4B,
|
|
1
|
+
{"version":3,"file":"container-animation.d.ts","names":[],"sources":["../../src/components/container-animation/container-animation.tsx"],"sourcesContent":[],"mappings":";;;;KAiDY,kCAAkC,uBAC5C,wBACE,eAAe;;;EAFP,KAAA,CAAA,EAAA,MAAA;EAAkC,QAAA,CAAA,EAAA,MAAA;EAC5C,QAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA;EACiB,aAAA,CAAA,EAAA,OAAA;EAAf,EAAA,CAAA,EAOO,CAPP,GAAA,MAAA;EAOO,SAAA,CAAA,EAAA,MAAA;CAAC;AAEN,cAEA,kBAkCL,EAAA,CAAA,UAlCqC,WAkCrC,GAAA,KAAA,CAAA,CAAA;EAAA,SAAA;EAAA,QAAA;EAAA,QAAA;EAAA,KAAA;EAAA,KAAA;EAAA,QAAA;EAAA,EAAA,EAlC0D,EAkC1D;EAAA,QAAA;EAAA,aAAA;EAAA,GAAA;AAAA,CAAA,EAvBE,uBAuBF,CAvB0B,CAuB1B,CAAA,EAAA,GAvB4B,kBAAA,CAAA,GAAA,CAAA,OAuB5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { Matcher } from "react-day-picker";
|
|
4
4
|
|
|
5
5
|
//#region src/components/date-field/DateField.d.ts
|
|
@@ -29,7 +29,7 @@ declare function DateField<TFieldValues extends FieldValues = FieldValues, TFiel
|
|
|
29
29
|
required,
|
|
30
30
|
help,
|
|
31
31
|
dateOnly
|
|
32
|
-
}: DateFieldProps<TFieldValues, TFieldName>):
|
|
32
|
+
}: DateFieldProps<TFieldValues, TFieldName>): react_jsx_runtime0.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { DateField, DateFieldProps };
|
|
35
35
|
//# sourceMappingURL=DateField.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
import { Matcher } from "react-day-picker";
|
|
4
4
|
|
|
5
5
|
//#region src/components/date-hour-field/DateHourField.d.ts
|
|
@@ -29,7 +29,7 @@ declare function DateHourField<TFieldValues extends FieldValues = FieldValues, T
|
|
|
29
29
|
help,
|
|
30
30
|
hourPlaceholder,
|
|
31
31
|
valueType
|
|
32
|
-
}: DateHourFieldProps<TFieldValues, TFieldName>):
|
|
32
|
+
}: DateHourFieldProps<TFieldValues, TFieldName>): react_jsx_runtime4.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { DateHourField, DateHourFieldProps };
|
|
35
35
|
//# sourceMappingURL=DateHourField.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Mask, Options } from "../src/hooks/with-mask.js";
|
|
2
2
|
import { FieldPath, FieldValues, UseControllerProps } from "react-hook-form";
|
|
3
3
|
import { Dispatch, SetStateAction } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
5
5
|
import { PopoverProps } from "@radix-ui/react-popover";
|
|
6
6
|
|
|
7
7
|
//#region src/components/input-suggest/input-suggest.d.ts
|
|
@@ -71,7 +71,7 @@ declare function InputSuggest<TFieldValues extends FieldValues = FieldValues, TF
|
|
|
71
71
|
debounceTime,
|
|
72
72
|
maxWait,
|
|
73
73
|
...props
|
|
74
|
-
}: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps):
|
|
74
|
+
}: InputSuggestProps<TFieldValues, TFieldName> & PopoverProps): react_jsx_runtime10.JSX.Element;
|
|
75
75
|
//#endregion
|
|
76
76
|
export { InputSuggest, InputSuggestProps };
|
|
77
77
|
//# sourceMappingURL=input-suggest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-suggest.d.ts","names":[],"sources":["../../src/components/input-suggest/input-suggest.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAmCiB,uCACM,cAAc,gCAChB,UAAU,gBAAgB,UAAU,uBAC/C,mBAAmB,cAAc;;;EAH1B,QAAA,CAAA,EAAA,CAAA,MAAA,EAAiB,MAAA,EAAA,GAAA,IAAA;EACX,QAAA,CAAA,EAMV,QANU,CAMD,cANC,CAAA,MAAA,CAAA,CAAA;EAAc,KAAA,CAAA,EAAA,MAAA;EACN,WAAA,CAAA,EAAA,MAAA;EAAV,SAAA,CAAA,EAAA,MAAA;EAAoC,OAAA,EAAA,CAAA,MAAA,CAAA,EAAA,MAAA,EAAA,aAAA,CAAA,EAWrC,MAXqC,EAA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AAA,CAAA,OAAA,EAAA,GAAA,EAAA,GAAA,GAAA;EAAV,KAAA,CAAA,EAAA,MAAA;EAE7C,UAAA,CAAA,EAAA,MAAA;EACA,IAAA,CAAA,EAbO,IAaP;EACA,WAAA,CAAA,EAbc,OAad;EACA,aAAA,CAAA,EAbgB,MAahB;EACA,OAAA,CAAA,EAAA,GAAA,GAAA,IAAA;EACA,YAAA,CAAA,EAAA,MAAA;EACA,OAAA,CAAA,EAAA,MAAA;;iBAVO,YAYP,CAAA,qBAXqB,WAWrB,GAXmC,WAWnC,EAAA,mBAVmB,SAUnB,CAV6B,YAU7B,CAAA,GAV6C,SAU7C,CAVuD,YAUvD,CAAA,CAAA,CAAA;EAAA,IAAA;EAAA,UAAA;EAAA,QAAA;EAAA,UAAA;EAAA,KAAA;EAAA,SAAA;EAAA,WAAA;EAAA,OAAA;EAAA,QAAA;EAAA,QAAA;EAAA,QAAA;EAAA,kBAAA;EAAA,KAAA;EAAA,KAAA;EAAA,YAAA;EAAA,UAAA;EAAA,OAAA;EAAA,IAAA;EAAA,MAAA;EAAA,WAAA;EAAA,aAAA;EAAA,KAAA;EAAA,IAAA;EAAA,WAAA;EAAA,QAAA;EAAA,OAAA;EAAA,aAAA;EAAA,YAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAsBC,iBAtBD,CAsBmB,YAtBnB,EAsBiC,UAtBjC,CAAA,GAsB+C,YAtB/C,CAAA,EAsB2D,mBAAA,CAAA,GAAA,CAAA,OAtB3D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KanbanCardItemProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/kanban-dnd/kanban-card-item.d.ts
|
|
5
5
|
declare function KanbanCardItem({
|
|
@@ -8,7 +8,7 @@ declare function KanbanCardItem({
|
|
|
8
8
|
className,
|
|
9
9
|
getSelectedCardIds,
|
|
10
10
|
getSelectableItems
|
|
11
|
-
}: KanbanCardItemProps):
|
|
11
|
+
}: KanbanCardItemProps): react_jsx_runtime21.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { KanbanCardItem };
|
|
14
14
|
//# sourceMappingURL=kanban-card-item.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KanbanDndMonitorProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/kanban-dnd/kanban-dnd-monitor.d.ts
|
|
5
5
|
declare function KanbanDndMonitor<TColumn>({
|
|
@@ -23,7 +23,7 @@ declare function KanbanDndMonitor<TColumn>({
|
|
|
23
23
|
isAutoScrollEnabled,
|
|
24
24
|
renderIdleLayer,
|
|
25
25
|
className
|
|
26
|
-
}: KanbanDndMonitorProps<TColumn>):
|
|
26
|
+
}: KanbanDndMonitorProps<TColumn>): react_jsx_runtime20.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { KanbanDndMonitor };
|
|
29
29
|
//# sourceMappingURL=kanban-dnd-monitor.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KanbanDropZoneProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/kanban-dnd/kanban-dropzone.d.ts
|
|
5
5
|
declare function KanbanDropZone({
|
|
@@ -7,7 +7,7 @@ declare function KanbanDropZone({
|
|
|
7
7
|
id,
|
|
8
8
|
className,
|
|
9
9
|
isOverClassName
|
|
10
|
-
}: KanbanDropZoneProps):
|
|
10
|
+
}: KanbanDropZoneProps): react_jsx_runtime23.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { KanbanDropZone };
|
|
13
13
|
//# sourceMappingURL=kanban-dropzone.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { KanbanSelectorProps } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/kanban-dnd/kanban-selector.d.ts
|
|
5
5
|
declare function KanbanSelector({
|
|
6
6
|
dragAreaId,
|
|
7
7
|
autoScrollMargin,
|
|
8
8
|
ignoredSlots
|
|
9
|
-
}: KanbanSelectorProps):
|
|
9
|
+
}: KanbanSelectorProps): react_jsx_runtime22.JSX.Element | null;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { KanbanSelector };
|
|
12
12
|
//# sourceMappingURL=kanban-selector.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LandingTextProps } from "./types.js";
|
|
2
2
|
import { ElementType } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/landing-text/landing-text.d.ts
|
|
6
|
-
declare function LandingText<TAs extends ElementType = 'span'>(props: LandingTextProps<TAs>): Promise<
|
|
6
|
+
declare function LandingText<TAs extends ElementType = 'span'>(props: LandingTextProps<TAs>): Promise<react_jsx_runtime11.JSX.Element>;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { LandingText };
|
|
9
9
|
//# sourceMappingURL=landing-text.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ServerLandingTextProps } from "./types.js";
|
|
2
2
|
import { ElementType } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/landing-text/server-landing-text.d.ts
|
|
6
6
|
declare function ServerLandingText<TAs extends ElementType = 'span'>({
|
|
@@ -9,7 +9,7 @@ declare function ServerLandingText<TAs extends ElementType = 'span'>({
|
|
|
9
9
|
className,
|
|
10
10
|
registration,
|
|
11
11
|
...props
|
|
12
|
-
}: ServerLandingTextProps<TAs>):
|
|
12
|
+
}: ServerLandingTextProps<TAs>): react_jsx_runtime12.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { ServerLandingText };
|
|
15
15
|
//# sourceMappingURL=server-landing-text.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/page-header/page-header.d.ts
|
|
4
4
|
interface PageHeaderProps {
|
|
@@ -10,7 +10,7 @@ declare function PageHeader({
|
|
|
10
10
|
title,
|
|
11
11
|
help,
|
|
12
12
|
description
|
|
13
|
-
}: PageHeaderProps):
|
|
13
|
+
}: PageHeaderProps): react_jsx_runtime0.JSX.Element;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { PageHeader, PageHeaderProps };
|
|
16
16
|
//# sourceMappingURL=page-header.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectorProps } from "../ui/selector.js";
|
|
2
2
|
import { FieldPath, FieldPathValue, FieldValues, UseControllerProps } from "react-hook-form";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
4
4
|
import { Options } from "nuqs";
|
|
5
5
|
|
|
6
6
|
//#region src/components/remote-selector/remote-selector.d.ts
|
|
@@ -38,7 +38,7 @@ declare function RemoteSelectorField<T, TFieldValues extends FieldValues = Field
|
|
|
38
38
|
...props
|
|
39
39
|
}: RemoteSelectorFieldProps<TFieldValues, TFieldName> & BaseRemoteSelectorProps<T> & {
|
|
40
40
|
withPortal?: boolean;
|
|
41
|
-
}):
|
|
41
|
+
}): react_jsx_runtime1.JSX.Element;
|
|
42
42
|
interface RemoteSelectorQueryProps<T> extends BaseRemoteSelectorProps<T> {
|
|
43
43
|
name: string;
|
|
44
44
|
defaultValue?: string;
|
|
@@ -58,7 +58,7 @@ declare function RemoteSelectorQuery<T>({
|
|
|
58
58
|
fieldLabel,
|
|
59
59
|
type,
|
|
60
60
|
...props
|
|
61
|
-
}: RemoteSelectorQueryProps<T>):
|
|
61
|
+
}: RemoteSelectorQueryProps<T>): react_jsx_runtime1.JSX.Element;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { BaseRemoteSelectorProps, RemoteSelectorField, RemoteSelectorFieldProps, RemoteSelectorQuery, RemoteSelectorQueryProps, TUseData };
|
|
64
64
|
//# sourceMappingURL=remote-selector.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ServerInfiniteScrollItemsProps } from "./types.js";
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/server-infinite-scroll/server-infinite-scroll-items.d.ts
|
|
5
|
+
declare function ServerInfiniteScrollItems<TPage>({
|
|
6
|
+
data,
|
|
7
|
+
previousPageData,
|
|
8
|
+
nextPageData,
|
|
9
|
+
paginationResultsKey,
|
|
10
|
+
itemPropName,
|
|
11
|
+
itemKey,
|
|
12
|
+
children
|
|
13
|
+
}: ServerInfiniteScrollItemsProps<TPage>): react_jsx_runtime13.JSX.Element | null;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { ServerInfiniteScrollItems };
|
|
16
|
+
//# sourceMappingURL=server-infinite-scroll-items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-infinite-scroll-items.d.ts","names":[],"sources":["../../src/components/server-infinite-scroll/server-infinite-scroll-items.tsx"],"sourcesContent":[],"mappings":";;;;iBAuBS;;;;;;;;GAQN,+BAA+B,SAAM,mBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cloneElement, isValidElement } from "react";
|
|
2
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/server-infinite-scroll/server-infinite-scroll-items.tsx
|
|
5
|
+
function getPageResults(data, paginationResultsKey) {
|
|
6
|
+
if (!data || typeof data !== "object") return [];
|
|
7
|
+
const results = data[paginationResultsKey];
|
|
8
|
+
return Array.isArray(results) ? results : [];
|
|
9
|
+
}
|
|
10
|
+
function getItemKey(item, itemKey, index) {
|
|
11
|
+
if (item && typeof item === "object") {
|
|
12
|
+
const key = item[itemKey];
|
|
13
|
+
if (typeof key === "string" || typeof key === "number") return key;
|
|
14
|
+
}
|
|
15
|
+
return index;
|
|
16
|
+
}
|
|
17
|
+
function ServerInfiniteScrollItems({ data, previousPageData, nextPageData, paginationResultsKey = "results", itemPropName = "data", itemKey = "id", children }) {
|
|
18
|
+
if (!isValidElement(children)) {
|
|
19
|
+
console.error("ServerInfiniteScrollItems: children must be a valid React element");
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
const results = getPageResults(data, paginationResultsKey);
|
|
23
|
+
const previousResults = getPageResults(previousPageData, paginationResultsKey);
|
|
24
|
+
const nextResults = getPageResults(nextPageData, paginationResultsKey);
|
|
25
|
+
const isNativeDomElement = typeof children.type === "string";
|
|
26
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: results.map((item, index) => {
|
|
27
|
+
const previousItem = index > 0 ? results[index - 1] : previousResults[previousResults.length - 1];
|
|
28
|
+
const nextItem = index < results.length - 1 ? results[index + 1] : nextResults[0];
|
|
29
|
+
return cloneElement(children, {
|
|
30
|
+
[itemPropName]: item,
|
|
31
|
+
...isNativeDomElement ? {} : {
|
|
32
|
+
nextItem,
|
|
33
|
+
previousItem
|
|
34
|
+
},
|
|
35
|
+
key: getItemKey(item, itemKey, index)
|
|
36
|
+
});
|
|
37
|
+
}) });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { ServerInfiniteScrollItems, getPageResults };
|
|
42
|
+
//# sourceMappingURL=server-infinite-scroll-items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-infinite-scroll-items.js","names":[],"sources":["../../src/components/server-infinite-scroll/server-infinite-scroll-items.tsx"],"sourcesContent":["import { cloneElement, isValidElement } from 'react';\n\nimport type { ServerInfiniteScrollItemsProps } from './types';\n\nfunction getPageResults<TPage>(\n data: TPage | undefined,\n paginationResultsKey: string\n) {\n if (!data || typeof data !== 'object') return [];\n\n const results = (data as Record<string, unknown>)[paginationResultsKey];\n return Array.isArray(results) ? results : [];\n}\n\nfunction getItemKey(item: unknown, itemKey: string, index: number) {\n if (item && typeof item === 'object') {\n const key = (item as Record<string, unknown>)[itemKey];\n if (typeof key === 'string' || typeof key === 'number') return key;\n }\n\n return index;\n}\n\nfunction ServerInfiniteScrollItems<TPage>({\n data,\n previousPageData,\n nextPageData,\n paginationResultsKey = 'results',\n itemPropName = 'data',\n itemKey = 'id',\n children,\n}: ServerInfiniteScrollItemsProps<TPage>) {\n if (!isValidElement(children)) {\n console.error(\n 'ServerInfiniteScrollItems: children must be a valid React element'\n );\n return null;\n }\n\n const results = getPageResults(data, paginationResultsKey);\n const previousResults = getPageResults(\n previousPageData,\n paginationResultsKey\n );\n const nextResults = getPageResults(nextPageData, paginationResultsKey);\n const isNativeDomElement = typeof children.type === 'string';\n\n return (\n <>\n {results.map((item, index) => {\n const previousItem =\n index > 0\n ? results[index - 1]\n : previousResults[previousResults.length - 1];\n const nextItem =\n index < results.length - 1 ? results[index + 1] : nextResults[0];\n\n return cloneElement(children as React.ReactElement<any>, {\n [itemPropName]: item,\n ...(isNativeDomElement ? {} : { nextItem, previousItem }),\n key: getItemKey(item, itemKey, index),\n });\n })}\n </>\n );\n}\n\nexport { getPageResults, ServerInfiniteScrollItems };\n"],"mappings":";;;;AAIA,SAAS,eACP,MACA,sBACA;AACA,KAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,QAAO,EAAE;CAEhD,MAAM,UAAW,KAAiC;AAClD,QAAO,MAAM,QAAQ,QAAQ,GAAG,UAAU,EAAE;;AAG9C,SAAS,WAAW,MAAe,SAAiB,OAAe;AACjE,KAAI,QAAQ,OAAO,SAAS,UAAU;EACpC,MAAM,MAAO,KAAiC;AAC9C,MAAI,OAAO,QAAQ,YAAY,OAAO,QAAQ,SAAU,QAAO;;AAGjE,QAAO;;AAGT,SAAS,0BAAiC,EACxC,MACA,kBACA,cACA,uBAAuB,WACvB,eAAe,QACf,UAAU,MACV,YACwC;AACxC,KAAI,CAAC,eAAe,SAAS,EAAE;AAC7B,UAAQ,MACN,oEACD;AACD,SAAO;;CAGT,MAAM,UAAU,eAAe,MAAM,qBAAqB;CAC1D,MAAM,kBAAkB,eACtB,kBACA,qBACD;CACD,MAAM,cAAc,eAAe,cAAc,qBAAqB;CACtE,MAAM,qBAAqB,OAAO,SAAS,SAAS;AAEpD,QACE,4CACG,QAAQ,KAAK,MAAM,UAAU;EAC5B,MAAM,eACJ,QAAQ,IACJ,QAAQ,QAAQ,KAChB,gBAAgB,gBAAgB,SAAS;EAC/C,MAAM,WACJ,QAAQ,QAAQ,SAAS,IAAI,QAAQ,QAAQ,KAAK,YAAY;AAEhE,SAAO,aAAa,UAAqC;IACtD,eAAe;GAChB,GAAI,qBAAqB,EAAE,GAAG;IAAE;IAAU;IAAc;GACxD,KAAK,WAAW,MAAM,SAAS,MAAM;GACtC,CAAC;GACF,GACD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ServerInfiniteScrollListProps } from "./types.js";
|
|
2
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/server-infinite-scroll/server-infinite-scroll-list.d.ts
|
|
5
|
+
declare function ServerInfiniteScrollList<TPage>({
|
|
6
|
+
data,
|
|
7
|
+
page,
|
|
8
|
+
fetchPageAction,
|
|
9
|
+
config,
|
|
10
|
+
containerId,
|
|
11
|
+
emptyState,
|
|
12
|
+
loadingState,
|
|
13
|
+
observerRootMargin,
|
|
14
|
+
observerThreshold,
|
|
15
|
+
className,
|
|
16
|
+
children
|
|
17
|
+
}: ServerInfiniteScrollListProps<TPage>): react_jsx_runtime14.JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ServerInfiniteScrollList };
|
|
20
|
+
//# sourceMappingURL=server-infinite-scroll-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-infinite-scroll-list.d.ts","names":[],"sources":["../../src/components/server-infinite-scroll/server-infinite-scroll-list.tsx"],"sourcesContent":[],"mappings":";;;;iBAgCS;;;;;;;;;;;;GAYN,8BAA8B,SAAM,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { cn } from "../src/lib/utils.js";
|
|
5
|
+
import { ServerInfiniteScrollItems, getPageResults } from "./server-infinite-scroll-items.js";
|
|
6
|
+
import { ServerInfiniteScrollObserver } from "./server-infinite-scroll-observer.js";
|
|
7
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
|
|
10
|
+
//#region src/components/server-infinite-scroll/server-infinite-scroll-list.tsx
|
|
11
|
+
const DEFAULT_EMPTY_STATE = /* @__PURE__ */ jsx("div", {
|
|
12
|
+
className: "flex w-full justify-center py-4 text-xs text-muted-foreground",
|
|
13
|
+
children: "Nenhum dado encontrado"
|
|
14
|
+
});
|
|
15
|
+
function hasPaginationValue(data, paginationKey) {
|
|
16
|
+
if (!data || typeof data !== "object") return false;
|
|
17
|
+
const value = data[paginationKey];
|
|
18
|
+
return value !== null && value !== void 0 && value !== false;
|
|
19
|
+
}
|
|
20
|
+
function ServerInfiniteScrollList({ data, page = 1, fetchPageAction, config, containerId, emptyState, loadingState, observerRootMargin, observerThreshold, className, children }) {
|
|
21
|
+
const paginationResultsKey = config?.paginationResultsKey ?? "results";
|
|
22
|
+
const paginationNextKey = config?.paginationNextKey ?? "next";
|
|
23
|
+
const paginationPreviousKey = config?.paginationPreviousKey ?? "previous";
|
|
24
|
+
const itemPropName = config?.itemPropName ?? "data";
|
|
25
|
+
const itemKey = config?.itemKey ?? "id";
|
|
26
|
+
const [pages, setPages] = useState(data ? [{
|
|
27
|
+
data,
|
|
28
|
+
page
|
|
29
|
+
}] : []);
|
|
30
|
+
const pagesRef = useRef(pages);
|
|
31
|
+
const loadingPagesRef = useRef(/* @__PURE__ */ new Set());
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
pagesRef.current = pages;
|
|
34
|
+
}, [pages]);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (!data) return;
|
|
37
|
+
setPages((currentPages) => {
|
|
38
|
+
const pageIndex = currentPages.findIndex((currentPage) => currentPage.page === page);
|
|
39
|
+
if (pageIndex >= 0) {
|
|
40
|
+
const updatedPages = [...currentPages];
|
|
41
|
+
updatedPages[pageIndex] = {
|
|
42
|
+
data,
|
|
43
|
+
page
|
|
44
|
+
};
|
|
45
|
+
return updatedPages;
|
|
46
|
+
}
|
|
47
|
+
return [...currentPages, {
|
|
48
|
+
data,
|
|
49
|
+
page
|
|
50
|
+
}].sort((a, b) => a.page - b.page);
|
|
51
|
+
});
|
|
52
|
+
}, [data, page]);
|
|
53
|
+
const loadPage = useCallback(async (direction) => {
|
|
54
|
+
const currentPages = pagesRef.current;
|
|
55
|
+
const firstPage$1 = currentPages[0];
|
|
56
|
+
const lastPage$1 = currentPages[currentPages.length - 1];
|
|
57
|
+
const boundaryPage = direction === "previous" ? firstPage$1 : lastPage$1;
|
|
58
|
+
if (!boundaryPage || !fetchPageAction) return;
|
|
59
|
+
const nextPage = direction === "previous" ? boundaryPage.page - 1 : boundaryPage.page + 1;
|
|
60
|
+
if (nextPage < 1) return;
|
|
61
|
+
if (currentPages.some((currentPage) => currentPage.page === nextPage) || loadingPagesRef.current.has(nextPage)) return;
|
|
62
|
+
const paginationKey = direction === "previous" ? paginationPreviousKey : paginationNextKey;
|
|
63
|
+
if (!hasPaginationValue(boundaryPage.data, paginationKey)) return;
|
|
64
|
+
loadingPagesRef.current.add(nextPage);
|
|
65
|
+
try {
|
|
66
|
+
const nextData = await fetchPageAction(nextPage);
|
|
67
|
+
setPages((currentPages$1) => {
|
|
68
|
+
if (currentPages$1.some((currentPage) => currentPage.page === nextPage)) return currentPages$1;
|
|
69
|
+
return [...currentPages$1, {
|
|
70
|
+
data: nextData,
|
|
71
|
+
page: nextPage
|
|
72
|
+
}].sort((a, b) => a.page - b.page);
|
|
73
|
+
});
|
|
74
|
+
} finally {
|
|
75
|
+
loadingPagesRef.current.delete(nextPage);
|
|
76
|
+
}
|
|
77
|
+
}, [
|
|
78
|
+
fetchPageAction,
|
|
79
|
+
paginationNextKey,
|
|
80
|
+
paginationPreviousKey
|
|
81
|
+
]);
|
|
82
|
+
const hasItems = useMemo(() => pages.some((pageData) => getPageResults(pageData.data, paginationResultsKey).length > 0), [pages, paginationResultsKey]);
|
|
83
|
+
const firstPage = pages[0];
|
|
84
|
+
const lastPage = pages[pages.length - 1];
|
|
85
|
+
const canLoadPrevious = !!firstPage && firstPage.page > 1 && hasPaginationValue(firstPage.data, paginationPreviousKey);
|
|
86
|
+
const canLoadNext = !!lastPage && hasPaginationValue(lastPage.data, paginationNextKey);
|
|
87
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
88
|
+
className: cn("contents", className),
|
|
89
|
+
children: [
|
|
90
|
+
canLoadPrevious && /* @__PURE__ */ jsx(ServerInfiniteScrollObserver, {
|
|
91
|
+
containerId,
|
|
92
|
+
direction: "previous",
|
|
93
|
+
loadingState,
|
|
94
|
+
loadPage: () => loadPage("previous"),
|
|
95
|
+
rootMargin: observerRootMargin,
|
|
96
|
+
threshold: observerThreshold
|
|
97
|
+
}),
|
|
98
|
+
hasItems ? pages.map((pageData, index) => /* @__PURE__ */ jsx(ServerInfiniteScrollItems, {
|
|
99
|
+
data: pageData.data,
|
|
100
|
+
itemKey,
|
|
101
|
+
itemPropName,
|
|
102
|
+
nextPageData: pages[index + 1]?.data,
|
|
103
|
+
paginationResultsKey,
|
|
104
|
+
previousPageData: pages[index - 1]?.data,
|
|
105
|
+
children
|
|
106
|
+
}, `server-infinite-scroll-page-${pageData.page}`)) : emptyState ?? DEFAULT_EMPTY_STATE,
|
|
107
|
+
canLoadNext && /* @__PURE__ */ jsx(ServerInfiniteScrollObserver, {
|
|
108
|
+
containerId,
|
|
109
|
+
direction: "next",
|
|
110
|
+
loadingState,
|
|
111
|
+
loadPage: () => loadPage("next"),
|
|
112
|
+
rootMargin: observerRootMargin,
|
|
113
|
+
threshold: observerThreshold
|
|
114
|
+
})
|
|
115
|
+
]
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
//#endregion
|
|
120
|
+
export { ServerInfiniteScrollList };
|
|
121
|
+
//# sourceMappingURL=server-infinite-scroll-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-infinite-scroll-list.js","names":["firstPage","lastPage","currentPages"],"sources":["../../src/components/server-infinite-scroll/server-infinite-scroll-list.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { cn } from '@/lib/utils';\nimport {\n getPageResults,\n ServerInfiniteScrollItems,\n} from './server-infinite-scroll-items';\nimport { ServerInfiniteScrollObserver } from './server-infinite-scroll-observer';\nimport type {\n ServerInfiniteScrollDirection,\n ServerInfiniteScrollListProps,\n ServerInfiniteScrollPage,\n} from './types';\n\nconst DEFAULT_EMPTY_STATE = (\n <div className=\"flex w-full justify-center py-4 text-xs text-muted-foreground\">\n Nenhum dado encontrado\n </div>\n);\n\nfunction hasPaginationValue<TPage>(\n data: TPage | undefined,\n paginationKey: string\n) {\n if (!data || typeof data !== 'object') return false;\n\n const value = (data as Record<string, unknown>)[paginationKey];\n return value !== null && value !== undefined && value !== false;\n}\n\nfunction ServerInfiniteScrollList<TPage>({\n data,\n page = 1,\n fetchPageAction,\n config,\n containerId,\n emptyState,\n loadingState,\n observerRootMargin,\n observerThreshold,\n className,\n children,\n}: ServerInfiniteScrollListProps<TPage>) {\n const paginationResultsKey = config?.paginationResultsKey ?? 'results';\n const paginationNextKey = config?.paginationNextKey ?? 'next';\n const paginationPreviousKey = config?.paginationPreviousKey ?? 'previous';\n const itemPropName = config?.itemPropName ?? 'data';\n const itemKey = config?.itemKey ?? 'id';\n\n const [pages, setPages] = useState<ServerInfiniteScrollPage<TPage>[]>(\n data ? [{ data, page }] : []\n );\n const pagesRef = useRef(pages);\n const loadingPagesRef = useRef(new Set<number>());\n\n useEffect(() => {\n pagesRef.current = pages;\n }, [pages]);\n\n useEffect(() => {\n if (!data) return;\n\n setPages((currentPages) => {\n const pageIndex = currentPages.findIndex(\n (currentPage) => currentPage.page === page\n );\n\n if (pageIndex >= 0) {\n const updatedPages = [...currentPages];\n updatedPages[pageIndex] = { data, page };\n return updatedPages;\n }\n\n return [...currentPages, { data, page }].sort((a, b) => a.page - b.page);\n });\n }, [data, page]);\n\n const loadPage = useCallback(\n async (direction: ServerInfiniteScrollDirection) => {\n const currentPages = pagesRef.current;\n const firstPage = currentPages[0];\n const lastPage = currentPages[currentPages.length - 1];\n const boundaryPage = direction === 'previous' ? firstPage : lastPage;\n\n if (!boundaryPage || !fetchPageAction) return;\n\n const nextPage =\n direction === 'previous'\n ? boundaryPage.page - 1\n : boundaryPage.page + 1;\n\n if (nextPage < 1) return;\n\n const pageExists = currentPages.some(\n (currentPage) => currentPage.page === nextPage\n );\n if (pageExists || loadingPagesRef.current.has(nextPage)) return;\n\n const paginationKey =\n direction === 'previous' ? paginationPreviousKey : paginationNextKey;\n\n if (!hasPaginationValue(boundaryPage.data, paginationKey)) return;\n\n loadingPagesRef.current.add(nextPage);\n\n try {\n const nextData = await fetchPageAction(nextPage);\n\n setPages((currentPages) => {\n if (\n currentPages.some((currentPage) => currentPage.page === nextPage)\n ) {\n return currentPages;\n }\n\n return [...currentPages, { data: nextData, page: nextPage }].sort(\n (a, b) => a.page - b.page\n );\n });\n } finally {\n loadingPagesRef.current.delete(nextPage);\n }\n },\n [fetchPageAction, paginationNextKey, paginationPreviousKey]\n );\n\n const hasItems = useMemo(\n () =>\n pages.some(\n (pageData) =>\n getPageResults(pageData.data, paginationResultsKey).length > 0\n ),\n [pages, paginationResultsKey]\n );\n\n const firstPage = pages[0];\n const lastPage = pages[pages.length - 1];\n const canLoadPrevious =\n !!firstPage &&\n firstPage.page > 1 &&\n hasPaginationValue(firstPage.data, paginationPreviousKey);\n const canLoadNext =\n !!lastPage && hasPaginationValue(lastPage.data, paginationNextKey);\n\n return (\n <div className={cn('contents', className)}>\n {canLoadPrevious && (\n <ServerInfiniteScrollObserver\n containerId={containerId}\n direction=\"previous\"\n loadingState={loadingState}\n loadPage={() => loadPage('previous')}\n rootMargin={observerRootMargin}\n threshold={observerThreshold}\n />\n )}\n\n {hasItems\n ? pages.map((pageData, index) => (\n <ServerInfiniteScrollItems\n data={pageData.data}\n itemKey={itemKey}\n itemPropName={itemPropName}\n key={`server-infinite-scroll-page-${pageData.page}`}\n nextPageData={pages[index + 1]?.data}\n paginationResultsKey={paginationResultsKey}\n previousPageData={pages[index - 1]?.data}\n >\n {children}\n </ServerInfiniteScrollItems>\n ))\n : (emptyState ?? DEFAULT_EMPTY_STATE)}\n\n {canLoadNext && (\n <ServerInfiniteScrollObserver\n containerId={containerId}\n direction=\"next\"\n loadingState={loadingState}\n loadPage={() => loadPage('next')}\n rootMargin={observerRootMargin}\n threshold={observerThreshold}\n />\n )}\n </div>\n );\n}\n\nexport { ServerInfiniteScrollList };\n"],"mappings":";;;;;;;;;;AAgBA,MAAM,sBACJ,oBAAC;CAAI,WAAU;WAAgE;EAEzE;AAGR,SAAS,mBACP,MACA,eACA;AACA,KAAI,CAAC,QAAQ,OAAO,SAAS,SAAU,QAAO;CAE9C,MAAM,QAAS,KAAiC;AAChD,QAAO,UAAU,QAAQ,UAAU,UAAa,UAAU;;AAG5D,SAAS,yBAAgC,EACvC,MACA,OAAO,GACP,iBACA,QACA,aACA,YACA,cACA,oBACA,mBACA,WACA,YACuC;CACvC,MAAM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"react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/server-infinite-scroll/server-infinite-scroll-observer.d.ts
|
|
5
|
+
type ServerInfiniteScrollObserverProps = {
|
|
6
|
+
direction: ServerInfiniteScrollDirection;
|
|
7
|
+
loadPage: () => Promise<void>;
|
|
8
|
+
containerId?: string;
|
|
9
|
+
loadingState?: React.ReactNode;
|
|
10
|
+
rootMargin?: string;
|
|
11
|
+
threshold?: number;
|
|
12
|
+
};
|
|
13
|
+
declare function ServerInfiniteScrollObserver({
|
|
14
|
+
direction,
|
|
15
|
+
loadPage,
|
|
16
|
+
containerId,
|
|
17
|
+
loadingState,
|
|
18
|
+
rootMargin,
|
|
19
|
+
threshold
|
|
20
|
+
}: ServerInfiniteScrollObserverProps): react_jsx_runtime15.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ServerInfiniteScrollObserver };
|
|
23
|
+
//# sourceMappingURL=server-infinite-scroll-observer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-infinite-scroll-observer.d.ts","names":[],"sources":["../../src/components/server-infinite-scroll/server-infinite-scroll-observer.tsx"],"sourcesContent":[],"mappings":";;;;KAQK,iCAAA;aACQ;kBACK;EAFb,WAAA,CAAA,EAAA,MAAA;EACQ,YAAA,CAAA,EAGI,KAAA,CAAM,SAHV;EACK,UAAA,CAAA,EAAA,MAAA;EAED,SAAM,CAAA,EAAA,MAAA;CAAS;AAAA,iBAKvB,4BAAA,CAA4B;EAAA,SAAA;EAAA,QAAA;EAAA,WAAA;EAAA,YAAA;EAAA,UAAA;EAAA;AAAA,CAAA,EAOlC,iCAPkC,CAAA,EAOD,mBAAA,CAAA,GAAA,CAAA,OAPC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
import { useEffect, useRef, useState } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Loader2 } from "lucide-react";
|
|
7
|
+
|
|
8
|
+
//#region src/components/server-infinite-scroll/server-infinite-scroll-observer.tsx
|
|
9
|
+
function ServerInfiniteScrollObserver({ direction, loadPage, containerId, loadingState, rootMargin = "400px", threshold = .1 }) {
|
|
10
|
+
const observerRef = useRef(null);
|
|
11
|
+
const isLoadingRef = useRef(false);
|
|
12
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const element = observerRef.current;
|
|
15
|
+
if (!element) return;
|
|
16
|
+
const observer = new IntersectionObserver(async ([entry]) => {
|
|
17
|
+
if (!entry?.isIntersecting || isLoadingRef.current) return;
|
|
18
|
+
isLoadingRef.current = true;
|
|
19
|
+
setIsLoading(true);
|
|
20
|
+
try {
|
|
21
|
+
await loadPage();
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.error("ServerInfiniteScroll: error loading page", error);
|
|
24
|
+
} finally {
|
|
25
|
+
isLoadingRef.current = false;
|
|
26
|
+
setIsLoading(false);
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
root: containerId ? document.getElementById(containerId) : null,
|
|
30
|
+
rootMargin,
|
|
31
|
+
threshold
|
|
32
|
+
});
|
|
33
|
+
observer.observe(element);
|
|
34
|
+
return () => {
|
|
35
|
+
observer.disconnect();
|
|
36
|
+
};
|
|
37
|
+
}, [
|
|
38
|
+
containerId,
|
|
39
|
+
loadPage,
|
|
40
|
+
rootMargin,
|
|
41
|
+
threshold
|
|
42
|
+
]);
|
|
43
|
+
return /* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "flex min-h-10 w-full items-center justify-center py-4",
|
|
45
|
+
"data-direction": direction,
|
|
46
|
+
"data-server-infinite-scroll-observer": true,
|
|
47
|
+
ref: observerRef,
|
|
48
|
+
children: isLoading && (loadingState ?? /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin text-muted-foreground" }))
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { ServerInfiniteScrollObserver };
|
|
54
|
+
//# sourceMappingURL=server-infinite-scroll-observer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-infinite-scroll-observer.js","names":[],"sources":["../../src/components/server-infinite-scroll/server-infinite-scroll-observer.tsx"],"sourcesContent":["'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { Loader2 } from 'lucide-react';\n\nimport type { ServerInfiniteScrollDirection } from './types';\n\ntype ServerInfiniteScrollObserverProps = {\n direction: ServerInfiniteScrollDirection;\n loadPage: () => Promise<void>;\n containerId?: string;\n loadingState?: React.ReactNode;\n rootMargin?: string;\n threshold?: number;\n};\n\nfunction ServerInfiniteScrollObserver({\n direction,\n loadPage,\n containerId,\n loadingState,\n rootMargin = '400px',\n threshold = 0.1,\n}: ServerInfiniteScrollObserverProps) {\n const observerRef = useRef<HTMLDivElement>(null);\n const isLoadingRef = useRef(false);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n const element = observerRef.current;\n if (!element) return;\n\n const observer = new IntersectionObserver(\n async ([entry]) => {\n if (!entry?.isIntersecting || isLoadingRef.current) return;\n\n isLoadingRef.current = true;\n setIsLoading(true);\n\n try {\n await loadPage();\n } catch (error) {\n console.error('ServerInfiniteScroll: error loading page', error);\n } finally {\n isLoadingRef.current = false;\n setIsLoading(false);\n }\n },\n {\n root: containerId ? document.getElementById(containerId) : null,\n rootMargin,\n threshold,\n }\n );\n\n observer.observe(element);\n\n return () => {\n observer.disconnect();\n };\n }, [containerId, loadPage, rootMargin, threshold]);\n\n return (\n <div\n className=\"flex min-h-10 w-full items-center justify-center py-4\"\n data-direction={direction}\n data-server-infinite-scroll-observer\n ref={observerRef}\n >\n {isLoading &&\n (loadingState ?? (\n <Loader2 className=\"size-4 animate-spin text-muted-foreground\" />\n ))}\n </div>\n );\n}\n\nexport { ServerInfiniteScrollObserver };\n"],"mappings":";;;;;;;;AAiBA,SAAS,6BAA6B,EACpC,WACA,UACA,aACA,cACA,aAAa,SACb,YAAY,MACwB;CACpC,MAAM,cAAc,OAAuB,KAAK;CAChD,MAAM,eAAe,OAAO,MAAM;CAClC,MAAM,CAAC,WAAW,gBAAgB,SAAS,MAAM;AAEjD,iBAAgB;EACd,MAAM,UAAU,YAAY;AAC5B,MAAI,CAAC,QAAS;EAEd,MAAM,WAAW,IAAI,qBACnB,OAAO,CAAC,WAAW;AACjB,OAAI,CAAC,OAAO,kBAAkB,aAAa,QAAS;AAEpD,gBAAa,UAAU;AACvB,gBAAa,KAAK;AAElB,OAAI;AACF,UAAM,UAAU;YACT,OAAO;AACd,YAAQ,MAAM,4CAA4C,MAAM;aACxD;AACR,iBAAa,UAAU;AACvB,iBAAa,MAAM;;KAGvB;GACE,MAAM,cAAc,SAAS,eAAe,YAAY,GAAG;GAC3D;GACA;GACD,CACF;AAED,WAAS,QAAQ,QAAQ;AAEzB,eAAa;AACX,YAAS,YAAY;;IAEtB;EAAC;EAAa;EAAU;EAAY;EAAU,CAAC;AAElD,QACE,oBAAC;EACC,WAAU;EACV,kBAAgB;EAChB;EACA,KAAK;YAEJ,cACE,gBACC,oBAAC,WAAQ,WAAU,8CAA8C;GAEjE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ServerInfiniteScrollInjectedProps, ServerInfiniteScrollProps } from "./types.js";
|
|
2
|
+
import * as react0 from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/server-infinite-scroll/server-infinite-scroll.d.ts
|
|
5
|
+
declare function ServerInfiniteScroll<TPage>({
|
|
6
|
+
fetchPage,
|
|
7
|
+
initialData,
|
|
8
|
+
config,
|
|
9
|
+
children
|
|
10
|
+
}: ServerInfiniteScrollProps<TPage>): Promise<react0.ReactElement<ServerInfiniteScrollInjectedProps<TPage>, string | react0.JSXElementConstructor<any>>>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ServerInfiniteScroll };
|
|
13
|
+
//# sourceMappingURL=server-infinite-scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-infinite-scroll.d.ts","names":[],"sources":["../../src/components/server-infinite-scroll/server-infinite-scroll.tsx"],"sourcesContent":[],"mappings":";;;;iBAee;;;;;GAKZ,0BAA0B,SAAM,QAAA,MAAA,CAAA,aAAA,kCAAA,iBAAA,MAAA,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cloneElement } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/server-infinite-scroll/server-infinite-scroll.tsx
|
|
4
|
+
const DEFAULT_CONFIG = {
|
|
5
|
+
paginationNextKey: "next",
|
|
6
|
+
paginationPreviousKey: "previous",
|
|
7
|
+
paginationResultsKey: "results",
|
|
8
|
+
itemPropName: "data",
|
|
9
|
+
itemKey: "id"
|
|
10
|
+
};
|
|
11
|
+
async function ServerInfiniteScroll({ fetchPage, initialData, config, children }) {
|
|
12
|
+
const mergedConfig = {
|
|
13
|
+
...DEFAULT_CONFIG,
|
|
14
|
+
...config
|
|
15
|
+
};
|
|
16
|
+
const page = mergedConfig.initialPage ?? 1;
|
|
17
|
+
const data = initialData ?? await fetchPage(page);
|
|
18
|
+
const fetchPageAction = async (nextPage) => {
|
|
19
|
+
"use server";
|
|
20
|
+
return fetchPage(nextPage);
|
|
21
|
+
};
|
|
22
|
+
return cloneElement(children, {
|
|
23
|
+
config: mergedConfig,
|
|
24
|
+
data,
|
|
25
|
+
fetchPageAction,
|
|
26
|
+
page
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { ServerInfiniteScroll };
|
|
32
|
+
//# sourceMappingURL=server-infinite-scroll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-infinite-scroll.js","names":[],"sources":["../../src/components/server-infinite-scroll/server-infinite-scroll.tsx"],"sourcesContent":["import { cloneElement } from 'react';\n\nimport type {\n ServerInfiniteScrollConfig,\n ServerInfiniteScrollProps,\n} from './types';\n\nconst DEFAULT_CONFIG = {\n paginationNextKey: 'next',\n paginationPreviousKey: 'previous',\n paginationResultsKey: 'results',\n itemPropName: 'data',\n itemKey: 'id',\n} satisfies ServerInfiniteScrollConfig;\n\nasync function ServerInfiniteScroll<TPage>({\n fetchPage,\n initialData,\n config,\n children,\n}: ServerInfiniteScrollProps<TPage>) {\n const mergedConfig = {\n ...DEFAULT_CONFIG,\n ...config,\n };\n const page = mergedConfig.initialPage ?? 1;\n const data = initialData ?? (await fetchPage(page));\n\n const fetchPageAction = async (nextPage: number): Promise<TPage> => {\n 'use server';\n\n return fetchPage(nextPage);\n };\n\n return cloneElement(children, {\n config: mergedConfig,\n data,\n fetchPageAction,\n page,\n });\n}\n\nexport { ServerInfiniteScroll };\n"],"mappings":";;;AAOA,MAAM,iBAAiB;CACrB,mBAAmB;CACnB,uBAAuB;CACvB,sBAAsB;CACtB,cAAc;CACd,SAAS;CACV;AAED,eAAe,qBAA4B,EACzC,WACA,aACA,QACA,YACmC;CACnC,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACJ;CACD,MAAM,OAAO,aAAa,eAAe;CACzC,MAAM,OAAO,eAAgB,MAAM,UAAU,KAAK;CAElD,MAAM,kBAAkB,OAAO,aAAqC;AAClE;AAEA,SAAO,UAAU,SAAS;;AAG5B,QAAO,aAAa,UAAU;EAC5B,QAAQ;EACR;EACA;EACA;EACD,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/server-infinite-scroll/types.d.ts
|
|
4
|
+
type ServerInfiniteScrollDirection = 'previous' | 'next';
|
|
5
|
+
type ServerInfiniteScrollConfig = {
|
|
6
|
+
initialPage?: number;
|
|
7
|
+
paginationNextKey?: string;
|
|
8
|
+
paginationPreviousKey?: string;
|
|
9
|
+
paginationResultsKey?: string;
|
|
10
|
+
itemPropName?: string;
|
|
11
|
+
itemKey?: string;
|
|
12
|
+
};
|
|
13
|
+
type ServerInfiniteScrollPage<TPage> = {
|
|
14
|
+
data: TPage;
|
|
15
|
+
page: number;
|
|
16
|
+
};
|
|
17
|
+
type ServerInfiniteScrollFetchPage<TPage> = (page: number) => Promise<TPage>;
|
|
18
|
+
type ServerInfiniteScrollInjectedProps<TPage> = {
|
|
19
|
+
data?: TPage;
|
|
20
|
+
page?: number;
|
|
21
|
+
fetchPageAction?: ServerInfiniteScrollFetchPage<TPage>;
|
|
22
|
+
config?: ServerInfiniteScrollConfig;
|
|
23
|
+
};
|
|
24
|
+
type ServerInfiniteScrollProps<TPage> = {
|
|
25
|
+
fetchPage: ServerInfiniteScrollFetchPage<TPage>;
|
|
26
|
+
initialData?: TPage;
|
|
27
|
+
config?: ServerInfiniteScrollConfig;
|
|
28
|
+
children: ReactElement<ServerInfiniteScrollInjectedProps<TPage>>;
|
|
29
|
+
};
|
|
30
|
+
type ServerInfiniteScrollListProps<TPage> = ServerInfiniteScrollInjectedProps<TPage> & {
|
|
31
|
+
children: ReactElement;
|
|
32
|
+
containerId?: string;
|
|
33
|
+
emptyState?: ReactNode;
|
|
34
|
+
loadingState?: ReactNode;
|
|
35
|
+
observerRootMargin?: string;
|
|
36
|
+
observerThreshold?: number;
|
|
37
|
+
className?: string;
|
|
38
|
+
};
|
|
39
|
+
type ServerInfiniteScrollItemsProps<TPage> = {
|
|
40
|
+
data?: TPage;
|
|
41
|
+
previousPageData?: TPage;
|
|
42
|
+
nextPageData?: TPage;
|
|
43
|
+
paginationResultsKey?: string;
|
|
44
|
+
itemPropName?: string;
|
|
45
|
+
itemKey?: string;
|
|
46
|
+
children: ReactElement;
|
|
47
|
+
};
|
|
48
|
+
//#endregion
|
|
49
|
+
export { ServerInfiniteScrollConfig, ServerInfiniteScrollDirection, ServerInfiniteScrollFetchPage, ServerInfiniteScrollInjectedProps, ServerInfiniteScrollItemsProps, ServerInfiniteScrollListProps, ServerInfiniteScrollPage, ServerInfiniteScrollProps };
|
|
50
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/components/server-infinite-scroll/types.ts"],"sourcesContent":[],"mappings":";;;KAEY,6BAAA;KAEA,0BAAA;EAFA,WAAA,CAAA,EAAA,MAAA;EAEA,iBAAA,CAAA,EAAA,MAAA;EASA,qBAAA,CAAA,EAAA,MAAwB;EAKxB,oBAAA,CAAA,EAAA,MAAA;EAIA,YAAA,CAAA,EAAA,MAAA;EACH,OAAA,CAAA,EAAA,MAAA;CAEyC;AAA9B,KAZR,wBAYQ,CAAA,KAAA,CAAA,GAAA;EACT,IAAA,EAZH,KAYG;EAA0B,IAAA,EAAA,MAAA;AAGrC,CAAA;AAC2C,KAZ/B,6BAY+B,CAAA,KAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,EAAA,GAVtC,OAUsC,CAV9B,KAU8B,CAAA;AAA9B,KARD,iCAQC,CAAA,KAAA,CAAA,GAAA;EACG,IAAA,CAAA,EARP,KAQO;EACL,IAAA,CAAA,EAAA,MAAA;EACgD,eAAA,CAAA,EARvC,6BAQuC,CART,KAQS,CAAA;EAAlC,MAAA,CAAA,EAPd,0BAOc;CAAb;AAAY,KAJZ,yBAIY,CAAA,KAAA,CAAA,GAAA;EAGZ,SAAA,EANC,6BAM4B,CANE,KAMF,CAAA;EACL,WAAA,CAAA,EANpB,KAMoB;EAAlC,MAAA,CAAA,EALS,0BAKT;EACY,QAAA,EALF,YAKE,CALW,iCAKX,CAL6C,KAK7C,CAAA,CAAA;CAEG;AACE,KALP,6BAKO,CAAA,KAAA,CAAA,GAJjB,iCAIiB,CAJiB,KAIjB,CAAA,GAAA;EAAS,QAAA,EAHd,YAGc;EAMhB,WAAA,CAAA,EAAA,MAAA;EACH,UAAA,CAAA,EARQ,SAQR;EACY,YAAA,CAAA,EARF,SAQE;EACJ,kBAAA,CAAA,EAAA,MAAA;EAIL,iBAAA,CAAA,EAAA,MAAA;EAAY,SAAA,CAAA,EAAA,MAAA;;KAPZ;SACH;qBACY;iBACJ;;;;YAIL"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServerInfiniteScrollConfig, ServerInfiniteScrollDirection, ServerInfiniteScrollFetchPage, ServerInfiniteScrollInjectedProps, ServerInfiniteScrollItemsProps, ServerInfiniteScrollListProps, ServerInfiniteScrollPage, ServerInfiniteScrollProps } from "./server-infinite-scroll/types.js";
|
|
2
|
+
import { ServerInfiniteScroll } from "./server-infinite-scroll/server-infinite-scroll.js";
|
|
3
|
+
import { ServerInfiniteScrollItems } from "./server-infinite-scroll/server-infinite-scroll-items.js";
|
|
4
|
+
import { ServerInfiniteScrollList } from "./server-infinite-scroll/server-infinite-scroll-list.js";
|
|
5
|
+
import { ServerInfiniteScrollObserver } from "./server-infinite-scroll/server-infinite-scroll-observer.js";
|
|
6
|
+
export { ServerInfiniteScroll, type ServerInfiniteScrollConfig, type ServerInfiniteScrollDirection, type ServerInfiniteScrollFetchPage, type ServerInfiniteScrollInjectedProps, ServerInfiniteScrollItems, type ServerInfiniteScrollItemsProps, ServerInfiniteScrollList, type ServerInfiniteScrollListProps, ServerInfiniteScrollObserver, type ServerInfiniteScrollPage, type ServerInfiniteScrollProps };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ServerInfiniteScroll } from "./server-infinite-scroll/server-infinite-scroll.js";
|
|
2
|
+
import { ServerInfiniteScrollItems } from "./server-infinite-scroll/server-infinite-scroll-items.js";
|
|
3
|
+
import { ServerInfiniteScrollObserver } from "./server-infinite-scroll/server-infinite-scroll-observer.js";
|
|
4
|
+
import { ServerInfiniteScrollList } from "./server-infinite-scroll/server-infinite-scroll-list.js";
|
|
5
|
+
|
|
6
|
+
export { ServerInfiniteScroll, ServerInfiniteScrollItems, ServerInfiniteScrollList, ServerInfiniteScrollObserver };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-text-poor.d.ts","names":[],"sources":["../../src/components/split-text-poor/split-text-poor.tsx"],"sourcesContent":[],"mappings":";cAwBM;EAAA,EAAA,EAAA;;;;;;IAoBM,OAAA,EAAA,CAAA;MAAA,KAAkB;MAAA;KAAA,
|
|
1
|
+
{"version":3,"file":"split-text-poor.d.ts","names":[],"sources":["../../src/components/split-text-poor/split-text-poor.tsx"],"sourcesContent":[],"mappings":";cAwBM;EAAA,EAAA,EAAA;;;;;;IAoBM,OAAA,EAAA,CAAA;MAAA,KAAkB;MAAA;KAAA,EAClB;MAQN,KAAA,EAAA,MAyDL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAlEW,kBAAA;YACA,KAAA,CAAM;;wBAEM;;;;;cAMlB,eAAe,KAAA,CAAM,GAAG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
3
3
|
import { Item, Root } from "@radix-ui/react-toggle-group";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
@@ -28,7 +28,7 @@ declare function ToggleGroup({
|
|
|
28
28
|
transition,
|
|
29
29
|
activeClassName,
|
|
30
30
|
...props
|
|
31
|
-
}: ToggleGroupProps):
|
|
31
|
+
}: ToggleGroupProps): react_jsx_runtime17.JSX.Element;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { ToggleGroup };
|
|
34
34
|
//# sourceMappingURL=ToggleGroup.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maquinaweb-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.75.1",
|
|
4
4
|
"description": "A minimal React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"import": "./dist/container-animation.js",
|
|
30
30
|
"types": "./dist/container-animation.d.ts"
|
|
31
31
|
},
|
|
32
|
+
"./server-infinite-scroll": {
|
|
33
|
+
"import": "./dist/server-infinite-scroll.js",
|
|
34
|
+
"types": "./dist/server-infinite-scroll.d.ts"
|
|
35
|
+
},
|
|
32
36
|
"./date-hour-field": {
|
|
33
37
|
"import": "./dist/date-hour-field.js",
|
|
34
38
|
"types": "./dist/date-hour-field.d.ts"
|
|
@@ -67,7 +71,7 @@
|
|
|
67
71
|
"dev": "concurrently \"cosmos --expose-imports\" \"next dev --port 3421\"",
|
|
68
72
|
"build": "tsdown && bun run postbuild",
|
|
69
73
|
"postbuild": "bun scripts/update-exports.ts",
|
|
70
|
-
"build:vercel": "cosmos-export --expose-imports &&
|
|
74
|
+
"build:vercel": "cosmos-export --config cosmos.config.vercel.json --expose-imports && rm -rf ./public/cosmos-ui && mkdir -p ./public/cosmos-ui && cp -R ./cosmos-export/. ./public/cosmos-ui && next build",
|
|
71
75
|
"prepublishOnly": "bun run build",
|
|
72
76
|
"prepare": "husky",
|
|
73
77
|
"clean-exports": "bun scripts/clean-exports.ts",
|