@addsign/moje-agenda-shared-lib 2.0.40 → 2.0.41
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/Dialog-BWa_flly.js +424 -0
- package/dist/Dialog-BWa_flly.js.map +1 -0
- package/dist/components/datatable/DataTableServer.js +61 -52
- package/dist/components/datatable/DataTableServer.js.map +1 -1
- package/dist/components/ui/async-combobox.d.ts +40 -0
- package/dist/components/ui/async-combobox.js +5706 -0
- package/dist/components/ui/async-combobox.js.map +1 -0
- package/dist/index-CDptxuif.js +234 -0
- package/dist/index-CDptxuif.js.map +1 -0
- package/dist/index-CpcwEIT_.js +18 -0
- package/dist/index-CpcwEIT_.js.map +1 -0
- package/dist/index-CulRZKWg.js +2212 -0
- package/dist/index-CulRZKWg.js.map +1 -0
- package/dist/index-DoYsULhE.js +28878 -0
- package/dist/index-DoYsULhE.js.map +1 -0
- package/dist/index-Dr6Ds0Bg.js +1162 -0
- package/dist/index-Dr6Ds0Bg.js.map +1 -0
- package/dist/index-DsU1clfi.js +36 -0
- package/dist/index-DsU1clfi.js.map +1 -0
- package/dist/index-Vp9wI6hE.js +2203 -0
- package/dist/index-Vp9wI6hE.js.map +1 -0
- package/dist/plus-sawBIbEd.js +26 -0
- package/dist/plus-sawBIbEd.js.map +1 -0
- package/dist/popover-DhdNw4fZ.js +319 -0
- package/dist/popover-DhdNw4fZ.js.map +1 -0
- package/lib/components/datatable/DataTableServer.tsx +64 -43
- package/package.json +1 -1
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { c as createContextScope, b as composeEventHandlers, d as createContext2 } from "./index-CDCkSjVs.js";
|
|
4
|
+
import { u as useComposedRefs, S as Slot } from "./index-D9mvqz1C.js";
|
|
5
|
+
import { u as useId } from "./index-Deoi9R3y.js";
|
|
6
|
+
import { u as useControllableState } from "./index-DFSwSCB0.js";
|
|
7
|
+
import { D as DismissableLayer } from "./index-CDptxuif.js";
|
|
8
|
+
import { R as ReactRemoveScroll, h as hideOthers, u as useFocusGuards, F as FocusScope } from "./index-Dr6Ds0Bg.js";
|
|
9
|
+
import { P as Portal$1 } from "./index-CpcwEIT_.js";
|
|
10
|
+
import { P as Presence } from "./index-CA2QNu6z.js";
|
|
11
|
+
import { P as Primitive } from "./index-DoYsULhE.js";
|
|
12
|
+
import { cn } from "./utils/utils.js";
|
|
13
|
+
import { X } from "./x-DciOkaU0.js";
|
|
14
|
+
var DIALOG_NAME = "Dialog";
|
|
15
|
+
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
16
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
17
|
+
var Dialog$1 = (props) => {
|
|
18
|
+
const {
|
|
19
|
+
__scopeDialog,
|
|
20
|
+
children,
|
|
21
|
+
open: openProp,
|
|
22
|
+
defaultOpen,
|
|
23
|
+
onOpenChange,
|
|
24
|
+
modal = true
|
|
25
|
+
} = props;
|
|
26
|
+
const triggerRef = React.useRef(null);
|
|
27
|
+
const contentRef = React.useRef(null);
|
|
28
|
+
const [open = false, setOpen] = useControllableState({
|
|
29
|
+
prop: openProp,
|
|
30
|
+
defaultProp: defaultOpen,
|
|
31
|
+
onChange: onOpenChange
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsx(
|
|
34
|
+
DialogProvider,
|
|
35
|
+
{
|
|
36
|
+
scope: __scopeDialog,
|
|
37
|
+
triggerRef,
|
|
38
|
+
contentRef,
|
|
39
|
+
contentId: useId(),
|
|
40
|
+
titleId: useId(),
|
|
41
|
+
descriptionId: useId(),
|
|
42
|
+
open,
|
|
43
|
+
onOpenChange: setOpen,
|
|
44
|
+
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
45
|
+
modal,
|
|
46
|
+
children
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
Dialog$1.displayName = DIALOG_NAME;
|
|
51
|
+
var TRIGGER_NAME = "DialogTrigger";
|
|
52
|
+
var DialogTrigger$1 = React.forwardRef(
|
|
53
|
+
(props, forwardedRef) => {
|
|
54
|
+
const { __scopeDialog, ...triggerProps } = props;
|
|
55
|
+
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
56
|
+
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
Primitive.button,
|
|
59
|
+
{
|
|
60
|
+
type: "button",
|
|
61
|
+
"aria-haspopup": "dialog",
|
|
62
|
+
"aria-expanded": context.open,
|
|
63
|
+
"aria-controls": context.contentId,
|
|
64
|
+
"data-state": getState(context.open),
|
|
65
|
+
...triggerProps,
|
|
66
|
+
ref: composedTriggerRef,
|
|
67
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
DialogTrigger$1.displayName = TRIGGER_NAME;
|
|
73
|
+
var PORTAL_NAME = "DialogPortal";
|
|
74
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
75
|
+
forceMount: void 0
|
|
76
|
+
});
|
|
77
|
+
var DialogPortal$1 = (props) => {
|
|
78
|
+
const { __scopeDialog, forceMount, children, container } = props;
|
|
79
|
+
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
80
|
+
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$1, { asChild: true, container, children: child }) })) });
|
|
81
|
+
};
|
|
82
|
+
DialogPortal$1.displayName = PORTAL_NAME;
|
|
83
|
+
var OVERLAY_NAME = "DialogOverlay";
|
|
84
|
+
var DialogOverlay$1 = React.forwardRef(
|
|
85
|
+
(props, forwardedRef) => {
|
|
86
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
87
|
+
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
88
|
+
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
89
|
+
return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
DialogOverlay$1.displayName = OVERLAY_NAME;
|
|
93
|
+
var DialogOverlayImpl = React.forwardRef(
|
|
94
|
+
(props, forwardedRef) => {
|
|
95
|
+
const { __scopeDialog, ...overlayProps } = props;
|
|
96
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
97
|
+
return (
|
|
98
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
99
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
100
|
+
/* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
|
|
101
|
+
Primitive.div,
|
|
102
|
+
{
|
|
103
|
+
"data-state": getState(context.open),
|
|
104
|
+
...overlayProps,
|
|
105
|
+
ref: forwardedRef,
|
|
106
|
+
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
107
|
+
}
|
|
108
|
+
) })
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
var CONTENT_NAME = "DialogContent";
|
|
113
|
+
var DialogContent$1 = React.forwardRef(
|
|
114
|
+
(props, forwardedRef) => {
|
|
115
|
+
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
116
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
117
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
118
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
DialogContent$1.displayName = CONTENT_NAME;
|
|
122
|
+
var DialogContentModal = React.forwardRef(
|
|
123
|
+
(props, forwardedRef) => {
|
|
124
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
125
|
+
const contentRef = React.useRef(null);
|
|
126
|
+
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
127
|
+
React.useEffect(() => {
|
|
128
|
+
const content = contentRef.current;
|
|
129
|
+
if (content)
|
|
130
|
+
return hideOthers(content);
|
|
131
|
+
}, []);
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
DialogContentImpl,
|
|
134
|
+
{
|
|
135
|
+
...props,
|
|
136
|
+
ref: composedRefs,
|
|
137
|
+
trapFocus: context.open,
|
|
138
|
+
disableOutsidePointerEvents: true,
|
|
139
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
140
|
+
var _a;
|
|
141
|
+
event.preventDefault();
|
|
142
|
+
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
|
143
|
+
}),
|
|
144
|
+
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
145
|
+
const originalEvent = event.detail.originalEvent;
|
|
146
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
147
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
148
|
+
if (isRightClick)
|
|
149
|
+
event.preventDefault();
|
|
150
|
+
}),
|
|
151
|
+
onFocusOutside: composeEventHandlers(
|
|
152
|
+
props.onFocusOutside,
|
|
153
|
+
(event) => event.preventDefault()
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
var DialogContentNonModal = React.forwardRef(
|
|
160
|
+
(props, forwardedRef) => {
|
|
161
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
162
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
163
|
+
const hasPointerDownOutsideRef = React.useRef(false);
|
|
164
|
+
return /* @__PURE__ */ jsx(
|
|
165
|
+
DialogContentImpl,
|
|
166
|
+
{
|
|
167
|
+
...props,
|
|
168
|
+
ref: forwardedRef,
|
|
169
|
+
trapFocus: false,
|
|
170
|
+
disableOutsidePointerEvents: false,
|
|
171
|
+
onCloseAutoFocus: (event) => {
|
|
172
|
+
var _a, _b;
|
|
173
|
+
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
|
|
174
|
+
if (!event.defaultPrevented) {
|
|
175
|
+
if (!hasInteractedOutsideRef.current)
|
|
176
|
+
(_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
|
177
|
+
event.preventDefault();
|
|
178
|
+
}
|
|
179
|
+
hasInteractedOutsideRef.current = false;
|
|
180
|
+
hasPointerDownOutsideRef.current = false;
|
|
181
|
+
},
|
|
182
|
+
onInteractOutside: (event) => {
|
|
183
|
+
var _a, _b;
|
|
184
|
+
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
|
|
185
|
+
if (!event.defaultPrevented) {
|
|
186
|
+
hasInteractedOutsideRef.current = true;
|
|
187
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
|
188
|
+
hasPointerDownOutsideRef.current = true;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const target = event.target;
|
|
192
|
+
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
|
193
|
+
if (targetIsTrigger)
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
var DialogContentImpl = React.forwardRef(
|
|
204
|
+
(props, forwardedRef) => {
|
|
205
|
+
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
|
206
|
+
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
207
|
+
const contentRef = React.useRef(null);
|
|
208
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
209
|
+
useFocusGuards();
|
|
210
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
FocusScope,
|
|
213
|
+
{
|
|
214
|
+
asChild: true,
|
|
215
|
+
loop: true,
|
|
216
|
+
trapped: trapFocus,
|
|
217
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
218
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
219
|
+
children: /* @__PURE__ */ jsx(
|
|
220
|
+
DismissableLayer,
|
|
221
|
+
{
|
|
222
|
+
role: "dialog",
|
|
223
|
+
id: context.contentId,
|
|
224
|
+
"aria-describedby": context.descriptionId,
|
|
225
|
+
"aria-labelledby": context.titleId,
|
|
226
|
+
"data-state": getState(context.open),
|
|
227
|
+
...contentProps,
|
|
228
|
+
ref: composedRefs,
|
|
229
|
+
onDismiss: () => context.onOpenChange(false)
|
|
230
|
+
}
|
|
231
|
+
)
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
235
|
+
/* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
|
|
236
|
+
/* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
237
|
+
] })
|
|
238
|
+
] });
|
|
239
|
+
}
|
|
240
|
+
);
|
|
241
|
+
var TITLE_NAME = "DialogTitle";
|
|
242
|
+
var DialogTitle$1 = React.forwardRef(
|
|
243
|
+
(props, forwardedRef) => {
|
|
244
|
+
const { __scopeDialog, ...titleProps } = props;
|
|
245
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
246
|
+
return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
DialogTitle$1.displayName = TITLE_NAME;
|
|
250
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
|
251
|
+
var DialogDescription$1 = React.forwardRef(
|
|
252
|
+
(props, forwardedRef) => {
|
|
253
|
+
const { __scopeDialog, ...descriptionProps } = props;
|
|
254
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
255
|
+
return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
DialogDescription$1.displayName = DESCRIPTION_NAME;
|
|
259
|
+
var CLOSE_NAME = "DialogClose";
|
|
260
|
+
var DialogClose$1 = React.forwardRef(
|
|
261
|
+
(props, forwardedRef) => {
|
|
262
|
+
const { __scopeDialog, ...closeProps } = props;
|
|
263
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
264
|
+
return /* @__PURE__ */ jsx(
|
|
265
|
+
Primitive.button,
|
|
266
|
+
{
|
|
267
|
+
type: "button",
|
|
268
|
+
...closeProps,
|
|
269
|
+
ref: forwardedRef,
|
|
270
|
+
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
271
|
+
}
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
DialogClose$1.displayName = CLOSE_NAME;
|
|
276
|
+
function getState(open) {
|
|
277
|
+
return open ? "open" : "closed";
|
|
278
|
+
}
|
|
279
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
280
|
+
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
281
|
+
contentName: CONTENT_NAME,
|
|
282
|
+
titleName: TITLE_NAME,
|
|
283
|
+
docsSlug: "dialog"
|
|
284
|
+
});
|
|
285
|
+
var TitleWarning = ({ titleId }) => {
|
|
286
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
287
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
288
|
+
|
|
289
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
290
|
+
|
|
291
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
292
|
+
React.useEffect(() => {
|
|
293
|
+
if (titleId) {
|
|
294
|
+
const hasTitle = document.getElementById(titleId);
|
|
295
|
+
if (!hasTitle)
|
|
296
|
+
console.error(MESSAGE);
|
|
297
|
+
}
|
|
298
|
+
}, [MESSAGE, titleId]);
|
|
299
|
+
return null;
|
|
300
|
+
};
|
|
301
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
302
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
303
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
304
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
305
|
+
React.useEffect(() => {
|
|
306
|
+
var _a;
|
|
307
|
+
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
|
308
|
+
if (descriptionId && describedById) {
|
|
309
|
+
const hasDescription = document.getElementById(descriptionId);
|
|
310
|
+
if (!hasDescription)
|
|
311
|
+
console.warn(MESSAGE);
|
|
312
|
+
}
|
|
313
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
|
314
|
+
return null;
|
|
315
|
+
};
|
|
316
|
+
var Root = Dialog$1;
|
|
317
|
+
var Trigger = DialogTrigger$1;
|
|
318
|
+
var Portal = DialogPortal$1;
|
|
319
|
+
var Overlay = DialogOverlay$1;
|
|
320
|
+
var Content = DialogContent$1;
|
|
321
|
+
var Title = DialogTitle$1;
|
|
322
|
+
var Description = DialogDescription$1;
|
|
323
|
+
var Close = DialogClose$1;
|
|
324
|
+
const Dialog = Root;
|
|
325
|
+
const DialogTrigger = Trigger;
|
|
326
|
+
const DialogPortal = Portal;
|
|
327
|
+
const DialogClose = Close;
|
|
328
|
+
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
329
|
+
Overlay,
|
|
330
|
+
{
|
|
331
|
+
ref,
|
|
332
|
+
className: cn(
|
|
333
|
+
"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
334
|
+
className
|
|
335
|
+
),
|
|
336
|
+
...props
|
|
337
|
+
}
|
|
338
|
+
));
|
|
339
|
+
DialogOverlay.displayName = Overlay.displayName;
|
|
340
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
341
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
342
|
+
/* @__PURE__ */ jsxs(
|
|
343
|
+
Content,
|
|
344
|
+
{
|
|
345
|
+
ref,
|
|
346
|
+
className: cn(
|
|
347
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
348
|
+
className
|
|
349
|
+
),
|
|
350
|
+
...props,
|
|
351
|
+
children: [
|
|
352
|
+
children,
|
|
353
|
+
/* @__PURE__ */ jsxs(Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
354
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
355
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
356
|
+
] })
|
|
357
|
+
]
|
|
358
|
+
}
|
|
359
|
+
)
|
|
360
|
+
] }));
|
|
361
|
+
DialogContent.displayName = Content.displayName;
|
|
362
|
+
const DialogHeader = ({
|
|
363
|
+
className,
|
|
364
|
+
...props
|
|
365
|
+
}) => /* @__PURE__ */ jsx(
|
|
366
|
+
"div",
|
|
367
|
+
{
|
|
368
|
+
className: cn("flex flex-col space-y-1.5 sm:text-left", className),
|
|
369
|
+
...props
|
|
370
|
+
}
|
|
371
|
+
);
|
|
372
|
+
DialogHeader.displayName = "DialogHeader";
|
|
373
|
+
const DialogFooter = ({
|
|
374
|
+
className,
|
|
375
|
+
...props
|
|
376
|
+
}) => /* @__PURE__ */ jsx(
|
|
377
|
+
"div",
|
|
378
|
+
{
|
|
379
|
+
className: cn(
|
|
380
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
381
|
+
className
|
|
382
|
+
),
|
|
383
|
+
...props
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
DialogFooter.displayName = "DialogFooter";
|
|
387
|
+
const DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
388
|
+
Title,
|
|
389
|
+
{
|
|
390
|
+
ref,
|
|
391
|
+
className: cn(
|
|
392
|
+
"text-lg font-semibold leading-none tracking-tight",
|
|
393
|
+
className
|
|
394
|
+
),
|
|
395
|
+
...props
|
|
396
|
+
}
|
|
397
|
+
));
|
|
398
|
+
DialogTitle.displayName = Title.displayName;
|
|
399
|
+
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
400
|
+
Description,
|
|
401
|
+
{
|
|
402
|
+
ref,
|
|
403
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
404
|
+
...props
|
|
405
|
+
}
|
|
406
|
+
));
|
|
407
|
+
DialogDescription.displayName = Description.displayName;
|
|
408
|
+
export {
|
|
409
|
+
Content as C,
|
|
410
|
+
Dialog as D,
|
|
411
|
+
Overlay as O,
|
|
412
|
+
Portal as P,
|
|
413
|
+
Root as R,
|
|
414
|
+
DialogPortal as a,
|
|
415
|
+
DialogOverlay as b,
|
|
416
|
+
DialogClose as c,
|
|
417
|
+
DialogTrigger as d,
|
|
418
|
+
DialogContent as e,
|
|
419
|
+
DialogHeader as f,
|
|
420
|
+
DialogFooter as g,
|
|
421
|
+
DialogTitle as h,
|
|
422
|
+
DialogDescription as i
|
|
423
|
+
};
|
|
424
|
+
//# sourceMappingURL=Dialog-BWa_flly.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog-BWa_flly.js","sources":["../node_modules/@radix-ui/react-dialog/dist/index.mjs","../lib/components/ui/Dialog.tsx"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/src/Dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\r\nimport { X } from \"lucide-react\";\r\nimport { cn } from \"../../utils/utils\";\r\n\r\nconst Dialog = DialogPrimitive.Root;\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger;\r\n\r\nconst DialogPortal = DialogPrimitive.Portal;\r\n\r\nconst DialogClose = DialogPrimitive.Close;\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\r\n \"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n));\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\r\n>(({ className, children, ...props }, ref) => (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <DialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\r\n <X className=\"h-4 w-4\" />\r\n <span className=\"sr-only\">Close</span>\r\n </DialogPrimitive.Close>\r\n </DialogPrimitive.Content>\r\n </DialogPortal>\r\n));\r\nDialogContent.displayName = DialogPrimitive.Content.displayName;\r\n\r\nconst DialogHeader = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col space-y-1.5 sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogHeader.displayName = \"DialogHeader\";\r\n\r\nconst DialogFooter = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\r\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n);\r\nDialogFooter.displayName = \"DialogFooter\";\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\r\n \"text-lg font-semibold leading-none tracking-tight\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n));\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ElementRef<typeof DialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\r\n>(({ className, ...props }, ref) => (\r\n <DialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-muted-foreground\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\r\n\r\nexport {\r\n Dialog,\r\n DialogPortal,\r\n DialogOverlay,\r\n DialogClose,\r\n DialogTrigger,\r\n DialogContent,\r\n DialogHeader,\r\n DialogFooter,\r\n DialogTitle,\r\n DialogDescription,\r\n};\r\n"],"names":["Dialog","DialogTrigger","DialogPortal","PortalPrimitive","DialogOverlay","RemoveScroll","DialogContent","DialogTitle","DialogDescription","DialogClose","createContext","DialogPrimitive.Root","DialogPrimitive.Trigger","DialogPrimitive.Portal","DialogPrimitive.Close","DialogPrimitive.Overlay","DialogPrimitive.Content","DialogPrimitive.Title","DialogPrimitive.Description"],"mappings":";;;;;;;;;;;;;AAmBA,IAAI,cAAc;AAClB,IAAI,CAAC,qBAAqB,iBAAiB,IAAI,mBAAmB,WAAW;AAC7E,IAAI,CAAC,gBAAgB,gBAAgB,IAAI,oBAAoB,WAAW;AACxE,IAAIA,WAAS,CAAC,UAAU;AACtB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,EACT,IAAG;AACJ,QAAM,aAAa,MAAM,OAAO,IAAI;AACpC,QAAM,aAAa,MAAM,OAAO,IAAI;AACpC,QAAM,CAAC,OAAO,OAAO,OAAO,IAAI,qBAAqB;AAAA,IACnD,MAAM;AAAA,IACN,aAAa;AAA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AAc;AAE3B,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN;AAEF,aAAa,cAAc;AAErB,MAAA,cAAc,MAAM,WAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN,CACD;AACD,YAAY,cAAcA,MAAsB;AAE1C,MAAA,oBAAoB,MAAM,WAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA,EAAA;AACN,CACD;AACD,kBAAkB,cAAcA,YAA4B;","x_google_ignoreList":[0]}
|
|
@@ -21746,17 +21746,19 @@ function DataTableServer({
|
|
|
21746
21746
|
const [showColFilters, setShowColFilters] = useState();
|
|
21747
21747
|
const [sortConfig, setSortConfig] = useState(null);
|
|
21748
21748
|
const createDataPageable = (response, itemsPerPage) => {
|
|
21749
|
-
var _a2, _b2, _c, _d
|
|
21749
|
+
var _a2, _b2, _c, _d;
|
|
21750
|
+
const isPageable = !!((_a2 = response.data) == null ? void 0 : _a2.content);
|
|
21750
21751
|
return {
|
|
21751
21752
|
content: response.data.content || response.data,
|
|
21752
|
-
empty:
|
|
21753
|
-
first:
|
|
21754
|
-
last:
|
|
21755
|
-
number:
|
|
21753
|
+
empty: isPageable ? response.data.empty : true,
|
|
21754
|
+
first: isPageable ? response.data.first : true,
|
|
21755
|
+
last: isPageable ? response.data.last : true,
|
|
21756
|
+
number: isPageable ? response.data.number : 0,
|
|
21756
21757
|
numberOfElements: response.data.numberOfElements || response.data.length,
|
|
21757
|
-
size: ((
|
|
21758
|
-
totalElements: ((
|
|
21759
|
-
totalPages: ((
|
|
21758
|
+
size: ((_b2 = response.data) == null ? void 0 : _b2.size) || itemsPerPage,
|
|
21759
|
+
totalElements: ((_c = response.data) == null ? void 0 : _c.totalElements) || response.data.length,
|
|
21760
|
+
totalPages: ((_d = response.data) == null ? void 0 : _d.totalPages) || 1,
|
|
21761
|
+
isPageable
|
|
21760
21762
|
};
|
|
21761
21763
|
};
|
|
21762
21764
|
const [reloadData, setReloadData] = useState(false);
|
|
@@ -22378,50 +22380,57 @@ function DataTableServer({
|
|
|
22378
22380
|
isLoading && /* @__PURE__ */ jsx("tbody", { className: "relative", children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 100, children: /* @__PURE__ */ jsx("div", { className: "w-full flex items-center justify-center h-[500px] py-2", children: /* @__PURE__ */ jsx(Spinner, {}) }) }) }) }),
|
|
22379
22381
|
!isLoading && (!data || ((_b = data == null ? void 0 : data.content) == null ? void 0 : _b.length) === 0) && /* @__PURE__ */ jsx("tbody", { className: "relative h-[440px]", children: /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: 100, children: /* @__PURE__ */ jsx("div", { className: "w-full flex items-center justify-center h-full py-2 text-gray-600 font-medium text-xs ", children: "Žádná data" }) }) }) })
|
|
22380
22382
|
] }, tableKey) }),
|
|
22381
|
-
|
|
22382
|
-
|
|
22383
|
-
|
|
22384
|
-
|
|
22385
|
-
|
|
22386
|
-
|
|
22387
|
-
|
|
22388
|
-
|
|
22389
|
-
|
|
22390
|
-
|
|
22391
|
-
|
|
22392
|
-
|
|
22393
|
-
|
|
22394
|
-
|
|
22395
|
-
|
|
22396
|
-
|
|
22397
|
-
|
|
22398
|
-
|
|
22399
|
-
|
|
22400
|
-
|
|
22401
|
-
|
|
22402
|
-
|
|
22403
|
-
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22407
|
-
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22411
|
-
|
|
22412
|
-
|
|
22413
|
-
|
|
22414
|
-
|
|
22415
|
-
{
|
|
22416
|
-
|
|
22417
|
-
|
|
22418
|
-
|
|
22419
|
-
|
|
22420
|
-
|
|
22421
|
-
|
|
22422
|
-
|
|
22423
|
-
|
|
22424
|
-
|
|
22383
|
+
(data == null ? void 0 : data.isPageable) && /* @__PURE__ */ jsxs(
|
|
22384
|
+
"div",
|
|
22385
|
+
{
|
|
22386
|
+
"data-cy": "pagination",
|
|
22387
|
+
className: "w-full p-5 flex gap-5 justify-between md:flex-row flex-col",
|
|
22388
|
+
children: [
|
|
22389
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-5 text-sm ", children: [
|
|
22390
|
+
data && /* @__PURE__ */ jsxs(
|
|
22391
|
+
Button,
|
|
22392
|
+
{
|
|
22393
|
+
variant: "secondary",
|
|
22394
|
+
onClick: prevPage,
|
|
22395
|
+
className: "flex items-center",
|
|
22396
|
+
disabled: data.first || isLoading,
|
|
22397
|
+
children: [
|
|
22398
|
+
/* @__PURE__ */ jsx(MdArrowBack, { className: "mr-1.5" }),
|
|
22399
|
+
" Předchozí"
|
|
22400
|
+
]
|
|
22401
|
+
}
|
|
22402
|
+
),
|
|
22403
|
+
data && /* @__PURE__ */ jsxs(
|
|
22404
|
+
Button,
|
|
22405
|
+
{
|
|
22406
|
+
variant: "secondary",
|
|
22407
|
+
onClick: nextPage,
|
|
22408
|
+
className: "flex items-center",
|
|
22409
|
+
disabled: data.last || isLoading,
|
|
22410
|
+
children: [
|
|
22411
|
+
"Následující ",
|
|
22412
|
+
/* @__PURE__ */ jsx(MdArrowForward, { className: "ml-2", size: 20 })
|
|
22413
|
+
]
|
|
22414
|
+
}
|
|
22415
|
+
)
|
|
22416
|
+
] }),
|
|
22417
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-gray-800", children: paginationDisplay }),
|
|
22418
|
+
/* @__PURE__ */ jsxs("div", { className: "content-center w-auto items-center justify-end flex-row gap-5 flex md:mt-0 mt-5", children: [
|
|
22419
|
+
/* @__PURE__ */ jsx("span", { className: " whitespace-nowrap flex-grow", children: "Počet řádků na stránku:" }),
|
|
22420
|
+
/* @__PURE__ */ jsx(
|
|
22421
|
+
SelectField,
|
|
22422
|
+
{
|
|
22423
|
+
name: "itemsPerPage",
|
|
22424
|
+
onInputChange: handleItemsPerPageChange,
|
|
22425
|
+
className: "!w-[100px]",
|
|
22426
|
+
options: itemsPerPageOptions || defaultItemsPerPageOptions,
|
|
22427
|
+
value: itemsPerPageLocal
|
|
22428
|
+
}
|
|
22429
|
+
)
|
|
22430
|
+
] })
|
|
22431
|
+
]
|
|
22432
|
+
}
|
|
22433
|
+
)
|
|
22425
22434
|
]
|
|
22426
22435
|
}
|
|
22427
22436
|
) });
|