@alquimia-ai/ui 2.0.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{alert-dialog-CP71C4vl.d.mts → alert-dialog-HrXEPlTh.d.mts} +1 -1
- package/dist/{alert-dialog-CP71C4vl.d.ts → alert-dialog-HrXEPlTh.d.ts} +1 -1
- package/dist/components/atoms/index.d.mts +48 -3
- package/dist/components/atoms/index.d.ts +48 -3
- package/dist/components/atoms/index.js +239 -0
- package/dist/components/atoms/index.js.map +1 -1
- package/dist/components/atoms/index.mjs +207 -1
- package/dist/components/atoms/index.mjs.map +1 -1
- package/dist/components/genui/index.d.mts +79 -0
- package/dist/components/genui/index.d.ts +79 -0
- package/dist/components/genui/index.js +4693 -0
- package/dist/components/genui/index.js.map +1 -0
- package/dist/components/genui/index.mjs +4622 -0
- package/dist/components/genui/index.mjs.map +1 -0
- package/dist/components/hooks/index.d.mts +1 -1
- package/dist/components/hooks/index.d.ts +1 -1
- package/dist/components/molecules/documents/index.js +283 -58
- package/dist/components/molecules/documents/index.js.map +1 -1
- package/dist/components/molecules/documents/index.mjs +281 -58
- package/dist/components/molecules/documents/index.mjs.map +1 -1
- package/dist/components/molecules/index.d.mts +2 -2
- package/dist/components/molecules/index.d.ts +2 -2
- package/dist/components/molecules/index.js +335 -156
- package/dist/components/molecules/index.js.map +1 -1
- package/dist/components/molecules/index.mjs +331 -152
- package/dist/components/molecules/index.mjs.map +1 -1
- package/dist/components/molecules/viewers/index.js +182 -3
- package/dist/components/molecules/viewers/index.js.map +1 -1
- package/dist/components/molecules/viewers/index.mjs +182 -3
- package/dist/components/molecules/viewers/index.mjs.map +1 -1
- package/dist/components/organisms/index.d.mts +15 -2
- package/dist/components/organisms/index.d.ts +15 -2
- package/dist/components/organisms/index.js +434 -247
- package/dist/components/organisms/index.js.map +1 -1
- package/dist/components/organisms/index.mjs +431 -244
- package/dist/components/organisms/index.mjs.map +1 -1
- package/dist/components/templates/index.js +210 -31
- package/dist/components/templates/index.js.map +1 -1
- package/dist/components/templates/index.mjs +210 -31
- package/dist/components/templates/index.mjs.map +1 -1
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +554 -307
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +524 -310
- package/dist/index.mjs.map +1 -1
- package/dist/{toast-2xT7L1tJ.d.mts → toast-DEc6eGUE.d.mts} +1 -1
- package/dist/{toast-2xT7L1tJ.d.ts → toast-DEc6eGUE.d.ts} +1 -1
- package/package.json +22 -3
|
@@ -1904,6 +1904,224 @@ var init_think_indicator = __esm({
|
|
|
1904
1904
|
ThinkIndicator.displayName = "ThinkIndicator";
|
|
1905
1905
|
}
|
|
1906
1906
|
});
|
|
1907
|
+
// src/components/atoms/ui/accordion.tsx
|
|
1908
|
+
import * as React26 from "react";
|
|
1909
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
1910
|
+
import { ChevronDown as ChevronDown2 } from "lucide-react";
|
|
1911
|
+
import { jsx as jsx31, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1912
|
+
var AccordionItem, AccordionTrigger, AccordionContent;
|
|
1913
|
+
var init_accordion = __esm({
|
|
1914
|
+
"src/components/atoms/ui/accordion.tsx": function() {
|
|
1915
|
+
"use strict";
|
|
1916
|
+
"use client";
|
|
1917
|
+
init_utils();
|
|
1918
|
+
AccordionItem = React26.forwardRef(function(_param, ref) {
|
|
1919
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1920
|
+
"className"
|
|
1921
|
+
]);
|
|
1922
|
+
return /* @__PURE__ */ jsx31(AccordionPrimitive.Item, _object_spread({
|
|
1923
|
+
ref: ref,
|
|
1924
|
+
className: cn("border-b", className)
|
|
1925
|
+
}, props));
|
|
1926
|
+
});
|
|
1927
|
+
AccordionItem.displayName = "AccordionItem";
|
|
1928
|
+
AccordionTrigger = React26.forwardRef(function(_param, ref) {
|
|
1929
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1930
|
+
"className",
|
|
1931
|
+
"children"
|
|
1932
|
+
]);
|
|
1933
|
+
return /* @__PURE__ */ jsx31(AccordionPrimitive.Header, {
|
|
1934
|
+
className: "flex",
|
|
1935
|
+
children: /* @__PURE__ */ jsxs11(AccordionPrimitive.Trigger, _object_spread_props(_object_spread({
|
|
1936
|
+
ref: ref,
|
|
1937
|
+
className: cn("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className)
|
|
1938
|
+
}, props), {
|
|
1939
|
+
children: [
|
|
1940
|
+
children,
|
|
1941
|
+
/* @__PURE__ */ jsx31(ChevronDown2, {
|
|
1942
|
+
className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"
|
|
1943
|
+
})
|
|
1944
|
+
]
|
|
1945
|
+
}))
|
|
1946
|
+
});
|
|
1947
|
+
});
|
|
1948
|
+
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
1949
|
+
AccordionContent = React26.forwardRef(function(_param, ref) {
|
|
1950
|
+
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1951
|
+
"className",
|
|
1952
|
+
"children"
|
|
1953
|
+
]);
|
|
1954
|
+
return /* @__PURE__ */ jsx31(AccordionPrimitive.Content, _object_spread_props(_object_spread({
|
|
1955
|
+
ref: ref,
|
|
1956
|
+
className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
1957
|
+
}, props), {
|
|
1958
|
+
children: /* @__PURE__ */ jsx31("div", {
|
|
1959
|
+
className: cn("pb-4 pt-0", className),
|
|
1960
|
+
children: children
|
|
1961
|
+
})
|
|
1962
|
+
}));
|
|
1963
|
+
});
|
|
1964
|
+
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
1965
|
+
}
|
|
1966
|
+
});
|
|
1967
|
+
// src/components/atoms/ui/radio-group.tsx
|
|
1968
|
+
import * as React27 from "react";
|
|
1969
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
1970
|
+
import { Circle } from "lucide-react";
|
|
1971
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1972
|
+
var RadioGroup, RadioGroupItem;
|
|
1973
|
+
var init_radio_group = __esm({
|
|
1974
|
+
"src/components/atoms/ui/radio-group.tsx": function() {
|
|
1975
|
+
"use strict";
|
|
1976
|
+
"use client";
|
|
1977
|
+
init_utils();
|
|
1978
|
+
RadioGroup = React27.forwardRef(function(_param, ref) {
|
|
1979
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1980
|
+
"className"
|
|
1981
|
+
]);
|
|
1982
|
+
return /* @__PURE__ */ jsx32(RadioGroupPrimitive.Root, _object_spread({
|
|
1983
|
+
ref: ref,
|
|
1984
|
+
className: cn("grid gap-2", className)
|
|
1985
|
+
}, props));
|
|
1986
|
+
});
|
|
1987
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
1988
|
+
RadioGroupItem = React27.forwardRef(function(_param, ref) {
|
|
1989
|
+
var className = _param.className, props = _object_without_properties(_param, [
|
|
1990
|
+
"className"
|
|
1991
|
+
]);
|
|
1992
|
+
return /* @__PURE__ */ jsx32(RadioGroupPrimitive.Item, _object_spread_props(_object_spread({
|
|
1993
|
+
ref: ref,
|
|
1994
|
+
className: cn("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
1995
|
+
}, props), {
|
|
1996
|
+
children: /* @__PURE__ */ jsx32(RadioGroupPrimitive.Indicator, {
|
|
1997
|
+
className: "flex items-center justify-center",
|
|
1998
|
+
children: /* @__PURE__ */ jsx32(Circle, {
|
|
1999
|
+
className: "h-2.5 w-2.5 fill-current text-current"
|
|
2000
|
+
})
|
|
2001
|
+
})
|
|
2002
|
+
}));
|
|
2003
|
+
});
|
|
2004
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
2005
|
+
}
|
|
2006
|
+
});
|
|
2007
|
+
// src/components/atoms/ui/progress.tsx
|
|
2008
|
+
import * as React28 from "react";
|
|
2009
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
2010
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2011
|
+
var Progress;
|
|
2012
|
+
var init_progress = __esm({
|
|
2013
|
+
"src/components/atoms/ui/progress.tsx": function() {
|
|
2014
|
+
"use strict";
|
|
2015
|
+
"use client";
|
|
2016
|
+
init_utils();
|
|
2017
|
+
Progress = React28.forwardRef(function(_param, ref) {
|
|
2018
|
+
var className = _param.className, value = _param.value, props = _object_without_properties(_param, [
|
|
2019
|
+
"className",
|
|
2020
|
+
"value"
|
|
2021
|
+
]);
|
|
2022
|
+
return /* @__PURE__ */ jsx33(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
2023
|
+
ref: ref,
|
|
2024
|
+
className: cn("relative h-2 w-full overflow-hidden rounded-full bg-muted", className)
|
|
2025
|
+
}, props), {
|
|
2026
|
+
children: /* @__PURE__ */ jsx33(ProgressPrimitive.Indicator, {
|
|
2027
|
+
className: "h-full w-full flex-1 bg-primary transition-all",
|
|
2028
|
+
style: {
|
|
2029
|
+
transform: "translateX(-".concat(100 - (value || 0), "%)")
|
|
2030
|
+
}
|
|
2031
|
+
})
|
|
2032
|
+
}));
|
|
2033
|
+
});
|
|
2034
|
+
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2035
|
+
}
|
|
2036
|
+
});
|
|
2037
|
+
// src/components/atoms/ui/calendar.tsx
|
|
2038
|
+
import { ChevronLeft, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
2039
|
+
import { DayPicker } from "react-day-picker";
|
|
2040
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2041
|
+
function Calendar(_param) {
|
|
2042
|
+
var className = _param.className, classNames = _param.classNames, _param_showOutsideDays = _param.showOutsideDays, showOutsideDays = _param_showOutsideDays === void 0 ? true : _param_showOutsideDays, props = _object_without_properties(_param, [
|
|
2043
|
+
"className",
|
|
2044
|
+
"classNames",
|
|
2045
|
+
"showOutsideDays"
|
|
2046
|
+
]);
|
|
2047
|
+
return /* @__PURE__ */ jsx34(DayPicker, _object_spread({
|
|
2048
|
+
showOutsideDays: showOutsideDays,
|
|
2049
|
+
className: cn("p-3", className),
|
|
2050
|
+
classNames: _object_spread({
|
|
2051
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
2052
|
+
month: "space-y-4",
|
|
2053
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
2054
|
+
caption_label: "text-sm font-medium",
|
|
2055
|
+
nav: "space-x-1 flex items-center",
|
|
2056
|
+
nav_button: cn(buttonVariants({
|
|
2057
|
+
variant: "outline"
|
|
2058
|
+
}), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
2059
|
+
nav_button_previous: "absolute left-1",
|
|
2060
|
+
nav_button_next: "absolute right-1",
|
|
2061
|
+
table: "w-full border-collapse space-y-1",
|
|
2062
|
+
head_row: "flex",
|
|
2063
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
2064
|
+
row: "flex w-full mt-2",
|
|
2065
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
2066
|
+
day: cn(buttonVariants({
|
|
2067
|
+
variant: "ghost"
|
|
2068
|
+
}), "h-9 w-9 p-0 font-normal aria-selected:opacity-100"),
|
|
2069
|
+
day_range_end: "day-range-end",
|
|
2070
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
2071
|
+
day_today: "bg-accent text-accent-foreground",
|
|
2072
|
+
day_outside: "day-outside text-muted-foreground opacity-50",
|
|
2073
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
2074
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
2075
|
+
day_hidden: "invisible"
|
|
2076
|
+
}, classNames),
|
|
2077
|
+
components: {
|
|
2078
|
+
IconLeft: function() {
|
|
2079
|
+
return /* @__PURE__ */ jsx34(ChevronLeft, {
|
|
2080
|
+
className: "h-4 w-4"
|
|
2081
|
+
});
|
|
2082
|
+
},
|
|
2083
|
+
IconRight: function() {
|
|
2084
|
+
return /* @__PURE__ */ jsx34(ChevronRight2, {
|
|
2085
|
+
className: "h-4 w-4"
|
|
2086
|
+
});
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
}, props));
|
|
2090
|
+
}
|
|
2091
|
+
var init_calendar = __esm({
|
|
2092
|
+
"src/components/atoms/ui/calendar.tsx": function() {
|
|
2093
|
+
"use strict";
|
|
2094
|
+
"use client";
|
|
2095
|
+
init_utils();
|
|
2096
|
+
init_button();
|
|
2097
|
+
Calendar.displayName = "Calendar";
|
|
2098
|
+
}
|
|
2099
|
+
});
|
|
2100
|
+
// src/components/atoms/ui/chart.tsx
|
|
2101
|
+
import { ResponsiveContainer, CartesianGrid, XAxis, YAxis, Tooltip, Legend } from "recharts";
|
|
2102
|
+
import { Fragment, jsx as jsx35, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2103
|
+
function Chart(param) {
|
|
2104
|
+
var className = param.className, _param_height = param.height, height = _param_height === void 0 ? 300 : _param_height, children = param.children;
|
|
2105
|
+
return /* @__PURE__ */ jsx35("div", {
|
|
2106
|
+
className: cn("w-full", className),
|
|
2107
|
+
style: {
|
|
2108
|
+
height: height
|
|
2109
|
+
},
|
|
2110
|
+
children: /* @__PURE__ */ jsx35(ResponsiveContainer, {
|
|
2111
|
+
width: "100%",
|
|
2112
|
+
height: "100%",
|
|
2113
|
+
children: children
|
|
2114
|
+
})
|
|
2115
|
+
});
|
|
2116
|
+
}
|
|
2117
|
+
var init_chart = __esm({
|
|
2118
|
+
"src/components/atoms/ui/chart.tsx": function() {
|
|
2119
|
+
"use strict";
|
|
2120
|
+
"use client";
|
|
2121
|
+
init_utils();
|
|
2122
|
+
Chart.displayName = "Chart";
|
|
2123
|
+
}
|
|
2124
|
+
});
|
|
1907
2125
|
// src/components/atoms/index.ts
|
|
1908
2126
|
var init_atoms = __esm({
|
|
1909
2127
|
"src/components/atoms/index.ts": function() {
|
|
@@ -1941,6 +2159,11 @@ var init_atoms = __esm({
|
|
|
1941
2159
|
init_separator();
|
|
1942
2160
|
init_toaster();
|
|
1943
2161
|
init_think_indicator();
|
|
2162
|
+
init_accordion();
|
|
2163
|
+
init_radio_group();
|
|
2164
|
+
init_progress();
|
|
2165
|
+
init_calendar();
|
|
2166
|
+
init_chart();
|
|
1944
2167
|
}
|
|
1945
2168
|
});
|
|
1946
2169
|
// src/components/hooks/use-resize-observer.ts
|
|
@@ -1975,11 +2198,11 @@ __export(pdf_viewer_exports, {
|
|
|
1975
2198
|
}
|
|
1976
2199
|
});
|
|
1977
2200
|
import { useState as useState4, useCallback, useEffect as useEffect4 } from "react";
|
|
1978
|
-
import { ChevronLeft, ChevronRight as
|
|
2201
|
+
import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3, ZoomIn, ZoomOut } from "lucide-react";
|
|
1979
2202
|
import { pdfjs, Document, Page } from "react-pdf";
|
|
1980
2203
|
import "react-pdf/dist/esm/Page/AnnotationLayer.css";
|
|
1981
2204
|
import "react-pdf/dist/esm/Page/TextLayer.css";
|
|
1982
|
-
import { Fragment, jsx as
|
|
2205
|
+
import { Fragment as Fragment2, jsx as jsx36, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1983
2206
|
function PdfViewer(param) {
|
|
1984
2207
|
var doc = param.doc, docId = param.docId;
|
|
1985
2208
|
var _useState4 = _sliced_to_array(useState4(0), 2), numPages = _useState4[0], setNumPages = _useState4[1];
|
|
@@ -2051,21 +2274,21 @@ function PdfViewer(param) {
|
|
|
2051
2274
|
a.click();
|
|
2052
2275
|
URL.revokeObjectURL(docUrl || "");
|
|
2053
2276
|
};
|
|
2054
|
-
return /* @__PURE__ */
|
|
2277
|
+
return /* @__PURE__ */ jsxs13(Fragment2, {
|
|
2055
2278
|
children: [
|
|
2056
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
2057
2280
|
className: "flex justify-between items-center p-4 border-b border-border",
|
|
2058
2281
|
children: [
|
|
2059
|
-
/* @__PURE__ */
|
|
2282
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
2060
2283
|
children: [
|
|
2061
|
-
/* @__PURE__ */
|
|
2284
|
+
/* @__PURE__ */ jsx36(Button, {
|
|
2062
2285
|
onClick: handlePrevPage,
|
|
2063
2286
|
disabled: pageNumber <= 1,
|
|
2064
|
-
children: /* @__PURE__ */
|
|
2287
|
+
children: /* @__PURE__ */ jsx36(ChevronLeft2, {
|
|
2065
2288
|
className: "h-4 w-4"
|
|
2066
2289
|
})
|
|
2067
2290
|
}),
|
|
2068
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ jsxs13("span", {
|
|
2069
2292
|
className: "mx-2",
|
|
2070
2293
|
children: [
|
|
2071
2294
|
"Page ",
|
|
@@ -2074,33 +2297,33 @@ function PdfViewer(param) {
|
|
|
2074
2297
|
numPages
|
|
2075
2298
|
]
|
|
2076
2299
|
}),
|
|
2077
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ jsx36(Button, {
|
|
2078
2301
|
onClick: handleNextPage,
|
|
2079
2302
|
disabled: pageNumber >= numPages,
|
|
2080
|
-
children: /* @__PURE__ */
|
|
2303
|
+
children: /* @__PURE__ */ jsx36(ChevronRight3, {
|
|
2081
2304
|
className: "h-4 w-4"
|
|
2082
2305
|
})
|
|
2083
2306
|
})
|
|
2084
2307
|
]
|
|
2085
2308
|
}),
|
|
2086
|
-
/* @__PURE__ */
|
|
2309
|
+
/* @__PURE__ */ jsxs13("div", {
|
|
2087
2310
|
children: [
|
|
2088
|
-
/* @__PURE__ */
|
|
2311
|
+
/* @__PURE__ */ jsx36(Button, {
|
|
2089
2312
|
onClick: handleZoomOut,
|
|
2090
|
-
children: /* @__PURE__ */
|
|
2313
|
+
children: /* @__PURE__ */ jsx36(ZoomOut, {
|
|
2091
2314
|
className: "h-4 w-4"
|
|
2092
2315
|
})
|
|
2093
2316
|
}),
|
|
2094
|
-
/* @__PURE__ */
|
|
2317
|
+
/* @__PURE__ */ jsxs13("span", {
|
|
2095
2318
|
className: "mx-2",
|
|
2096
2319
|
children: [
|
|
2097
2320
|
(scale * 100).toFixed(0),
|
|
2098
2321
|
"%"
|
|
2099
2322
|
]
|
|
2100
2323
|
}),
|
|
2101
|
-
/* @__PURE__ */
|
|
2324
|
+
/* @__PURE__ */ jsx36(Button, {
|
|
2102
2325
|
onClick: handleZoomIn,
|
|
2103
|
-
children: /* @__PURE__ */
|
|
2326
|
+
children: /* @__PURE__ */ jsx36(ZoomIn, {
|
|
2104
2327
|
className: "h-4 w-4"
|
|
2105
2328
|
})
|
|
2106
2329
|
})
|
|
@@ -2108,18 +2331,18 @@ function PdfViewer(param) {
|
|
|
2108
2331
|
})
|
|
2109
2332
|
]
|
|
2110
2333
|
}),
|
|
2111
|
-
/* @__PURE__ */
|
|
2334
|
+
/* @__PURE__ */ jsx36("div", {
|
|
2112
2335
|
ref: setContainerRef,
|
|
2113
2336
|
className: "overflow-auto",
|
|
2114
|
-
children: /* @__PURE__ */
|
|
2337
|
+
children: /* @__PURE__ */ jsx36(Document, {
|
|
2115
2338
|
file: doc,
|
|
2116
2339
|
onLoadSuccess: onDocumentLoadSuccess,
|
|
2117
2340
|
options: options,
|
|
2118
|
-
loading: /* @__PURE__ */
|
|
2341
|
+
loading: /* @__PURE__ */ jsx36(Loader, {
|
|
2119
2342
|
size: "xl",
|
|
2120
2343
|
colorVariant: "destructive"
|
|
2121
2344
|
}),
|
|
2122
|
-
children: /* @__PURE__ */
|
|
2345
|
+
children: /* @__PURE__ */ jsx36(Page, {
|
|
2123
2346
|
pageNumber: pageNumber,
|
|
2124
2347
|
scale: scale,
|
|
2125
2348
|
width: containerWidth,
|
|
@@ -2154,7 +2377,7 @@ __export(plain_text_viewer_exports, {
|
|
|
2154
2377
|
}
|
|
2155
2378
|
});
|
|
2156
2379
|
import { useState as useState5, useEffect as useEffect5 } from "react";
|
|
2157
|
-
import { Fragment as
|
|
2380
|
+
import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2158
2381
|
function PlainTextViewer(param) {
|
|
2159
2382
|
var doc = param.doc;
|
|
2160
2383
|
var _useState5 = _sliced_to_array(useState5(null), 2), content = _useState5[0], setContent = _useState5[1];
|
|
@@ -2217,12 +2440,12 @@ function PlainTextViewer(param) {
|
|
|
2217
2440
|
}, [
|
|
2218
2441
|
doc
|
|
2219
2442
|
]);
|
|
2220
|
-
return /* @__PURE__ */
|
|
2221
|
-
children: /* @__PURE__ */
|
|
2443
|
+
return /* @__PURE__ */ jsx37(Fragment3, {
|
|
2444
|
+
children: /* @__PURE__ */ jsxs14("div", {
|
|
2222
2445
|
className: "relative w-full h-full max-h-[80vh] overflow-y-auto p-8 alq--prose",
|
|
2223
2446
|
children: [
|
|
2224
|
-
loading && /* @__PURE__ */
|
|
2225
|
-
!loading && /* @__PURE__ */
|
|
2447
|
+
loading && /* @__PURE__ */ jsx37(Loader, {}),
|
|
2448
|
+
!loading && /* @__PURE__ */ jsx37(RichText, {
|
|
2226
2449
|
content: content || ""
|
|
2227
2450
|
})
|
|
2228
2451
|
]
|
|
@@ -2242,7 +2465,7 @@ import { useState as useState6 } from "react";
|
|
|
2242
2465
|
import { ExternalLink } from "lucide-react";
|
|
2243
2466
|
// src/components/molecules/documents/document-viewer.tsx
|
|
2244
2467
|
init_atoms();
|
|
2245
|
-
import
|
|
2468
|
+
import React31, { useEffect as useEffect6, Suspense } from "react";
|
|
2246
2469
|
// src/components/hooks/use-document.tsx
|
|
2247
2470
|
import { useState as useState3 } from "react";
|
|
2248
2471
|
var useDocumentReader = function(url, getDocument) {
|
|
@@ -2323,13 +2546,13 @@ var useDocumentReader = function(url, getDocument) {
|
|
|
2323
2546
|
};
|
|
2324
2547
|
};
|
|
2325
2548
|
// src/components/molecules/documents/document-viewer.tsx
|
|
2326
|
-
import { jsx as
|
|
2327
|
-
var PdfViewer2 =
|
|
2549
|
+
import { jsx as jsx38, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2550
|
+
var PdfViewer2 = React31.lazy(function() {
|
|
2328
2551
|
return Promise.resolve().then(function() {
|
|
2329
2552
|
return init_pdf_viewer(), pdf_viewer_exports;
|
|
2330
2553
|
});
|
|
2331
2554
|
});
|
|
2332
|
-
var PlainTextViewer2 =
|
|
2555
|
+
var PlainTextViewer2 = React31.lazy(function() {
|
|
2333
2556
|
return Promise.resolve().then(function() {
|
|
2334
2557
|
return init_plain_text_viewer(), plain_text_viewer_exports;
|
|
2335
2558
|
});
|
|
@@ -2345,30 +2568,30 @@ var DocumentViewer = function(param) {
|
|
|
2345
2568
|
}, [
|
|
2346
2569
|
isOpen
|
|
2347
2570
|
]);
|
|
2348
|
-
var documentRender = document2 && !error ? /* @__PURE__ */
|
|
2571
|
+
var documentRender = document2 && !error ? /* @__PURE__ */ jsx38(DocumentFactory, {
|
|
2349
2572
|
document: document2,
|
|
2350
2573
|
docId: doc.id
|
|
2351
|
-
}) : /* @__PURE__ */
|
|
2574
|
+
}) : /* @__PURE__ */ jsx38("div", {
|
|
2352
2575
|
className: "flex flex-col items-center justify-center h-full w-full text-center p-4",
|
|
2353
|
-
children: /* @__PURE__ */
|
|
2576
|
+
children: /* @__PURE__ */ jsx38("div", {
|
|
2354
2577
|
className: "text-primary font-medium",
|
|
2355
2578
|
children: error
|
|
2356
2579
|
})
|
|
2357
2580
|
});
|
|
2358
|
-
return /* @__PURE__ */
|
|
2581
|
+
return /* @__PURE__ */ jsx38(Dialog, {
|
|
2359
2582
|
open: isOpen,
|
|
2360
2583
|
onOpenChange: onClose,
|
|
2361
|
-
children: /* @__PURE__ */
|
|
2584
|
+
children: /* @__PURE__ */ jsxs15(DialogContent, {
|
|
2362
2585
|
"aria-describedby": document2 ? "document-description" : void 0,
|
|
2363
2586
|
className: "h-[90%] max-w-[90%] gap-0 flex flex-col focus:outline-none alq--document-viewer-container",
|
|
2364
2587
|
children: [
|
|
2365
|
-
/* @__PURE__ */
|
|
2588
|
+
/* @__PURE__ */ jsx38(DialogHeader, {
|
|
2366
2589
|
className: "border-b border-border pb-2",
|
|
2367
|
-
children: /* @__PURE__ */
|
|
2590
|
+
children: /* @__PURE__ */ jsx38(DialogTitle, {
|
|
2368
2591
|
children: doc.name
|
|
2369
2592
|
})
|
|
2370
2593
|
}),
|
|
2371
|
-
!document2 && loading ? /* @__PURE__ */
|
|
2594
|
+
!document2 && loading ? /* @__PURE__ */ jsx38(Loader, {
|
|
2372
2595
|
size: "xl",
|
|
2373
2596
|
colorVariant: "destructive"
|
|
2374
2597
|
}) : documentRender
|
|
@@ -2378,35 +2601,35 @@ var DocumentViewer = function(param) {
|
|
|
2378
2601
|
};
|
|
2379
2602
|
var DocumentFactory = function(param) {
|
|
2380
2603
|
var document2 = param.document, docId = param.docId;
|
|
2381
|
-
var fallback = /* @__PURE__ */
|
|
2604
|
+
var fallback = /* @__PURE__ */ jsx38(Loader, {
|
|
2382
2605
|
size: "xl",
|
|
2383
2606
|
colorVariant: "destructive"
|
|
2384
2607
|
});
|
|
2385
2608
|
switch(document2 && document2.type){
|
|
2386
2609
|
case "application/pdf":
|
|
2387
|
-
return /* @__PURE__ */
|
|
2610
|
+
return /* @__PURE__ */ jsx38(Suspense, {
|
|
2388
2611
|
fallback: fallback,
|
|
2389
|
-
children: /* @__PURE__ */
|
|
2612
|
+
children: /* @__PURE__ */ jsx38(PdfViewer2, {
|
|
2390
2613
|
doc: document2,
|
|
2391
2614
|
docId: docId
|
|
2392
2615
|
})
|
|
2393
2616
|
});
|
|
2394
2617
|
case "text/plain":
|
|
2395
|
-
return /* @__PURE__ */
|
|
2618
|
+
return /* @__PURE__ */ jsx38(Suspense, {
|
|
2396
2619
|
fallback: fallback,
|
|
2397
|
-
children: /* @__PURE__ */
|
|
2620
|
+
children: /* @__PURE__ */ jsx38(PlainTextViewer2, {
|
|
2398
2621
|
doc: document2,
|
|
2399
2622
|
docId: docId
|
|
2400
2623
|
})
|
|
2401
2624
|
});
|
|
2402
2625
|
default:
|
|
2403
|
-
return /* @__PURE__ */
|
|
2626
|
+
return /* @__PURE__ */ jsx38("div", {
|
|
2404
2627
|
children: "Unsupported file type"
|
|
2405
2628
|
});
|
|
2406
2629
|
}
|
|
2407
2630
|
};
|
|
2408
2631
|
// src/components/molecules/documents/document-selector.tsx
|
|
2409
|
-
import { jsx as
|
|
2632
|
+
import { jsx as jsx39, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2410
2633
|
var DocumentSelector = function(param) {
|
|
2411
2634
|
var documents = param.documents, getDocument = param.getDocument, logInfoMessage = param.logInfoMessage;
|
|
2412
2635
|
var _useState6 = _sliced_to_array(useState6(void 0), 2), selectedDocName = _useState6[0], setSelectedDocName = _useState6[1];
|
|
@@ -2424,47 +2647,47 @@ var DocumentSelector = function(param) {
|
|
|
2424
2647
|
var handleDrawerClose = function() {
|
|
2425
2648
|
setIsModalOpen(false);
|
|
2426
2649
|
};
|
|
2427
|
-
return /* @__PURE__ */
|
|
2650
|
+
return /* @__PURE__ */ jsxs16("div", {
|
|
2428
2651
|
className: "w-full md:w-4/6 alq--document-selector",
|
|
2429
2652
|
children: [
|
|
2430
|
-
/* @__PURE__ */
|
|
2653
|
+
/* @__PURE__ */ jsxs16(Select, {
|
|
2431
2654
|
value: selectedDocName,
|
|
2432
2655
|
onValueChange: setSelectedDocName,
|
|
2433
2656
|
children: [
|
|
2434
|
-
/* @__PURE__ */
|
|
2657
|
+
/* @__PURE__ */ jsx39(SelectTrigger, {
|
|
2435
2658
|
"aria-label": "Documentos",
|
|
2436
|
-
children: /* @__PURE__ */
|
|
2659
|
+
children: /* @__PURE__ */ jsx39(SelectValue, {
|
|
2437
2660
|
placeholder: "Documentos"
|
|
2438
2661
|
})
|
|
2439
2662
|
}),
|
|
2440
|
-
/* @__PURE__ */
|
|
2441
|
-
children: /* @__PURE__ */
|
|
2663
|
+
/* @__PURE__ */ jsx39(SelectContent, {
|
|
2664
|
+
children: /* @__PURE__ */ jsxs16(SelectGroup, {
|
|
2442
2665
|
children: [
|
|
2443
|
-
/* @__PURE__ */
|
|
2666
|
+
/* @__PURE__ */ jsx39(SelectLabel, {
|
|
2444
2667
|
children: "Documents"
|
|
2445
2668
|
}),
|
|
2446
2669
|
documents.map(function(doc) {
|
|
2447
|
-
return /* @__PURE__ */
|
|
2670
|
+
return /* @__PURE__ */ jsxs16("div", {
|
|
2448
2671
|
className: "w-full flex relative",
|
|
2449
2672
|
children: [
|
|
2450
|
-
/* @__PURE__ */
|
|
2673
|
+
/* @__PURE__ */ jsx39(SelectItem, {
|
|
2451
2674
|
className: "w-full",
|
|
2452
2675
|
value: doc.id,
|
|
2453
|
-
children: /* @__PURE__ */
|
|
2676
|
+
children: /* @__PURE__ */ jsx39("div", {
|
|
2454
2677
|
className: "flex justify-between w-full",
|
|
2455
|
-
children: /* @__PURE__ */
|
|
2678
|
+
children: /* @__PURE__ */ jsx39("p", {
|
|
2456
2679
|
className: "h-4 truncate mr-5",
|
|
2457
2680
|
children: doc.name
|
|
2458
2681
|
})
|
|
2459
2682
|
})
|
|
2460
2683
|
}, doc.id),
|
|
2461
|
-
/* @__PURE__ */
|
|
2684
|
+
/* @__PURE__ */ jsx39("div", {
|
|
2462
2685
|
onClick: function(event) {
|
|
2463
2686
|
return handleDocumentClick(doc, event);
|
|
2464
2687
|
},
|
|
2465
2688
|
className: "bflex items-center text-gray-400 hover:text-gray-500 absolute right-0 mt-2",
|
|
2466
2689
|
"aria-label": "Open ".concat(doc.name),
|
|
2467
|
-
children: /* @__PURE__ */
|
|
2690
|
+
children: /* @__PURE__ */ jsx39(ExternalLink, {
|
|
2468
2691
|
className: "h-4 w-4 mx-2"
|
|
2469
2692
|
})
|
|
2470
2693
|
})
|
|
@@ -2476,7 +2699,7 @@ var DocumentSelector = function(param) {
|
|
|
2476
2699
|
})
|
|
2477
2700
|
]
|
|
2478
2701
|
}),
|
|
2479
|
-
selectedDoc && /* @__PURE__ */
|
|
2702
|
+
selectedDoc && /* @__PURE__ */ jsx39(DocumentViewer, {
|
|
2480
2703
|
doc: selectedDoc,
|
|
2481
2704
|
docName: selectedDocName || "",
|
|
2482
2705
|
isOpen: isModalOpen,
|