@almadar/ui 4.32.0 → 4.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +1267 -1250
- package/dist/avl/index.js +187 -170
- package/dist/components/index.cjs +1072 -1055
- package/dist/components/index.js +173 -156
- package/dist/components/templates/DashboardLayout.d.ts +7 -0
- package/dist/context/CurrentPagePathContext.d.ts +9 -0
- package/dist/context/index.cjs +10 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/context/index.js +8 -1
- package/dist/providers/index.cjs +897 -880
- package/dist/providers/index.js +165 -148
- package/dist/runtime/index.cjs +933 -916
- package/dist/runtime/index.js +169 -152
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { twMerge } from 'tailwind-merge';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React110 from 'react';
|
|
4
|
+
import React110__default, { useContext, useMemo, useRef, useEffect, useCallback, createContext, useState, Suspense, lazy, useSyncExternalStore, useLayoutEffect, useId } from 'react';
|
|
5
5
|
import { EventBusContext, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
|
|
6
6
|
import * as LucideIcons from 'lucide-react';
|
|
7
7
|
import { Loader2, X, AlertTriangle, Info, AlertCircle, CheckCircle, ChevronDown, List, Printer, ChevronRight, ChevronLeft, XCircle, Wrench, RotateCcw, Send, Code, FileText, WrapText, Check, Copy, Trash2, Menu as Menu$1, Search, Bell, LogOut, ChevronUp, MoreHorizontal, Bug, ZoomOut, ZoomIn, Download, Pause, Play, Package, Calendar, Pencil, Eye, Image as Image$1, Upload, ArrowRight, ArrowLeft, Eraser, SkipForward, TrendingUp, TrendingDown, Minus, ArrowUp, ArrowDown, MoreVertical, Circle, Clock, CheckCircle2, HelpCircle, FileQuestion, Inbox, Plus, User, Filter, Star, FileWarning, Tag, DollarSign, Sun, Moon, Zap, Sword, Move, Heart, Shield } from 'lucide-react';
|
|
@@ -368,7 +368,7 @@ function resolveIconProp(value, sizeClass) {
|
|
|
368
368
|
const IconComp = value;
|
|
369
369
|
return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
|
|
370
370
|
}
|
|
371
|
-
if (
|
|
371
|
+
if (React110__default.isValidElement(value)) {
|
|
372
372
|
return value;
|
|
373
373
|
}
|
|
374
374
|
if (typeof value === "object" && value !== null && "render" in value) {
|
|
@@ -444,7 +444,7 @@ var init_Button = __esm({
|
|
|
444
444
|
md: "h-4 w-4",
|
|
445
445
|
lg: "h-5 w-5"
|
|
446
446
|
};
|
|
447
|
-
Button =
|
|
447
|
+
Button = React110__default.forwardRef(
|
|
448
448
|
({
|
|
449
449
|
className,
|
|
450
450
|
variant = "primary",
|
|
@@ -509,7 +509,7 @@ var Input;
|
|
|
509
509
|
var init_Input = __esm({
|
|
510
510
|
"components/atoms/Input.tsx"() {
|
|
511
511
|
init_cn();
|
|
512
|
-
Input =
|
|
512
|
+
Input = React110__default.forwardRef(
|
|
513
513
|
({
|
|
514
514
|
className,
|
|
515
515
|
inputType,
|
|
@@ -627,7 +627,7 @@ var Label;
|
|
|
627
627
|
var init_Label = __esm({
|
|
628
628
|
"components/atoms/Label.tsx"() {
|
|
629
629
|
init_cn();
|
|
630
|
-
Label =
|
|
630
|
+
Label = React110__default.forwardRef(
|
|
631
631
|
({ className, required, children, ...props }, ref) => {
|
|
632
632
|
return /* @__PURE__ */ jsxs(
|
|
633
633
|
"label",
|
|
@@ -653,7 +653,7 @@ var Textarea;
|
|
|
653
653
|
var init_Textarea = __esm({
|
|
654
654
|
"components/atoms/Textarea.tsx"() {
|
|
655
655
|
init_cn();
|
|
656
|
-
Textarea =
|
|
656
|
+
Textarea = React110__default.forwardRef(
|
|
657
657
|
({ className, error, ...props }, ref) => {
|
|
658
658
|
return /* @__PURE__ */ jsx(
|
|
659
659
|
"textarea",
|
|
@@ -682,7 +682,7 @@ var Select;
|
|
|
682
682
|
var init_Select = __esm({
|
|
683
683
|
"components/atoms/Select.tsx"() {
|
|
684
684
|
init_cn();
|
|
685
|
-
Select =
|
|
685
|
+
Select = React110__default.forwardRef(
|
|
686
686
|
({ className, options, placeholder, error, ...props }, ref) => {
|
|
687
687
|
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
688
688
|
/* @__PURE__ */ jsxs(
|
|
@@ -724,7 +724,7 @@ var Checkbox;
|
|
|
724
724
|
var init_Checkbox = __esm({
|
|
725
725
|
"components/atoms/Checkbox.tsx"() {
|
|
726
726
|
init_cn();
|
|
727
|
-
Checkbox =
|
|
727
|
+
Checkbox = React110__default.forwardRef(
|
|
728
728
|
({ className, label, id, ...props }, ref) => {
|
|
729
729
|
const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
730
730
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
@@ -806,7 +806,7 @@ var init_Card = __esm({
|
|
|
806
806
|
md: "shadow",
|
|
807
807
|
lg: "shadow-lg"
|
|
808
808
|
};
|
|
809
|
-
Card =
|
|
809
|
+
Card = React110__default.forwardRef(
|
|
810
810
|
({
|
|
811
811
|
className,
|
|
812
812
|
variant = "bordered",
|
|
@@ -842,9 +842,9 @@ var init_Card = __esm({
|
|
|
842
842
|
}
|
|
843
843
|
);
|
|
844
844
|
Card.displayName = "Card";
|
|
845
|
-
CardHeader =
|
|
845
|
+
CardHeader = React110__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
|
|
846
846
|
CardHeader.displayName = "CardHeader";
|
|
847
|
-
CardTitle =
|
|
847
|
+
CardTitle = React110__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
848
848
|
"h3",
|
|
849
849
|
{
|
|
850
850
|
ref,
|
|
@@ -857,11 +857,11 @@ var init_Card = __esm({
|
|
|
857
857
|
}
|
|
858
858
|
));
|
|
859
859
|
CardTitle.displayName = "CardTitle";
|
|
860
|
-
CardContent =
|
|
860
|
+
CardContent = React110__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
|
|
861
861
|
CardContent.displayName = "CardContent";
|
|
862
862
|
CardBody = CardContent;
|
|
863
863
|
CardBody.displayName = "CardBody";
|
|
864
|
-
CardFooter =
|
|
864
|
+
CardFooter = React110__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
865
865
|
"div",
|
|
866
866
|
{
|
|
867
867
|
ref,
|
|
@@ -914,7 +914,7 @@ var init_Badge = __esm({
|
|
|
914
914
|
md: "px-2.5 py-1 text-sm",
|
|
915
915
|
lg: "px-3 py-1.5 text-base"
|
|
916
916
|
};
|
|
917
|
-
Badge =
|
|
917
|
+
Badge = React110__default.forwardRef(
|
|
918
918
|
({ className, variant = "default", size = "sm", amount, label, icon, children, ...props }, ref) => {
|
|
919
919
|
const iconSizes2 = { sm: "w-3 h-3", md: "w-3.5 h-3.5", lg: "w-4 h-4" };
|
|
920
920
|
const resolvedIcon = typeof icon === "string" ? (() => {
|
|
@@ -953,7 +953,7 @@ var init_Spinner = __esm({
|
|
|
953
953
|
md: "h-6 w-6",
|
|
954
954
|
lg: "h-8 w-8"
|
|
955
955
|
};
|
|
956
|
-
Spinner =
|
|
956
|
+
Spinner = React110__default.forwardRef(
|
|
957
957
|
({ className, size = "md", ...props }, ref) => {
|
|
958
958
|
return /* @__PURE__ */ jsx(
|
|
959
959
|
"div",
|
|
@@ -1234,7 +1234,7 @@ var init_Box = __esm({
|
|
|
1234
1234
|
fixed: "fixed",
|
|
1235
1235
|
sticky: "sticky"
|
|
1236
1236
|
};
|
|
1237
|
-
Box =
|
|
1237
|
+
Box = React110__default.forwardRef(
|
|
1238
1238
|
({
|
|
1239
1239
|
padding,
|
|
1240
1240
|
paddingX,
|
|
@@ -1607,7 +1607,7 @@ var Radio;
|
|
|
1607
1607
|
var init_Radio = __esm({
|
|
1608
1608
|
"components/atoms/Radio.tsx"() {
|
|
1609
1609
|
init_cn();
|
|
1610
|
-
Radio =
|
|
1610
|
+
Radio = React110__default.forwardRef(
|
|
1611
1611
|
({
|
|
1612
1612
|
label,
|
|
1613
1613
|
helperText,
|
|
@@ -1718,7 +1718,7 @@ var init_Switch = __esm({
|
|
|
1718
1718
|
"components/atoms/Switch.tsx"() {
|
|
1719
1719
|
"use client";
|
|
1720
1720
|
init_cn();
|
|
1721
|
-
Switch =
|
|
1721
|
+
Switch = React110.forwardRef(
|
|
1722
1722
|
({
|
|
1723
1723
|
checked,
|
|
1724
1724
|
defaultChecked = false,
|
|
@@ -1729,10 +1729,10 @@ var init_Switch = __esm({
|
|
|
1729
1729
|
name,
|
|
1730
1730
|
className
|
|
1731
1731
|
}, ref) => {
|
|
1732
|
-
const [isChecked, setIsChecked] =
|
|
1732
|
+
const [isChecked, setIsChecked] = React110.useState(
|
|
1733
1733
|
checked !== void 0 ? checked : defaultChecked
|
|
1734
1734
|
);
|
|
1735
|
-
|
|
1735
|
+
React110.useEffect(() => {
|
|
1736
1736
|
if (checked !== void 0) {
|
|
1737
1737
|
setIsChecked(checked);
|
|
1738
1738
|
}
|
|
@@ -2617,8 +2617,8 @@ var init_LawReferenceTooltip = __esm({
|
|
|
2617
2617
|
position = "top",
|
|
2618
2618
|
className
|
|
2619
2619
|
}) => {
|
|
2620
|
-
const [isVisible, setIsVisible] =
|
|
2621
|
-
const timeoutRef =
|
|
2620
|
+
const [isVisible, setIsVisible] = React110__default.useState(false);
|
|
2621
|
+
const timeoutRef = React110__default.useRef(null);
|
|
2622
2622
|
const handleMouseEnter = () => {
|
|
2623
2623
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2624
2624
|
timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
|
|
@@ -2627,7 +2627,7 @@ var init_LawReferenceTooltip = __esm({
|
|
|
2627
2627
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2628
2628
|
setIsVisible(false);
|
|
2629
2629
|
};
|
|
2630
|
-
|
|
2630
|
+
React110__default.useEffect(() => {
|
|
2631
2631
|
return () => {
|
|
2632
2632
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
2633
2633
|
};
|
|
@@ -2837,7 +2837,7 @@ var init_StatusDot = __esm({
|
|
|
2837
2837
|
md: "w-2.5 h-2.5",
|
|
2838
2838
|
lg: "w-3 h-3"
|
|
2839
2839
|
};
|
|
2840
|
-
StatusDot =
|
|
2840
|
+
StatusDot = React110__default.forwardRef(
|
|
2841
2841
|
({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
|
|
2842
2842
|
return /* @__PURE__ */ jsx(
|
|
2843
2843
|
"span",
|
|
@@ -2890,7 +2890,7 @@ var init_TrendIndicator = __esm({
|
|
|
2890
2890
|
down: TrendingDown,
|
|
2891
2891
|
flat: ArrowRight
|
|
2892
2892
|
};
|
|
2893
|
-
TrendIndicator =
|
|
2893
|
+
TrendIndicator = React110__default.forwardRef(
|
|
2894
2894
|
({
|
|
2895
2895
|
className,
|
|
2896
2896
|
value,
|
|
@@ -2957,7 +2957,7 @@ var init_RangeSlider = __esm({
|
|
|
2957
2957
|
md: "w-4 h-4",
|
|
2958
2958
|
lg: "w-5 h-5"
|
|
2959
2959
|
};
|
|
2960
|
-
RangeSlider =
|
|
2960
|
+
RangeSlider = React110__default.forwardRef(
|
|
2961
2961
|
({
|
|
2962
2962
|
className,
|
|
2963
2963
|
min = 0,
|
|
@@ -3553,7 +3553,7 @@ var init_ContentSection = __esm({
|
|
|
3553
3553
|
md: "py-16",
|
|
3554
3554
|
lg: "py-24"
|
|
3555
3555
|
};
|
|
3556
|
-
ContentSection =
|
|
3556
|
+
ContentSection = React110__default.forwardRef(
|
|
3557
3557
|
({ children, background = "default", padding = "lg", id, className }, ref) => {
|
|
3558
3558
|
return /* @__PURE__ */ jsx(
|
|
3559
3559
|
Box,
|
|
@@ -4087,7 +4087,7 @@ var init_AnimatedReveal = __esm({
|
|
|
4087
4087
|
"scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
|
|
4088
4088
|
"none": {}
|
|
4089
4089
|
};
|
|
4090
|
-
AnimatedReveal =
|
|
4090
|
+
AnimatedReveal = React110__default.forwardRef(
|
|
4091
4091
|
({
|
|
4092
4092
|
trigger = "scroll",
|
|
4093
4093
|
animation = "fade-up",
|
|
@@ -4247,7 +4247,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
4247
4247
|
"components/atoms/AnimatedGraphic.tsx"() {
|
|
4248
4248
|
"use client";
|
|
4249
4249
|
init_cn();
|
|
4250
|
-
AnimatedGraphic =
|
|
4250
|
+
AnimatedGraphic = React110__default.forwardRef(
|
|
4251
4251
|
({
|
|
4252
4252
|
src,
|
|
4253
4253
|
svgContent,
|
|
@@ -4270,7 +4270,7 @@ var init_AnimatedGraphic = __esm({
|
|
|
4270
4270
|
const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
|
|
4271
4271
|
const resolvedSvg = svgContent ?? fetchedSvg;
|
|
4272
4272
|
const prevAnimateRef = useRef(animate);
|
|
4273
|
-
const setRef =
|
|
4273
|
+
const setRef = React110__default.useCallback(
|
|
4274
4274
|
(node) => {
|
|
4275
4275
|
containerRef.current = node;
|
|
4276
4276
|
if (typeof ref === "function") ref(node);
|
|
@@ -5083,7 +5083,7 @@ var init_ErrorBoundary = __esm({
|
|
|
5083
5083
|
"use client";
|
|
5084
5084
|
init_cn();
|
|
5085
5085
|
init_ErrorState();
|
|
5086
|
-
ErrorBoundary = class extends
|
|
5086
|
+
ErrorBoundary = class extends React110__default.Component {
|
|
5087
5087
|
constructor(props) {
|
|
5088
5088
|
super(props);
|
|
5089
5089
|
__publicField(this, "reset", () => {
|
|
@@ -5504,8 +5504,8 @@ var init_Tooltip = __esm({
|
|
|
5504
5504
|
if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
|
|
5505
5505
|
};
|
|
5506
5506
|
}, []);
|
|
5507
|
-
const triggerElement =
|
|
5508
|
-
const trigger =
|
|
5507
|
+
const triggerElement = React110__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
5508
|
+
const trigger = React110__default.cloneElement(triggerElement, {
|
|
5509
5509
|
ref: triggerRef,
|
|
5510
5510
|
onMouseEnter: handleMouseEnter,
|
|
5511
5511
|
onMouseLeave: handleMouseLeave,
|
|
@@ -5626,8 +5626,8 @@ var init_Popover = __esm({
|
|
|
5626
5626
|
onMouseEnter: handleOpen,
|
|
5627
5627
|
onMouseLeave: handleClose
|
|
5628
5628
|
};
|
|
5629
|
-
const childElement =
|
|
5630
|
-
const triggerElement =
|
|
5629
|
+
const childElement = React110__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
|
|
5630
|
+
const triggerElement = React110__default.cloneElement(
|
|
5631
5631
|
childElement,
|
|
5632
5632
|
{
|
|
5633
5633
|
ref: triggerRef,
|
|
@@ -5744,8 +5744,8 @@ var init_Menu = __esm({
|
|
|
5744
5744
|
"bottom-start": "top-full left-0 mt-2",
|
|
5745
5745
|
"bottom-end": "top-full right-0 mt-2"
|
|
5746
5746
|
};
|
|
5747
|
-
const triggerChild =
|
|
5748
|
-
const triggerElement =
|
|
5747
|
+
const triggerChild = React110__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx("span", { children: trigger });
|
|
5748
|
+
const triggerElement = React110__default.cloneElement(
|
|
5749
5749
|
triggerChild,
|
|
5750
5750
|
{
|
|
5751
5751
|
ref: triggerRef,
|
|
@@ -6264,7 +6264,7 @@ var init_MapView = __esm({
|
|
|
6264
6264
|
shadowSize: [41, 41]
|
|
6265
6265
|
});
|
|
6266
6266
|
L.Marker.prototype.options.icon = defaultIcon;
|
|
6267
|
-
const { useEffect: useEffect65, useRef: useRef62, useCallback: useCallback111, useState: useState96 } =
|
|
6267
|
+
const { useEffect: useEffect65, useRef: useRef62, useCallback: useCallback111, useState: useState96 } = React110__default;
|
|
6268
6268
|
const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
|
|
6269
6269
|
const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
|
|
6270
6270
|
function MapUpdater({ centerLat, centerLng, zoom }) {
|
|
@@ -6495,7 +6495,7 @@ function InputPattern({
|
|
|
6495
6495
|
fieldName
|
|
6496
6496
|
}) {
|
|
6497
6497
|
const { emit } = useEventBus();
|
|
6498
|
-
const [localValue, setLocalValue] =
|
|
6498
|
+
const [localValue, setLocalValue] = React110__default.useState(value);
|
|
6499
6499
|
const handleChange = (e) => {
|
|
6500
6500
|
setLocalValue(e.target.value);
|
|
6501
6501
|
if (onChange) {
|
|
@@ -6533,7 +6533,7 @@ function TextareaPattern({
|
|
|
6533
6533
|
fieldName
|
|
6534
6534
|
}) {
|
|
6535
6535
|
const { emit } = useEventBus();
|
|
6536
|
-
const [localValue, setLocalValue] =
|
|
6536
|
+
const [localValue, setLocalValue] = React110__default.useState(value);
|
|
6537
6537
|
const handleChange = (e) => {
|
|
6538
6538
|
setLocalValue(e.target.value);
|
|
6539
6539
|
if (onChange) {
|
|
@@ -6565,7 +6565,7 @@ function SelectPattern({
|
|
|
6565
6565
|
fieldName
|
|
6566
6566
|
}) {
|
|
6567
6567
|
const { emit } = useEventBus();
|
|
6568
|
-
const [localValue, setLocalValue] =
|
|
6568
|
+
const [localValue, setLocalValue] = React110__default.useState(value);
|
|
6569
6569
|
const handleChange = (e) => {
|
|
6570
6570
|
setLocalValue(e.target.value);
|
|
6571
6571
|
if (onChange) {
|
|
@@ -6594,7 +6594,7 @@ function CheckboxPattern({
|
|
|
6594
6594
|
className
|
|
6595
6595
|
}) {
|
|
6596
6596
|
const { emit } = useEventBus();
|
|
6597
|
-
const [localChecked, setLocalChecked] =
|
|
6597
|
+
const [localChecked, setLocalChecked] = React110__default.useState(checked);
|
|
6598
6598
|
const handleChange = (e) => {
|
|
6599
6599
|
setLocalChecked(e.target.checked);
|
|
6600
6600
|
if (onChange) {
|
|
@@ -6903,9 +6903,9 @@ function ControlButton({
|
|
|
6903
6903
|
className
|
|
6904
6904
|
}) {
|
|
6905
6905
|
const eventBus = useEventBus();
|
|
6906
|
-
const [isPressed, setIsPressed] =
|
|
6906
|
+
const [isPressed, setIsPressed] = React110.useState(false);
|
|
6907
6907
|
const actualPressed = pressed ?? isPressed;
|
|
6908
|
-
const handlePointerDown =
|
|
6908
|
+
const handlePointerDown = React110.useCallback(
|
|
6909
6909
|
(e) => {
|
|
6910
6910
|
e.preventDefault();
|
|
6911
6911
|
if (disabled) return;
|
|
@@ -6915,7 +6915,7 @@ function ControlButton({
|
|
|
6915
6915
|
},
|
|
6916
6916
|
[disabled, pressEvent, eventBus, onPress]
|
|
6917
6917
|
);
|
|
6918
|
-
const handlePointerUp =
|
|
6918
|
+
const handlePointerUp = React110.useCallback(
|
|
6919
6919
|
(e) => {
|
|
6920
6920
|
e.preventDefault();
|
|
6921
6921
|
if (disabled) return;
|
|
@@ -6925,7 +6925,7 @@ function ControlButton({
|
|
|
6925
6925
|
},
|
|
6926
6926
|
[disabled, releaseEvent, eventBus, onRelease]
|
|
6927
6927
|
);
|
|
6928
|
-
const handlePointerLeave =
|
|
6928
|
+
const handlePointerLeave = React110.useCallback(
|
|
6929
6929
|
(e) => {
|
|
6930
6930
|
if (isPressed) {
|
|
6931
6931
|
setIsPressed(false);
|
|
@@ -6998,8 +6998,8 @@ function ActionButtons({
|
|
|
6998
6998
|
disabled
|
|
6999
6999
|
}) {
|
|
7000
7000
|
const eventBus = useEventBus();
|
|
7001
|
-
const [activeButtons, setActiveButtons] =
|
|
7002
|
-
const handlePress =
|
|
7001
|
+
const [activeButtons, setActiveButtons] = React110.useState(/* @__PURE__ */ new Set());
|
|
7002
|
+
const handlePress = React110.useCallback(
|
|
7003
7003
|
(id) => {
|
|
7004
7004
|
setActiveButtons((prev) => new Set(prev).add(id));
|
|
7005
7005
|
if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
|
|
@@ -7007,7 +7007,7 @@ function ActionButtons({
|
|
|
7007
7007
|
},
|
|
7008
7008
|
[actionEvent, eventBus, onAction]
|
|
7009
7009
|
);
|
|
7010
|
-
const handleRelease =
|
|
7010
|
+
const handleRelease = React110.useCallback(
|
|
7011
7011
|
(id) => {
|
|
7012
7012
|
setActiveButtons((prev) => {
|
|
7013
7013
|
const next = new Set(prev);
|
|
@@ -8941,7 +8941,7 @@ var init_MarkdownContent = __esm({
|
|
|
8941
8941
|
init_Box();
|
|
8942
8942
|
init_useTranslate();
|
|
8943
8943
|
init_cn();
|
|
8944
|
-
MarkdownContent =
|
|
8944
|
+
MarkdownContent = React110__default.memo(
|
|
8945
8945
|
({ content, direction, className }) => {
|
|
8946
8946
|
const { t: _t } = useTranslate();
|
|
8947
8947
|
const safeContent = typeof content === "string" ? content : String(content ?? "");
|
|
@@ -9158,7 +9158,7 @@ var init_CodeBlock = __esm({
|
|
|
9158
9158
|
loloStyle = { ...dark, ...loloStyleOverrides };
|
|
9159
9159
|
LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
|
|
9160
9160
|
HIDDEN_LINE_NUMBERS = { display: "none" };
|
|
9161
|
-
CodeBlock =
|
|
9161
|
+
CodeBlock = React110__default.memo(
|
|
9162
9162
|
({
|
|
9163
9163
|
code: rawCode,
|
|
9164
9164
|
language = "text",
|
|
@@ -10467,7 +10467,7 @@ var init_StateMachineView = __esm({
|
|
|
10467
10467
|
style: { top: title ? 30 : 0 },
|
|
10468
10468
|
children: [
|
|
10469
10469
|
entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
|
|
10470
|
-
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(
|
|
10470
|
+
states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React110__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
|
|
10471
10471
|
StateNode,
|
|
10472
10472
|
{
|
|
10473
10473
|
state,
|
|
@@ -16432,7 +16432,7 @@ function CraftingRecipe({
|
|
|
16432
16432
|
className
|
|
16433
16433
|
}) {
|
|
16434
16434
|
const eventBus = useEventBus();
|
|
16435
|
-
const handleCraft =
|
|
16435
|
+
const handleCraft = React110.useCallback(() => {
|
|
16436
16436
|
onCraft?.();
|
|
16437
16437
|
if (craftEvent) {
|
|
16438
16438
|
eventBus.emit(craftEvent, { output: output.label });
|
|
@@ -16449,7 +16449,7 @@ function CraftingRecipe({
|
|
|
16449
16449
|
children: [
|
|
16450
16450
|
/* @__PURE__ */ jsx(HStack, { gap: "xs", className: "flex-wrap items-center", children: inputs.map((ingredient, index) => {
|
|
16451
16451
|
const hasSufficient = ingredient.available >= ingredient.required;
|
|
16452
|
-
return /* @__PURE__ */ jsxs(
|
|
16452
|
+
return /* @__PURE__ */ jsxs(React110.Fragment, { children: [
|
|
16453
16453
|
/* @__PURE__ */ jsx(Box, { className: "relative", children: /* @__PURE__ */ jsx(
|
|
16454
16454
|
ItemSlot,
|
|
16455
16455
|
{
|
|
@@ -16743,8 +16743,8 @@ function DPad({
|
|
|
16743
16743
|
}) {
|
|
16744
16744
|
const eventBus = useEventBus();
|
|
16745
16745
|
const sizes = sizeMap6[size];
|
|
16746
|
-
const [activeDirections, setActiveDirections] =
|
|
16747
|
-
const handlePress =
|
|
16746
|
+
const [activeDirections, setActiveDirections] = React110.useState(/* @__PURE__ */ new Set());
|
|
16747
|
+
const handlePress = React110.useCallback(
|
|
16748
16748
|
(direction) => {
|
|
16749
16749
|
setActiveDirections((prev) => new Set(prev).add(direction));
|
|
16750
16750
|
if (directionEvent) eventBus.emit(`UI:${directionEvent}`, { direction, pressed: true });
|
|
@@ -16752,7 +16752,7 @@ function DPad({
|
|
|
16752
16752
|
},
|
|
16753
16753
|
[directionEvent, eventBus, onDirection]
|
|
16754
16754
|
);
|
|
16755
|
-
const handleRelease =
|
|
16755
|
+
const handleRelease = React110.useCallback(
|
|
16756
16756
|
(direction) => {
|
|
16757
16757
|
setActiveDirections((prev) => {
|
|
16758
16758
|
const next = new Set(prev);
|
|
@@ -16933,6 +16933,19 @@ var init_useAuthContext = __esm({
|
|
|
16933
16933
|
"hooks/useAuthContext.ts"() {
|
|
16934
16934
|
}
|
|
16935
16935
|
});
|
|
16936
|
+
var CurrentPagePathContext, CurrentPagePathProvider, useCurrentPagePath;
|
|
16937
|
+
var init_CurrentPagePathContext = __esm({
|
|
16938
|
+
"context/CurrentPagePathContext.tsx"() {
|
|
16939
|
+
"use client";
|
|
16940
|
+
CurrentPagePathContext = createContext(void 0);
|
|
16941
|
+
CurrentPagePathProvider = ({
|
|
16942
|
+
value,
|
|
16943
|
+
children
|
|
16944
|
+
}) => /* @__PURE__ */ jsx(CurrentPagePathContext.Provider, { value, children });
|
|
16945
|
+
CurrentPagePathProvider.displayName = "CurrentPagePathProvider";
|
|
16946
|
+
useCurrentPagePath = () => useContext(CurrentPagePathContext);
|
|
16947
|
+
}
|
|
16948
|
+
});
|
|
16936
16949
|
var DashboardLayout, NavLink;
|
|
16937
16950
|
var init_DashboardLayout = __esm({
|
|
16938
16951
|
"components/templates/DashboardLayout.tsx"() {
|
|
@@ -16946,6 +16959,7 @@ var init_DashboardLayout = __esm({
|
|
|
16946
16959
|
init_useAuthContext();
|
|
16947
16960
|
init_useEventBus();
|
|
16948
16961
|
init_useTranslate();
|
|
16962
|
+
init_CurrentPagePathContext();
|
|
16949
16963
|
DashboardLayout = ({
|
|
16950
16964
|
appName = "{{APP_TITLE}}",
|
|
16951
16965
|
logo,
|
|
@@ -16962,6 +16976,7 @@ var init_DashboardLayout = __esm({
|
|
|
16962
16976
|
showThemeToggle = true,
|
|
16963
16977
|
sidebarFooter,
|
|
16964
16978
|
onSignOut: onSignOutProp,
|
|
16979
|
+
currentPath,
|
|
16965
16980
|
children
|
|
16966
16981
|
}) => {
|
|
16967
16982
|
const eventBus = useEventBus();
|
|
@@ -16982,6 +16997,8 @@ var init_DashboardLayout = __esm({
|
|
|
16982
16997
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
16983
16998
|
const [userMenuOpen, setUserMenuOpen] = useState(false);
|
|
16984
16999
|
const location = useLocation();
|
|
17000
|
+
const ctxPagePath = useCurrentPagePath();
|
|
17001
|
+
const activePath = currentPath ?? ctxPagePath ?? location.pathname;
|
|
16985
17002
|
const { user: authUser, signOut: authSignOut } = useAuthContext();
|
|
16986
17003
|
const user = userProp || (authUser ? {
|
|
16987
17004
|
name: authUser.displayName || authUser.email?.split("@")[0] || "User",
|
|
@@ -17064,7 +17081,7 @@ var init_DashboardLayout = __esm({
|
|
|
17064
17081
|
NavLink,
|
|
17065
17082
|
{
|
|
17066
17083
|
item,
|
|
17067
|
-
currentPath:
|
|
17084
|
+
currentPath: activePath
|
|
17068
17085
|
},
|
|
17069
17086
|
item.href
|
|
17070
17087
|
))
|
|
@@ -17742,13 +17759,13 @@ function DataList({
|
|
|
17742
17759
|
}) {
|
|
17743
17760
|
const eventBus = useEventBus();
|
|
17744
17761
|
const { t } = useTranslate();
|
|
17745
|
-
const [visibleCount, setVisibleCount] =
|
|
17762
|
+
const [visibleCount, setVisibleCount] = React110__default.useState(pageSize || Infinity);
|
|
17746
17763
|
const fieldDefs = fields ?? columns ?? [];
|
|
17747
17764
|
const allData = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
17748
17765
|
const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
|
|
17749
17766
|
const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
|
|
17750
17767
|
const hasRenderProp = typeof children === "function";
|
|
17751
|
-
|
|
17768
|
+
React110__default.useEffect(() => {
|
|
17752
17769
|
const renderItemTypeOf = typeof schemaRenderItem;
|
|
17753
17770
|
const childrenTypeOf = typeof children;
|
|
17754
17771
|
if (data.length > 0 && !hasRenderProp) {
|
|
@@ -17804,7 +17821,7 @@ function DataList({
|
|
|
17804
17821
|
const items2 = data.map((item) => item);
|
|
17805
17822
|
const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
|
|
17806
17823
|
const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
|
|
17807
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
17824
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
|
|
17808
17825
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
|
|
17809
17826
|
group.items.map((itemData, index) => {
|
|
17810
17827
|
const id = itemData.id || `${gi}-${index}`;
|
|
@@ -17995,7 +18012,7 @@ function DataList({
|
|
|
17995
18012
|
className
|
|
17996
18013
|
),
|
|
17997
18014
|
children: [
|
|
17998
|
-
groups.map((group, gi) => /* @__PURE__ */ jsxs(
|
|
18015
|
+
groups.map((group, gi) => /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
|
|
17999
18016
|
group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
|
|
18000
18017
|
group.items.map(
|
|
18001
18018
|
(itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
|
|
@@ -19279,7 +19296,7 @@ var init_WizardProgress = __esm({
|
|
|
19279
19296
|
children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
|
|
19280
19297
|
const isActive = index === currentStep;
|
|
19281
19298
|
const isCompleted = index < currentStep;
|
|
19282
|
-
return /* @__PURE__ */ jsxs(
|
|
19299
|
+
return /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
|
|
19283
19300
|
/* @__PURE__ */ jsx(
|
|
19284
19301
|
"button",
|
|
19285
19302
|
{
|
|
@@ -20179,9 +20196,9 @@ function ScoreDisplay({
|
|
|
20179
20196
|
...rest
|
|
20180
20197
|
}) {
|
|
20181
20198
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof rest.score === "number" && !Number.isNaN(rest.score) ? rest.score : 0;
|
|
20182
|
-
const [displayValue, setDisplayValue] =
|
|
20183
|
-
const [isAnimating, setIsAnimating] =
|
|
20184
|
-
|
|
20199
|
+
const [displayValue, setDisplayValue] = React110.useState(resolvedValue);
|
|
20200
|
+
const [isAnimating, setIsAnimating] = React110.useState(false);
|
|
20201
|
+
React110.useEffect(() => {
|
|
20185
20202
|
if (!animated || displayValue === resolvedValue) {
|
|
20186
20203
|
setDisplayValue(resolvedValue);
|
|
20187
20204
|
return;
|
|
@@ -20331,7 +20348,7 @@ function InventoryGrid({
|
|
|
20331
20348
|
const eventBus = useEventBus();
|
|
20332
20349
|
const slotCount = totalSlots ?? items.length;
|
|
20333
20350
|
const emptySlotCount = Math.max(0, slotCount - items.length);
|
|
20334
|
-
const handleSelect =
|
|
20351
|
+
const handleSelect = React110.useCallback(
|
|
20335
20352
|
(id) => {
|
|
20336
20353
|
onSelect?.(id);
|
|
20337
20354
|
if (selectEvent) {
|
|
@@ -20613,15 +20630,15 @@ function GameCanvas2D({
|
|
|
20613
20630
|
fps = 60,
|
|
20614
20631
|
className
|
|
20615
20632
|
}) {
|
|
20616
|
-
const canvasRef =
|
|
20617
|
-
const rafRef =
|
|
20618
|
-
const frameRef =
|
|
20619
|
-
const lastTimeRef =
|
|
20620
|
-
const onDrawRef =
|
|
20633
|
+
const canvasRef = React110.useRef(null);
|
|
20634
|
+
const rafRef = React110.useRef(0);
|
|
20635
|
+
const frameRef = React110.useRef(0);
|
|
20636
|
+
const lastTimeRef = React110.useRef(0);
|
|
20637
|
+
const onDrawRef = React110.useRef(onDraw);
|
|
20621
20638
|
onDrawRef.current = onDraw;
|
|
20622
|
-
const onTickRef =
|
|
20639
|
+
const onTickRef = React110.useRef(onTick);
|
|
20623
20640
|
onTickRef.current = onTick;
|
|
20624
|
-
|
|
20641
|
+
React110.useEffect(() => {
|
|
20625
20642
|
const canvas = canvasRef.current;
|
|
20626
20643
|
if (!canvas) return;
|
|
20627
20644
|
const ctx = canvas.getContext("2d");
|
|
@@ -20962,7 +20979,7 @@ function TurnPanel({
|
|
|
20962
20979
|
className
|
|
20963
20980
|
}) {
|
|
20964
20981
|
const eventBus = useEventBus();
|
|
20965
|
-
const handleAction =
|
|
20982
|
+
const handleAction = React110.useCallback(
|
|
20966
20983
|
(event) => {
|
|
20967
20984
|
if (event) {
|
|
20968
20985
|
eventBus.emit(event, { turn: currentTurn, phase, activeTeam });
|
|
@@ -21108,7 +21125,7 @@ function UnitCommandBar({
|
|
|
21108
21125
|
className
|
|
21109
21126
|
}) {
|
|
21110
21127
|
const eventBus = useEventBus();
|
|
21111
|
-
const handleCommand =
|
|
21128
|
+
const handleCommand = React110.useCallback(
|
|
21112
21129
|
(event) => {
|
|
21113
21130
|
if (event) {
|
|
21114
21131
|
eventBus.emit(event, { unitId: selectedUnitId });
|
|
@@ -21593,7 +21610,7 @@ function GameMenu({
|
|
|
21593
21610
|
} catch {
|
|
21594
21611
|
}
|
|
21595
21612
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21596
|
-
const handleOptionClick =
|
|
21613
|
+
const handleOptionClick = React110.useCallback(
|
|
21597
21614
|
(option) => {
|
|
21598
21615
|
if (option.event && eventBus) {
|
|
21599
21616
|
eventBus.emit(`UI:${option.event}`, { option });
|
|
@@ -21707,7 +21724,7 @@ function GameOverScreen({
|
|
|
21707
21724
|
} catch {
|
|
21708
21725
|
}
|
|
21709
21726
|
const eventBus = eventBusProp || eventBusFromHook;
|
|
21710
|
-
const handleActionClick =
|
|
21727
|
+
const handleActionClick = React110.useCallback(
|
|
21711
21728
|
(action) => {
|
|
21712
21729
|
if (action.event && eventBus) {
|
|
21713
21730
|
eventBus.emit(`UI:${action.event}`, { action });
|
|
@@ -24838,7 +24855,7 @@ var init_StepFlow = __esm({
|
|
|
24838
24855
|
className
|
|
24839
24856
|
}) => {
|
|
24840
24857
|
if (orientation === "vertical") {
|
|
24841
|
-
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(
|
|
24858
|
+
return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React110__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
|
|
24842
24859
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
|
|
24843
24860
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
24844
24861
|
showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
|
|
@@ -24849,7 +24866,7 @@ var init_StepFlow = __esm({
|
|
|
24849
24866
|
] })
|
|
24850
24867
|
] }) }, index)) });
|
|
24851
24868
|
}
|
|
24852
|
-
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(
|
|
24869
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
|
|
24853
24870
|
/* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
|
|
24854
24871
|
/* @__PURE__ */ jsx(StepCircle, { step, index }),
|
|
24855
24872
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
|
|
@@ -27001,7 +27018,7 @@ var init_DocumentViewer = __esm({
|
|
|
27001
27018
|
}
|
|
27002
27019
|
});
|
|
27003
27020
|
function extractTitle(children) {
|
|
27004
|
-
if (!
|
|
27021
|
+
if (!React110__default.isValidElement(children)) return void 0;
|
|
27005
27022
|
const props = children.props;
|
|
27006
27023
|
if (typeof props.title === "string") {
|
|
27007
27024
|
return props.title;
|
|
@@ -27113,7 +27130,7 @@ function LinearView({
|
|
|
27113
27130
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
27114
27131
|
const isDone = i < currentIdx;
|
|
27115
27132
|
const isCurrent = i === currentIdx;
|
|
27116
|
-
return /* @__PURE__ */ jsxs(
|
|
27133
|
+
return /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
|
|
27117
27134
|
i > 0 && /* @__PURE__ */ jsx(
|
|
27118
27135
|
Typography,
|
|
27119
27136
|
{
|
|
@@ -27897,12 +27914,12 @@ var init_Form = __esm({
|
|
|
27897
27914
|
const isSchemaEntity = isOrbitalEntitySchema(entity);
|
|
27898
27915
|
const resolvedEntity = isSchemaEntity ? entity : void 0;
|
|
27899
27916
|
const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
|
|
27900
|
-
const normalizedInitialData =
|
|
27917
|
+
const normalizedInitialData = React110__default.useMemo(() => {
|
|
27901
27918
|
const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
|
|
27902
27919
|
const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
|
|
27903
27920
|
return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
|
|
27904
27921
|
}, [entity, initialData]);
|
|
27905
|
-
const entityDerivedFields =
|
|
27922
|
+
const entityDerivedFields = React110__default.useMemo(() => {
|
|
27906
27923
|
if (fields && fields.length > 0) return void 0;
|
|
27907
27924
|
if (!resolvedEntity) return void 0;
|
|
27908
27925
|
return resolvedEntity.fields.map(
|
|
@@ -27921,16 +27938,16 @@ var init_Form = __esm({
|
|
|
27921
27938
|
const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
|
|
27922
27939
|
const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
|
|
27923
27940
|
const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
|
|
27924
|
-
const [formData, setFormData] =
|
|
27941
|
+
const [formData, setFormData] = React110__default.useState(
|
|
27925
27942
|
normalizedInitialData
|
|
27926
27943
|
);
|
|
27927
|
-
const [collapsedSections, setCollapsedSections] =
|
|
27944
|
+
const [collapsedSections, setCollapsedSections] = React110__default.useState(
|
|
27928
27945
|
/* @__PURE__ */ new Set()
|
|
27929
27946
|
);
|
|
27930
|
-
const [submitError, setSubmitError] =
|
|
27931
|
-
const formRef =
|
|
27947
|
+
const [submitError, setSubmitError] = React110__default.useState(null);
|
|
27948
|
+
const formRef = React110__default.useRef(null);
|
|
27932
27949
|
const formMode = props.mode;
|
|
27933
|
-
const mountedRef =
|
|
27950
|
+
const mountedRef = React110__default.useRef(false);
|
|
27934
27951
|
if (!mountedRef.current) {
|
|
27935
27952
|
mountedRef.current = true;
|
|
27936
27953
|
debug("forms", "mount", {
|
|
@@ -27943,7 +27960,7 @@ var init_Form = __esm({
|
|
|
27943
27960
|
});
|
|
27944
27961
|
}
|
|
27945
27962
|
const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
|
|
27946
|
-
const evalContext =
|
|
27963
|
+
const evalContext = React110__default.useMemo(
|
|
27947
27964
|
() => ({
|
|
27948
27965
|
formValues: formData,
|
|
27949
27966
|
globalVariables: externalContext?.globalVariables ?? {},
|
|
@@ -27952,7 +27969,7 @@ var init_Form = __esm({
|
|
|
27952
27969
|
}),
|
|
27953
27970
|
[formData, externalContext]
|
|
27954
27971
|
);
|
|
27955
|
-
|
|
27972
|
+
React110__default.useEffect(() => {
|
|
27956
27973
|
debug("forms", "initialData-sync", {
|
|
27957
27974
|
mode: formMode,
|
|
27958
27975
|
normalizedInitialData,
|
|
@@ -27963,7 +27980,7 @@ var init_Form = __esm({
|
|
|
27963
27980
|
setFormData(normalizedInitialData);
|
|
27964
27981
|
}
|
|
27965
27982
|
}, [normalizedInitialData]);
|
|
27966
|
-
const processCalculations =
|
|
27983
|
+
const processCalculations = React110__default.useCallback(
|
|
27967
27984
|
(changedFieldId, newFormData) => {
|
|
27968
27985
|
if (!hiddenCalculations.length) return;
|
|
27969
27986
|
const context = {
|
|
@@ -27988,7 +28005,7 @@ var init_Form = __esm({
|
|
|
27988
28005
|
},
|
|
27989
28006
|
[hiddenCalculations, externalContext, eventBus]
|
|
27990
28007
|
);
|
|
27991
|
-
const checkViolations =
|
|
28008
|
+
const checkViolations = React110__default.useCallback(
|
|
27992
28009
|
(changedFieldId, newFormData) => {
|
|
27993
28010
|
if (!violationTriggers.length) return;
|
|
27994
28011
|
const context = {
|
|
@@ -28026,7 +28043,7 @@ var init_Form = __esm({
|
|
|
28026
28043
|
processCalculations(name, newFormData);
|
|
28027
28044
|
checkViolations(name, newFormData);
|
|
28028
28045
|
};
|
|
28029
|
-
const isFieldVisible =
|
|
28046
|
+
const isFieldVisible = React110__default.useCallback(
|
|
28030
28047
|
(fieldName) => {
|
|
28031
28048
|
const condition = conditionalFields[fieldName];
|
|
28032
28049
|
if (!condition) return true;
|
|
@@ -28034,7 +28051,7 @@ var init_Form = __esm({
|
|
|
28034
28051
|
},
|
|
28035
28052
|
[conditionalFields, evalContext]
|
|
28036
28053
|
);
|
|
28037
|
-
const isSectionVisible =
|
|
28054
|
+
const isSectionVisible = React110__default.useCallback(
|
|
28038
28055
|
(section) => {
|
|
28039
28056
|
if (!section.condition) return true;
|
|
28040
28057
|
return Boolean(evaluateFormExpression(section.condition, evalContext));
|
|
@@ -28110,7 +28127,7 @@ var init_Form = __esm({
|
|
|
28110
28127
|
eventBus.emit(`UI:${onCancel}`);
|
|
28111
28128
|
}
|
|
28112
28129
|
};
|
|
28113
|
-
const renderField =
|
|
28130
|
+
const renderField = React110__default.useCallback(
|
|
28114
28131
|
(field) => {
|
|
28115
28132
|
const fieldName = field.name || field.field;
|
|
28116
28133
|
if (!fieldName) return null;
|
|
@@ -28131,7 +28148,7 @@ var init_Form = __esm({
|
|
|
28131
28148
|
[formData, isFieldVisible, relationsData, relationsLoading, isLoading]
|
|
28132
28149
|
);
|
|
28133
28150
|
const effectiveFields = entityDerivedFields ?? fields;
|
|
28134
|
-
const normalizedFields =
|
|
28151
|
+
const normalizedFields = React110__default.useMemo(() => {
|
|
28135
28152
|
if (!effectiveFields || effectiveFields.length === 0) return [];
|
|
28136
28153
|
return effectiveFields.map((field) => {
|
|
28137
28154
|
if (typeof field === "string") {
|
|
@@ -28153,7 +28170,7 @@ var init_Form = __esm({
|
|
|
28153
28170
|
return field;
|
|
28154
28171
|
});
|
|
28155
28172
|
}, [effectiveFields, resolvedEntity]);
|
|
28156
|
-
const schemaFields =
|
|
28173
|
+
const schemaFields = React110__default.useMemo(() => {
|
|
28157
28174
|
if (normalizedFields.length === 0) return null;
|
|
28158
28175
|
if (isDebugEnabled()) {
|
|
28159
28176
|
debugGroup(`Form: ${entityName || "unknown"}`);
|
|
@@ -28163,7 +28180,7 @@ var init_Form = __esm({
|
|
|
28163
28180
|
}
|
|
28164
28181
|
return normalizedFields.map(renderField).filter(Boolean);
|
|
28165
28182
|
}, [normalizedFields, renderField, entityName, conditionalFields]);
|
|
28166
|
-
const sectionElements =
|
|
28183
|
+
const sectionElements = React110__default.useMemo(() => {
|
|
28167
28184
|
if (!sections || sections.length === 0) return null;
|
|
28168
28185
|
return sections.map((section) => {
|
|
28169
28186
|
if (!isSectionVisible(section)) {
|
|
@@ -29695,7 +29712,7 @@ var init_List = __esm({
|
|
|
29695
29712
|
if (entity && typeof entity === "object" && "id" in entity) return [entity];
|
|
29696
29713
|
return [];
|
|
29697
29714
|
}, [entity]);
|
|
29698
|
-
const getItemActions =
|
|
29715
|
+
const getItemActions = React110__default.useCallback(
|
|
29699
29716
|
(item) => {
|
|
29700
29717
|
if (!itemActions) return [];
|
|
29701
29718
|
if (typeof itemActions === "function") {
|
|
@@ -30132,7 +30149,7 @@ var init_MediaGallery = __esm({
|
|
|
30132
30149
|
[selectable, selectedItems, selectionEvent, eventBus]
|
|
30133
30150
|
);
|
|
30134
30151
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
30135
|
-
const items =
|
|
30152
|
+
const items = React110__default.useMemo(() => {
|
|
30136
30153
|
if (propItems) return propItems;
|
|
30137
30154
|
if (entityData.length === 0) return [];
|
|
30138
30155
|
return entityData.map((record, idx) => ({
|
|
@@ -30305,9 +30322,9 @@ function MiniMap({
|
|
|
30305
30322
|
viewportRect,
|
|
30306
30323
|
className
|
|
30307
30324
|
}) {
|
|
30308
|
-
const canvasRef =
|
|
30309
|
-
const frameRef =
|
|
30310
|
-
|
|
30325
|
+
const canvasRef = React110.useRef(null);
|
|
30326
|
+
const frameRef = React110.useRef(0);
|
|
30327
|
+
React110.useEffect(() => {
|
|
30311
30328
|
const canvas = canvasRef.current;
|
|
30312
30329
|
if (!canvas) return;
|
|
30313
30330
|
const ctx = canvas.getContext("2d");
|
|
@@ -30389,7 +30406,7 @@ var init_MiniMap = __esm({
|
|
|
30389
30406
|
}
|
|
30390
30407
|
});
|
|
30391
30408
|
function extractTitle2(children) {
|
|
30392
|
-
if (!
|
|
30409
|
+
if (!React110__default.isValidElement(children)) return void 0;
|
|
30393
30410
|
const props = children.props;
|
|
30394
30411
|
if (typeof props.title === "string") {
|
|
30395
30412
|
return props.title;
|
|
@@ -31102,7 +31119,7 @@ var init_PageHeader = __esm({
|
|
|
31102
31119
|
info: "bg-info/10 text-info"
|
|
31103
31120
|
};
|
|
31104
31121
|
return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
|
|
31105
|
-
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(
|
|
31122
|
+
breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
|
|
31106
31123
|
idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
|
|
31107
31124
|
crumb.href ? /* @__PURE__ */ jsx(
|
|
31108
31125
|
"a",
|
|
@@ -31321,7 +31338,7 @@ var init_debugRegistry = __esm({
|
|
|
31321
31338
|
}
|
|
31322
31339
|
});
|
|
31323
31340
|
function useDebugData() {
|
|
31324
|
-
const [data, setData] =
|
|
31341
|
+
const [data, setData] = React110.useState(() => ({
|
|
31325
31342
|
traits: [],
|
|
31326
31343
|
ticks: [],
|
|
31327
31344
|
guards: [],
|
|
@@ -31335,7 +31352,7 @@ function useDebugData() {
|
|
|
31335
31352
|
},
|
|
31336
31353
|
lastUpdate: Date.now()
|
|
31337
31354
|
}));
|
|
31338
|
-
|
|
31355
|
+
React110.useEffect(() => {
|
|
31339
31356
|
const updateData = () => {
|
|
31340
31357
|
setData({
|
|
31341
31358
|
traits: getAllTraits(),
|
|
@@ -31444,12 +31461,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
|
|
|
31444
31461
|
return positions;
|
|
31445
31462
|
}
|
|
31446
31463
|
function WalkMinimap() {
|
|
31447
|
-
const [walkStep, setWalkStep] =
|
|
31448
|
-
const [traits2, setTraits] =
|
|
31449
|
-
const [coveredEdges, setCoveredEdges] =
|
|
31450
|
-
const [completedTraits, setCompletedTraits] =
|
|
31451
|
-
const prevTraitRef =
|
|
31452
|
-
|
|
31464
|
+
const [walkStep, setWalkStep] = React110.useState(null);
|
|
31465
|
+
const [traits2, setTraits] = React110.useState([]);
|
|
31466
|
+
const [coveredEdges, setCoveredEdges] = React110.useState([]);
|
|
31467
|
+
const [completedTraits, setCompletedTraits] = React110.useState(/* @__PURE__ */ new Set());
|
|
31468
|
+
const prevTraitRef = React110.useRef(null);
|
|
31469
|
+
React110.useEffect(() => {
|
|
31453
31470
|
const interval = setInterval(() => {
|
|
31454
31471
|
const w = window;
|
|
31455
31472
|
const step = w.__orbitalWalkStep;
|
|
@@ -31896,15 +31913,15 @@ var init_EntitiesTab = __esm({
|
|
|
31896
31913
|
}
|
|
31897
31914
|
});
|
|
31898
31915
|
function EventFlowTab({ events: events2 }) {
|
|
31899
|
-
const [filter, setFilter] =
|
|
31900
|
-
const containerRef =
|
|
31901
|
-
const [autoScroll, setAutoScroll] =
|
|
31902
|
-
|
|
31916
|
+
const [filter, setFilter] = React110.useState("all");
|
|
31917
|
+
const containerRef = React110.useRef(null);
|
|
31918
|
+
const [autoScroll, setAutoScroll] = React110.useState(true);
|
|
31919
|
+
React110.useEffect(() => {
|
|
31903
31920
|
if (autoScroll && containerRef.current) {
|
|
31904
31921
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
31905
31922
|
}
|
|
31906
31923
|
}, [events2.length, autoScroll]);
|
|
31907
|
-
const filteredEvents =
|
|
31924
|
+
const filteredEvents = React110.useMemo(() => {
|
|
31908
31925
|
if (filter === "all") return events2;
|
|
31909
31926
|
return events2.filter((e) => e.type === filter);
|
|
31910
31927
|
}, [events2, filter]);
|
|
@@ -32023,7 +32040,7 @@ var init_EventFlowTab = __esm({
|
|
|
32023
32040
|
}
|
|
32024
32041
|
});
|
|
32025
32042
|
function GuardsPanel({ guards }) {
|
|
32026
|
-
const [filter, setFilter] =
|
|
32043
|
+
const [filter, setFilter] = React110.useState("all");
|
|
32027
32044
|
if (guards.length === 0) {
|
|
32028
32045
|
return /* @__PURE__ */ jsx(
|
|
32029
32046
|
EmptyState,
|
|
@@ -32036,7 +32053,7 @@ function GuardsPanel({ guards }) {
|
|
|
32036
32053
|
}
|
|
32037
32054
|
const passedCount = guards.filter((g) => g.result).length;
|
|
32038
32055
|
const failedCount = guards.length - passedCount;
|
|
32039
|
-
const filteredGuards =
|
|
32056
|
+
const filteredGuards = React110.useMemo(() => {
|
|
32040
32057
|
if (filter === "all") return guards;
|
|
32041
32058
|
if (filter === "passed") return guards.filter((g) => g.result);
|
|
32042
32059
|
return guards.filter((g) => !g.result);
|
|
@@ -32197,10 +32214,10 @@ function EffectBadge({ effect }) {
|
|
|
32197
32214
|
] });
|
|
32198
32215
|
}
|
|
32199
32216
|
function TransitionTimeline({ transitions }) {
|
|
32200
|
-
const containerRef =
|
|
32201
|
-
const [autoScroll, setAutoScroll] =
|
|
32202
|
-
const [expandedId, setExpandedId] =
|
|
32203
|
-
|
|
32217
|
+
const containerRef = React110.useRef(null);
|
|
32218
|
+
const [autoScroll, setAutoScroll] = React110.useState(true);
|
|
32219
|
+
const [expandedId, setExpandedId] = React110.useState(null);
|
|
32220
|
+
React110.useEffect(() => {
|
|
32204
32221
|
if (autoScroll && containerRef.current) {
|
|
32205
32222
|
containerRef.current.scrollTop = containerRef.current.scrollHeight;
|
|
32206
32223
|
}
|
|
@@ -32486,9 +32503,9 @@ function getAllEvents(traits2) {
|
|
|
32486
32503
|
}
|
|
32487
32504
|
function EventDispatcherTab({ traits: traits2, schema }) {
|
|
32488
32505
|
const eventBus = useEventBus();
|
|
32489
|
-
const [log3, setLog] =
|
|
32490
|
-
const prevStatesRef =
|
|
32491
|
-
|
|
32506
|
+
const [log3, setLog] = React110.useState([]);
|
|
32507
|
+
const prevStatesRef = React110.useRef(/* @__PURE__ */ new Map());
|
|
32508
|
+
React110.useEffect(() => {
|
|
32492
32509
|
for (const trait of traits2) {
|
|
32493
32510
|
const prev = prevStatesRef.current.get(trait.id);
|
|
32494
32511
|
if (prev && prev !== trait.currentState) {
|
|
@@ -32658,10 +32675,10 @@ function VerifyModePanel({
|
|
|
32658
32675
|
serverCount,
|
|
32659
32676
|
localCount
|
|
32660
32677
|
}) {
|
|
32661
|
-
const [expanded, setExpanded] =
|
|
32662
|
-
const scrollRef =
|
|
32663
|
-
const prevCountRef =
|
|
32664
|
-
|
|
32678
|
+
const [expanded, setExpanded] = React110.useState(true);
|
|
32679
|
+
const scrollRef = React110.useRef(null);
|
|
32680
|
+
const prevCountRef = React110.useRef(0);
|
|
32681
|
+
React110.useEffect(() => {
|
|
32665
32682
|
if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
|
|
32666
32683
|
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
32667
32684
|
}
|
|
@@ -32727,10 +32744,10 @@ function RuntimeDebugger({
|
|
|
32727
32744
|
defaultTab,
|
|
32728
32745
|
schema
|
|
32729
32746
|
}) {
|
|
32730
|
-
const [isCollapsed, setIsCollapsed] =
|
|
32731
|
-
const [isVisible, setIsVisible] =
|
|
32747
|
+
const [isCollapsed, setIsCollapsed] = React110.useState(mode === "verify" ? true : defaultCollapsed);
|
|
32748
|
+
const [isVisible, setIsVisible] = React110.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
|
|
32732
32749
|
const debugData = useDebugData();
|
|
32733
|
-
|
|
32750
|
+
React110.useEffect(() => {
|
|
32734
32751
|
if (mode === "inline") return;
|
|
32735
32752
|
return onDebugToggle((enabled) => {
|
|
32736
32753
|
setIsVisible(enabled);
|
|
@@ -32739,7 +32756,7 @@ function RuntimeDebugger({
|
|
|
32739
32756
|
}
|
|
32740
32757
|
});
|
|
32741
32758
|
}, [mode]);
|
|
32742
|
-
|
|
32759
|
+
React110.useEffect(() => {
|
|
32743
32760
|
if (mode === "inline") return;
|
|
32744
32761
|
const handleKeyDown = (e) => {
|
|
32745
32762
|
if (e.key === "`" && isVisible) {
|
|
@@ -33288,7 +33305,7 @@ function SequenceBar({
|
|
|
33288
33305
|
onSlotRemove(index);
|
|
33289
33306
|
}, [onSlotRemove, playing]);
|
|
33290
33307
|
const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
|
|
33291
|
-
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(
|
|
33308
|
+
return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
|
|
33292
33309
|
i > 0 && /* @__PURE__ */ jsx(
|
|
33293
33310
|
Typography,
|
|
33294
33311
|
{
|
|
@@ -34744,7 +34761,7 @@ var init_StatCard2 = __esm({
|
|
|
34744
34761
|
const labelToUse = propLabel ?? propTitle;
|
|
34745
34762
|
const eventBus = useEventBus();
|
|
34746
34763
|
const { t } = useTranslate();
|
|
34747
|
-
const handleActionClick =
|
|
34764
|
+
const handleActionClick = React110__default.useCallback(() => {
|
|
34748
34765
|
if (action?.event) {
|
|
34749
34766
|
eventBus.emit(`UI:${action.event}`, {});
|
|
34750
34767
|
}
|
|
@@ -34755,7 +34772,7 @@ var init_StatCard2 = __esm({
|
|
|
34755
34772
|
const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
|
|
34756
34773
|
const isLoading = externalLoading ?? false;
|
|
34757
34774
|
const error = externalError;
|
|
34758
|
-
const computeMetricValue =
|
|
34775
|
+
const computeMetricValue = React110__default.useCallback(
|
|
34759
34776
|
(metric, items) => {
|
|
34760
34777
|
if (metric.value !== void 0) {
|
|
34761
34778
|
return metric.value;
|
|
@@ -34794,7 +34811,7 @@ var init_StatCard2 = __esm({
|
|
|
34794
34811
|
},
|
|
34795
34812
|
[]
|
|
34796
34813
|
);
|
|
34797
|
-
const schemaStats =
|
|
34814
|
+
const schemaStats = React110__default.useMemo(() => {
|
|
34798
34815
|
if (!metrics || metrics.length === 0) return null;
|
|
34799
34816
|
return metrics.map((metric) => ({
|
|
34800
34817
|
label: metric.label,
|
|
@@ -34802,7 +34819,7 @@ var init_StatCard2 = __esm({
|
|
|
34802
34819
|
format: metric.format
|
|
34803
34820
|
}));
|
|
34804
34821
|
}, [metrics, data, computeMetricValue]);
|
|
34805
|
-
const calculatedTrend =
|
|
34822
|
+
const calculatedTrend = React110__default.useMemo(() => {
|
|
34806
34823
|
if (manualTrend !== void 0) return manualTrend;
|
|
34807
34824
|
if (previousValue === void 0 || currentValue === void 0)
|
|
34808
34825
|
return void 0;
|
|
@@ -35857,7 +35874,7 @@ var init_Timeline = __esm({
|
|
|
35857
35874
|
}) => {
|
|
35858
35875
|
const { t } = useTranslate();
|
|
35859
35876
|
const entityData = Array.isArray(entity) ? entity : [];
|
|
35860
|
-
const items =
|
|
35877
|
+
const items = React110__default.useMemo(() => {
|
|
35861
35878
|
if (propItems) return propItems;
|
|
35862
35879
|
if (entityData.length === 0) return [];
|
|
35863
35880
|
return entityData.map((record, idx) => {
|
|
@@ -36014,7 +36031,7 @@ var init_TimerDisplay = __esm({
|
|
|
36014
36031
|
}
|
|
36015
36032
|
});
|
|
36016
36033
|
function extractToastProps(children) {
|
|
36017
|
-
if (!
|
|
36034
|
+
if (!React110__default.isValidElement(children)) {
|
|
36018
36035
|
if (typeof children === "string") {
|
|
36019
36036
|
return { message: children };
|
|
36020
36037
|
}
|
|
@@ -36052,7 +36069,7 @@ var init_ToastSlot = __esm({
|
|
|
36052
36069
|
eventBus.emit("UI:CLOSE");
|
|
36053
36070
|
};
|
|
36054
36071
|
if (!isVisible) return null;
|
|
36055
|
-
const isCustomContent =
|
|
36072
|
+
const isCustomContent = React110__default.isValidElement(children) && !message;
|
|
36056
36073
|
return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
|
|
36057
36074
|
Toast,
|
|
36058
36075
|
{
|
|
@@ -36321,7 +36338,7 @@ var init_WizardContainer = __esm({
|
|
|
36321
36338
|
const isCompleted = index < currentStep;
|
|
36322
36339
|
const stepKey = step.id ?? step.tabId ?? `step-${index}`;
|
|
36323
36340
|
const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
|
|
36324
|
-
return /* @__PURE__ */ jsxs(
|
|
36341
|
+
return /* @__PURE__ */ jsxs(React110__default.Fragment, { children: [
|
|
36325
36342
|
/* @__PURE__ */ jsx(
|
|
36326
36343
|
Button,
|
|
36327
36344
|
{
|
|
@@ -36771,12 +36788,12 @@ var init_XPBar = __esm({
|
|
|
36771
36788
|
}
|
|
36772
36789
|
});
|
|
36773
36790
|
function lazyThree(name, loader) {
|
|
36774
|
-
const Lazy =
|
|
36791
|
+
const Lazy = React110__default.lazy(() => loader().then((m) => ({ default: m[name] })));
|
|
36775
36792
|
function ThreeWrapper(props) {
|
|
36776
|
-
return
|
|
36777
|
-
|
|
36793
|
+
return React110__default.createElement(
|
|
36794
|
+
React110__default.Suspense,
|
|
36778
36795
|
{ fallback: null },
|
|
36779
|
-
|
|
36796
|
+
React110__default.createElement(Lazy, props)
|
|
36780
36797
|
);
|
|
36781
36798
|
}
|
|
36782
36799
|
ThreeWrapper.displayName = `Lazy(${name})`;
|
|
@@ -37264,7 +37281,7 @@ function SuspenseConfigProvider({
|
|
|
37264
37281
|
config,
|
|
37265
37282
|
children
|
|
37266
37283
|
}) {
|
|
37267
|
-
return
|
|
37284
|
+
return React110__default.createElement(
|
|
37268
37285
|
SuspenseConfigContext.Provider,
|
|
37269
37286
|
{ value: config },
|
|
37270
37287
|
children
|
|
@@ -37747,7 +37764,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
|
|
|
37747
37764
|
const key = `${parentId}-${index}-trait:${traitName}`;
|
|
37748
37765
|
return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
|
|
37749
37766
|
}
|
|
37750
|
-
return /* @__PURE__ */ jsx(
|
|
37767
|
+
return /* @__PURE__ */ jsx(React110__default.Fragment, { children: child }, `${parentId}-${index}`);
|
|
37751
37768
|
}
|
|
37752
37769
|
if (!child || typeof child !== "object") return null;
|
|
37753
37770
|
const childId = `${parentId}-${index}`;
|
|
@@ -37784,14 +37801,14 @@ function isPatternConfig(value) {
|
|
|
37784
37801
|
if (value === null || value === void 0) return false;
|
|
37785
37802
|
if (typeof value !== "object") return false;
|
|
37786
37803
|
if (Array.isArray(value)) return false;
|
|
37787
|
-
if (
|
|
37804
|
+
if (React110__default.isValidElement(value)) return false;
|
|
37788
37805
|
if (value instanceof Date) return false;
|
|
37789
37806
|
if (typeof value === "function") return false;
|
|
37790
37807
|
const record = value;
|
|
37791
37808
|
return "type" in record && typeof record.type === "string";
|
|
37792
37809
|
}
|
|
37793
37810
|
function isPlainConfigObject(value) {
|
|
37794
|
-
if (
|
|
37811
|
+
if (React110__default.isValidElement(value)) return false;
|
|
37795
37812
|
if (value instanceof Date) return false;
|
|
37796
37813
|
const proto = Object.getPrototypeOf(value);
|
|
37797
37814
|
return proto === Object.prototype || proto === null;
|
|
@@ -38234,7 +38251,7 @@ var FormSection = ({
|
|
|
38234
38251
|
columns = 1,
|
|
38235
38252
|
className
|
|
38236
38253
|
}) => {
|
|
38237
|
-
const [collapsed, setCollapsed] =
|
|
38254
|
+
const [collapsed, setCollapsed] = React110__default.useState(defaultCollapsed);
|
|
38238
38255
|
const { t } = useTranslate();
|
|
38239
38256
|
const eventBus = useEventBus();
|
|
38240
38257
|
const gridClass = {
|
|
@@ -38242,7 +38259,7 @@ var FormSection = ({
|
|
|
38242
38259
|
2: "grid-cols-1 md:grid-cols-2",
|
|
38243
38260
|
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
38244
38261
|
}[columns];
|
|
38245
|
-
|
|
38262
|
+
React110__default.useCallback(() => {
|
|
38246
38263
|
if (collapsible) {
|
|
38247
38264
|
setCollapsed((prev) => !prev);
|
|
38248
38265
|
eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
|