@versini/sassysaint 8.118.3 → 8.119.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/chunks/{AboutChangelog.CzRPl_ZJ.js → AboutChangelog.B3zToB4T.js} +2 -2
- package/dist/chunks/{AboutEntry.T0dEx5ss.js → AboutEntry.Dc0GMtzL.js} +7 -7
- package/dist/chunks/{App.b-02jOnK.js → App.Bcw00dJK.js} +648 -647
- package/dist/chunks/{BubbleActions.DlzjlTV0.js → BubbleActions.BcwPpzhU.js} +3 -3
- package/dist/chunks/ButtonIconDelete.CASHORv6.js +523 -0
- package/dist/chunks/{Chart.DGg3yX93.js → Chart.B0oqrdYo.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.DuOK1hTq.js → ChatBubbleAssistant.DAwx85Wd.js} +9 -6
- package/dist/chunks/{ChatBubbleUser.BbO4WHsG.js → ChatBubbleUser.BRTLYDmZ.js} +4 -4
- package/dist/chunks/HistoryDataGrid.Bg984Jd_.js +465 -0
- package/dist/chunks/HistoryEntry.4GpBDf9x.js +305 -0
- package/dist/chunks/InlineFilter.Cv_LUpTp.js +123 -0
- package/dist/chunks/{LoginEntry.BzDE1Poe.js → LoginEntry.5bQhuYQl.js} +4 -4
- package/dist/chunks/{LogoEntry.cAcKJnnq.js → LogoEntry.CN5P16eA.js} +175 -163
- package/dist/chunks/{MemoriesEntry.BOW5ccxB.js → MemoriesEntry.D0q1U5FD.js} +234 -206
- package/dist/chunks/{ProfileEntry.D0ZvtSLW.js → ProfileEntry.Ck-5SP70.js} +4 -4
- package/dist/chunks/{SettingsEntry.Cu6XoVBP.js → SettingsEntry.CfB9DKIp.js} +5 -5
- package/dist/chunks/{UsageEntry.Dg2VQMNQ.js → UsageEntry.BCFJMOjQ.js} +5 -5
- package/dist/chunks/{_baseUniq.CDFOdpsq.js → _baseUniq.DRTEXwBu.js} +1 -1
- package/dist/chunks/{arc.DIMWacuO.js → arc.x_GRGNuD.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.EZuTwf79.js → architecture-U656AL7Q.DSfD0nUy.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.XWG69Opw.js → architectureDiagram-VXUJARFQ.CAS-oDjc.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.DTDyWto5.js → blockDiagram-VD42YOAC.P_XB2AgQ.js} +5 -5
- package/dist/chunks/{browser.BUwFK0it.js → browser.oW1ZW8ge.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.CiOZ3jjz.js → c4Diagram-YG6GDRKO.Dc9Vyv3k.js} +2 -2
- package/dist/chunks/{channel.CNtCxYS9.js → channel.TjlRRr3U.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.BmiSnljb.js → chunk-4BX2VUAB.BwgmyLAX.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.CypQ3DlX.js → chunk-55IACEB6.Cgq1oeLK.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.CAsGHOXd.js → chunk-B4BG7PRW.Ds2wbzEG.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.BsvwBeSE.js → chunk-DI55MBZ5.Bft9jyaz.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.CMZG9a_j.js → chunk-FMBD7UC4.DF-Zr883.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.B1G6yVKe.js → chunk-QN33PNHL.BVMRH_Hs.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.BVTUFZ9G.js → chunk-QZHKN3VN.DS306ds1.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.Cj68sFYC.js → chunk-TZMSLE5B.Cl4RUaGp.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.BdBLe1Pm.js → classDiagram-2ON5EDUG.DbFfjSp_.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.BdBLe1Pm.js → classDiagram-v2-WZHVMYZB.DbFfjSp_.js} +2 -2
- package/dist/chunks/{clone.Bl1H1sdZ.js → clone.B8XxgJj0.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.BngEZF8t.js → cose-bilkent-S5V4N54A.CL-tsB7O.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.BIOJIiYB.js → dagre-6UL2VRFP.7xKesqEK.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.BA3fj6Nq.js → diagram-PSM6KHXK.D6JNXJQr.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.BDz34UEM.js → diagram-QEK2KX5R.VaJKE9Ih.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.BtdDbeYp.js → diagram-S2PKOQOG.BjCuqhPd.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.DYaFc4z-.js → erDiagram-Q2GNP2WA.BYnxwTG-.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.D-v3of4Q.js → flowDiagram-NV44I4VS.DefWDma3.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.oDBdmAkc.js → ganttDiagram-JELNMOA3.BrEeaW2n.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.DN2di_Fe.js → gitGraph-F6HP7TQM.C4_YWAr0.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.DajMwrkL.js → gitGraphDiagram-NY62KEGX.GGrXKGya.js} +4 -4
- package/dist/chunks/{graph.B6hUKMGa.js → graph.BxDrvENy.js} +2 -2
- package/dist/chunks/{index.BP0mr4EX.js → index.BMADibmh.js} +3 -3
- package/dist/chunks/{index.Ce-phw-r.js → index.CR0NHbVR.js} +1 -1
- package/dist/chunks/{index.5G9kbS3g.js → index.CZRaE0eA.js} +1 -1
- package/dist/chunks/{index.BK8xVBCf.js → index.CsAjUl3G.js} +3 -3
- package/dist/chunks/{index.DVhdxxbV.js → index.DOwjLeiM.js} +1 -1
- package/dist/chunks/{index.BdK0dyZF.js → index.DS9SCH32.js} +1 -1
- package/dist/chunks/{index.WKe5H80p.js → index.DvThh-C6.js} +1 -1
- package/dist/chunks/{index.CK-6GwI_.js → index.o4ZD5ALX.js} +5 -5
- package/dist/chunks/{index.BYnYkgl6.js → index.tqKeN7sl.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.Ff-LQyU7.js → info-NVLQJR56.E0G9wIVE.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.B1g8ka0M.js → infoDiagram-WHAUD3N6.CY9ADLsc.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.B2pvmFIq.js → journeyDiagram-XKPGCS4Q.BZHhK7w4.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.86ACWbVN.js → kanban-definition-3W4ZIXB7.DQSZD0Em.js} +2 -2
- package/dist/chunks/{layout.BTjGFptt.js → layout.DUh_4gWb.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.AD6ac88f.js → mermaid-parser.core.lAJFSSvC.js} +10 -10
- package/dist/chunks/{min.D3P2ZKZS.js → min.B3NH5ZNz.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.DODKOgNQ.js → mindmap-definition-VGOIOE7T.CVTcq_-S.js} +257 -232
- package/dist/chunks/{packet-BFZMPI3H.5TsgoQAg.js → packet-BFZMPI3H.CaaCaP6S.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.Cjt_2-eq.js → pie-7BOR55EZ.Ctr5Wngs.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.C5d0mn2P.js → pieDiagram-ADFJNKIX.v0K5SYBL.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.Cpz6Q0uO.js → quadrantDiagram-AYHSOK5B.CSGhc5R-.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.C4ikLYa9.js → radar-NHE76QYJ.BYJioslS.js} +1 -1
- package/dist/chunks/{rehype-mermaid.BAT9MpFC.js → rehype-mermaid.CYJb7tO-.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.BxNfK087.js → requirementDiagram-UZGBJVZJ.07FdvPam.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.DbQNnnUN.js → sankeyDiagram-TZEHDZUN.BJQl-LVq.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.BJlAOxoz.js → sequenceDiagram-WL72ISMW.D3HP-wCt.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.Dv1-v3Pv.js → stateDiagram-FKZM4ZOC.uXuYKEnS.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.C7A0KOQG.js → stateDiagram-v2-4FDKWEC3.i7NR_lBC.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.BnnEO1qA.js → timeline-definition-IT6M3QCI.CfrxZtW7.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.ktiMR3IF.js → treemap-KMMF4GRG.D0E-EXib.js} +1 -1
- package/dist/chunks/{useMarkdown.gc4xGDfZ.js → useMarkdown.CVmi3L7b.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.RJg0uRPz.js → xychartDiagram-PRI3JC2R.BedGeb-X.js} +1 -1
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/chunks/ButtonIconDelete.c_Sj_7Q4.js +0 -326
- package/dist/chunks/ChatHistoryTable.6lV7mI6Q.js +0 -322
- package/dist/chunks/HistoryEntry.C8W5YNCP.js +0 -333
- package/dist/chunks/useAnimatedHeight.CkKrKI_C.js +0 -91
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { n as
|
|
3
|
-
import { Button as R,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { n as De, LOCAL_STORAGE_PREFIX as Y, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as Se, LOCAL_STORAGE_SORT_MEMORY_COLUMN as we, useUserMemories as Te, useExpiredMemories as Ee, useDeleteMemory as Me, useDeleteAllActiveMemories as ke, useDeleteAllExpiredMemories as Re, useUpdateMemory as Le, useRestoreMemory as Ie } from "./index.o4ZD5ALX.js";
|
|
3
|
+
import { Button as R, CellWrapper as Oe, SortDirections as N, ButtonIcon as F, IconEdit as Be, IconRestore as Pe, IconDelete as _e } from "./LogoEntry.CN5P16eA.js";
|
|
4
|
+
import { InlineFilter as Fe, AnimatedWrapper as Ge } from "./InlineFilter.Cv_LUpTp.js";
|
|
5
|
+
import { Panel as ie, Toggle as M, ButtonCancel as oe, ResponsiveTooltip as G, useLocalStorage as Q, debounce as ze, ConfirmationPanel as K } from "./App.Bcw00dJK.js";
|
|
6
|
+
import { useState as f, useEffect as qe, useContext as $e, useRef as S, useMemo as J, useCallback as je } from "react";
|
|
7
|
+
import { TextArea as Ue } from "./index.CR0NHbVR.js";
|
|
8
|
+
import { DataGridContext as Z, useColumnMeasurement as Ve, getBodyClass as He, DataGridHeader as We, DataGridRow as ne, DataGridCell as y, DataGridCellSort as ee, ButtonIconDelete as Xe, DataGrid as Ye } from "./ButtonIconDelete.CASHORv6.js";
|
|
9
9
|
import w from "clsx";
|
|
10
|
-
const
|
|
10
|
+
const Qe = ({
|
|
11
11
|
open: r,
|
|
12
12
|
onOpenChange: s,
|
|
13
13
|
initialText: i,
|
|
@@ -15,8 +15,8 @@ const He = ({
|
|
|
15
15
|
onSave: c,
|
|
16
16
|
isSaving: a = !1
|
|
17
17
|
}) => {
|
|
18
|
-
const [
|
|
19
|
-
|
|
18
|
+
const [o, p] = f(i), [l, x] = f("none");
|
|
19
|
+
qe(() => {
|
|
20
20
|
if (r) {
|
|
21
21
|
p(i);
|
|
22
22
|
const d = t?.expiration || "none";
|
|
@@ -24,52 +24,52 @@ const He = ({
|
|
|
24
24
|
}
|
|
25
25
|
}, [r, i, t?.expiration]);
|
|
26
26
|
const g = () => {
|
|
27
|
-
if (
|
|
27
|
+
if (o.trim().length >= 3) {
|
|
28
28
|
const d = l === "none" ? null : l;
|
|
29
|
-
c(
|
|
29
|
+
c(o.trim(), d);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, v = o.trim().length >= 3, A = o.trim() !== i.trim() || l !== (t?.expiration || "none");
|
|
32
32
|
return /* @__PURE__ */ e(
|
|
33
|
-
|
|
33
|
+
ie,
|
|
34
34
|
{
|
|
35
35
|
open: r,
|
|
36
36
|
onOpenChange: s,
|
|
37
37
|
title: "Edit Memory",
|
|
38
38
|
animation: !0,
|
|
39
39
|
animationType: "fade",
|
|
40
|
-
footer: /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
40
|
+
footer: /* @__PURE__ */ n("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
41
|
+
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(oe, { onOpenChange: s, label: "Cancel" }) }),
|
|
42
42
|
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
43
43
|
R,
|
|
44
44
|
{
|
|
45
45
|
mode: "dark",
|
|
46
46
|
focusMode: "light",
|
|
47
|
-
disabled: a || !
|
|
47
|
+
disabled: a || !v || !A,
|
|
48
48
|
onClick: g,
|
|
49
49
|
children: a ? "Saving..." : "Save"
|
|
50
50
|
}
|
|
51
51
|
) })
|
|
52
52
|
] }),
|
|
53
|
-
children: /* @__PURE__ */
|
|
53
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col pt-2 gap-4", children: [
|
|
54
54
|
/* @__PURE__ */ e(
|
|
55
|
-
|
|
55
|
+
Ue,
|
|
56
56
|
{
|
|
57
57
|
mode: "dark",
|
|
58
58
|
focusMode: "light",
|
|
59
59
|
label: "Memory text",
|
|
60
60
|
name: "memoryText",
|
|
61
|
-
value:
|
|
61
|
+
value: o,
|
|
62
62
|
onChange: (d) => p(d.target.value),
|
|
63
63
|
autoFocus: !0,
|
|
64
|
-
helperText:
|
|
64
|
+
helperText: o.trim().length < 3 ? "Memory text must be at least 3 characters" : `${o.length} characters`
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-3 p-4 bg-surface-darker rounded-md", children: [
|
|
68
68
|
/* @__PURE__ */ e("h3", { className: "text-sm m-0", children: "Memory Expiration" }),
|
|
69
69
|
/* @__PURE__ */ e("p", { className: "text-xs text-copy-medium m-0", children: "Set when this memory should expire and be automatically removed." }),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-2", children: [
|
|
71
71
|
/* @__PURE__ */ e(
|
|
72
|
-
|
|
72
|
+
M,
|
|
73
73
|
{
|
|
74
74
|
mode: "dark",
|
|
75
75
|
focusMode: "light",
|
|
@@ -84,7 +84,7 @@ const He = ({
|
|
|
84
84
|
}
|
|
85
85
|
),
|
|
86
86
|
/* @__PURE__ */ e(
|
|
87
|
-
|
|
87
|
+
M,
|
|
88
88
|
{
|
|
89
89
|
mode: "dark",
|
|
90
90
|
focusMode: "light",
|
|
@@ -99,7 +99,7 @@ const He = ({
|
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
101
|
/* @__PURE__ */ e(
|
|
102
|
-
|
|
102
|
+
M,
|
|
103
103
|
{
|
|
104
104
|
mode: "dark",
|
|
105
105
|
focusMode: "light",
|
|
@@ -114,7 +114,7 @@ const He = ({
|
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
116
|
/* @__PURE__ */ e(
|
|
117
|
-
|
|
117
|
+
M,
|
|
118
118
|
{
|
|
119
119
|
mode: "dark",
|
|
120
120
|
focusMode: "light",
|
|
@@ -130,47 +130,47 @@ const He = ({
|
|
|
130
130
|
)
|
|
131
131
|
] })
|
|
132
132
|
] }),
|
|
133
|
-
t && /* @__PURE__ */
|
|
133
|
+
t && /* @__PURE__ */ n("div", { className: "flex flex-col gap-3 p-4 bg-surface-darker rounded-md", children: [
|
|
134
134
|
/* @__PURE__ */ e("h3", { className: "text-sm m-0", children: "Memory Details" }),
|
|
135
|
-
t.categories && t.categories.length > 0 && /* @__PURE__ */
|
|
135
|
+
t.categories && t.categories.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
136
136
|
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Category" }),
|
|
137
|
-
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.categories.map((d,
|
|
137
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.categories.map((d, D) => /* @__PURE__ */ e(
|
|
138
138
|
"span",
|
|
139
139
|
{
|
|
140
140
|
className: "text-xs px-2 py-1 text-copy-light rounded",
|
|
141
141
|
children: d
|
|
142
142
|
},
|
|
143
|
-
`${d}-${
|
|
143
|
+
`${d}-${D}`
|
|
144
144
|
)) })
|
|
145
145
|
] }),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
148
|
-
t.confidence !== void 0 && t.confidence !== null && /* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col sm:flex-row gap-4", children: [
|
|
147
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-3 sm:flex-1", children: [
|
|
148
|
+
t.confidence !== void 0 && t.confidence !== null && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
149
149
|
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Confidence" }),
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ n("span", { className: "text-sm text-copy-light", children: [
|
|
151
151
|
(t.confidence * 100).toFixed(0),
|
|
152
152
|
"%"
|
|
153
153
|
] })
|
|
154
154
|
] }),
|
|
155
|
-
t.status && /* @__PURE__ */
|
|
155
|
+
t.status && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
156
156
|
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Status" }),
|
|
157
157
|
/* @__PURE__ */ e("span", { className: "text-sm text-copy-light capitalize", children: t.status })
|
|
158
158
|
] }),
|
|
159
|
-
t.sourceType && /* @__PURE__ */
|
|
159
|
+
t.sourceType && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
160
160
|
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Source Type" }),
|
|
161
161
|
/* @__PURE__ */ e("span", { className: "text-sm text-copy-light capitalize", children: t.sourceType })
|
|
162
162
|
] })
|
|
163
163
|
] }),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
t.quote && /* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-3 sm:flex-1", children: [
|
|
165
|
+
t.quote && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
166
166
|
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Original Prompt" }),
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ n("p", { className: "text-sm text-copy-light m-0 italic", children: [
|
|
168
168
|
'"',
|
|
169
169
|
t.quote,
|
|
170
170
|
'"'
|
|
171
171
|
] })
|
|
172
172
|
] }),
|
|
173
|
-
t.canonicalText && /* @__PURE__ */
|
|
173
|
+
t.canonicalText && /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
174
174
|
/* @__PURE__ */ e("span", { className: "text-xs text-copy-medium uppercase", children: "Canonical Text" }),
|
|
175
175
|
/* @__PURE__ */ e("p", { className: "text-sm text-copy-light m-0 font-mono", children: t.canonicalText })
|
|
176
176
|
] })
|
|
@@ -181,124 +181,142 @@ const He = ({
|
|
|
181
181
|
}
|
|
182
182
|
);
|
|
183
183
|
};
|
|
184
|
-
|
|
184
|
+
const Ke = ({ className: r, children: s, ...i }) => {
|
|
185
|
+
const t = $e(Z), c = S(null);
|
|
186
|
+
Ve(c, s);
|
|
187
|
+
const a = He(!!t.columns, r);
|
|
188
|
+
return /* @__PURE__ */ e(Z.Provider, {
|
|
189
|
+
value: {
|
|
190
|
+
...t,
|
|
191
|
+
cellWrapper: Oe.BODY
|
|
192
|
+
},
|
|
193
|
+
children: /* @__PURE__ */ e("div", {
|
|
194
|
+
ref: c,
|
|
195
|
+
role: "rowgroup",
|
|
196
|
+
className: a,
|
|
197
|
+
...i,
|
|
198
|
+
children: s
|
|
199
|
+
})
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
function Je({
|
|
185
203
|
isLoading: r,
|
|
186
204
|
isError: s,
|
|
187
205
|
viewMode: i
|
|
188
206
|
}) {
|
|
189
207
|
const t = i === "expired" ? "expired memories" : "memories";
|
|
190
|
-
return r ? /* @__PURE__ */
|
|
208
|
+
return r ? /* @__PURE__ */ n("p", { className: "m-0", children: [
|
|
191
209
|
"Loading ",
|
|
192
210
|
t,
|
|
193
211
|
"..."
|
|
194
|
-
] }) : s ? /* @__PURE__ */
|
|
212
|
+
] }) : s ? /* @__PURE__ */ n("p", { className: "m-0 text-copy-error-light", children: [
|
|
195
213
|
"Failed to load ",
|
|
196
214
|
t,
|
|
197
215
|
"."
|
|
198
216
|
] }) : null;
|
|
199
217
|
}
|
|
200
|
-
function
|
|
218
|
+
function Ze({ viewMode: r }) {
|
|
201
219
|
return /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: r === "expired" ? "No expired memories." : "No memories stored." });
|
|
202
220
|
}
|
|
203
|
-
|
|
221
|
+
const et = ({
|
|
204
222
|
sortDirection: r,
|
|
205
223
|
sortedCell: s,
|
|
206
224
|
viewMode: i,
|
|
207
|
-
onSortChange: t
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
225
|
+
onSortChange: t,
|
|
226
|
+
caption: c
|
|
227
|
+
}) => {
|
|
228
|
+
const a = (o) => {
|
|
229
|
+
t(o);
|
|
211
230
|
};
|
|
212
|
-
return /* @__PURE__ */ e(
|
|
213
|
-
/* @__PURE__ */ e(y, { className: "
|
|
231
|
+
return /* @__PURE__ */ e(We, { caption: c, children: /* @__PURE__ */ n(ne, { children: [
|
|
232
|
+
/* @__PURE__ */ e(y, { className: "invisible", children: "Row" }),
|
|
214
233
|
/* @__PURE__ */ e(y, { children: "Memory" }),
|
|
215
234
|
/* @__PURE__ */ e(
|
|
216
|
-
|
|
235
|
+
ee,
|
|
217
236
|
{
|
|
218
237
|
focusMode: "system",
|
|
219
238
|
buttonClassName: "text-xs sm:text-sm",
|
|
220
239
|
cellId: "createdAt",
|
|
221
240
|
align: "left",
|
|
222
|
-
sortDirection: r,
|
|
241
|
+
sortDirection: s === "createdAt" ? r : !1,
|
|
223
242
|
sortedCell: s,
|
|
224
|
-
|
|
243
|
+
onSort: a,
|
|
225
244
|
children: "Date"
|
|
226
245
|
}
|
|
227
246
|
),
|
|
228
247
|
/* @__PURE__ */ e(
|
|
229
|
-
|
|
248
|
+
ee,
|
|
230
249
|
{
|
|
231
250
|
focusMode: "system",
|
|
232
251
|
buttonClassName: "text-xs sm:text-sm",
|
|
233
252
|
cellId: "expiresAt",
|
|
234
253
|
align: "left",
|
|
235
|
-
sortDirection: r,
|
|
254
|
+
sortDirection: s === "expiresAt" ? r : !1,
|
|
236
255
|
sortedCell: s,
|
|
237
|
-
|
|
256
|
+
onSort: a,
|
|
238
257
|
children: i === "active" ? "Expires" : "Expired"
|
|
239
258
|
}
|
|
240
259
|
),
|
|
241
260
|
/* @__PURE__ */ e(y, { align: "right", children: "Actions" })
|
|
242
261
|
] }) });
|
|
243
|
-
}
|
|
244
|
-
function
|
|
262
|
+
};
|
|
263
|
+
function tt(r, s, i) {
|
|
245
264
|
return [...r].sort((t, c) => {
|
|
246
265
|
if (s === "createdAt") {
|
|
247
|
-
const a = t.createdAt ? new Date(t.createdAt).getTime() : 0,
|
|
248
|
-
return i ===
|
|
266
|
+
const a = t.createdAt ? new Date(t.createdAt).getTime() : 0, o = c.createdAt ? new Date(c.createdAt).getTime() : 0;
|
|
267
|
+
return i === N.ASC ? a - o : o - a;
|
|
249
268
|
}
|
|
250
269
|
if (s === "expiresAt") {
|
|
251
|
-
const a = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER,
|
|
252
|
-
return i ===
|
|
270
|
+
const a = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, o = c.expiresAt ? new Date(c.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
|
|
271
|
+
return i === N.ASC ? a - o : o - a;
|
|
253
272
|
}
|
|
254
273
|
return 0;
|
|
255
274
|
});
|
|
256
275
|
}
|
|
257
|
-
function
|
|
276
|
+
function te(r, s) {
|
|
258
277
|
const i = `${r} memor${r === 1 ? "y" : "ies"}`, t = s ? ` (~${s} tokens)` : "";
|
|
259
278
|
return i + t;
|
|
260
279
|
}
|
|
261
|
-
const
|
|
280
|
+
const k = {
|
|
262
281
|
rowNumber: "dark:text-copy-medium",
|
|
263
282
|
memoryText: "dark:text-copy-lighter max-w-25 sm:max-w-100 text-xs sm:text-sm",
|
|
264
283
|
date: "dark:text-copy-medium sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none",
|
|
265
|
-
dateCompact: "dark:text-copy-medium sm:whitespace-nowrap text-xs sm:text-sm"
|
|
266
|
-
actions: "align-top border-l border-table-light dark:border-table-dark"
|
|
284
|
+
dateCompact: "dark:text-copy-medium sm:whitespace-nowrap text-xs sm:text-sm"
|
|
267
285
|
};
|
|
268
|
-
function
|
|
286
|
+
function re(r, s) {
|
|
269
287
|
const i = s.trim().toLowerCase();
|
|
270
288
|
return i ? r.filter((t) => {
|
|
271
|
-
const c = (t.description || "").toLowerCase(), a = (t.text || "").toLowerCase(),
|
|
272
|
-
return c.includes(i) || a.includes(i) ||
|
|
289
|
+
const c = (t.description || "").toLowerCase(), a = (t.text || "").toLowerCase(), o = (t.categories || []).join(" ").toLowerCase();
|
|
290
|
+
return c.includes(i) || a.includes(i) || o.includes(i);
|
|
273
291
|
}) : r;
|
|
274
292
|
}
|
|
275
|
-
function
|
|
293
|
+
function rt({
|
|
276
294
|
memory: r,
|
|
277
295
|
index: s,
|
|
278
296
|
viewMode: i,
|
|
279
297
|
isEditPending: t = !1,
|
|
280
298
|
isDeletePending: c = !1,
|
|
281
299
|
isRestorePending: a = !1,
|
|
282
|
-
onEdit:
|
|
300
|
+
onEdit: o,
|
|
283
301
|
onDelete: p,
|
|
284
302
|
onRestore: l
|
|
285
303
|
}) {
|
|
286
|
-
const x = r.description || r.text, g = r.createdAt ? new Date(r.createdAt).toLocaleDateString() : "-",
|
|
287
|
-
return /* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */ e(y, { className: w(
|
|
304
|
+
const x = r.description || r.text, g = r.createdAt ? new Date(r.createdAt).toLocaleDateString() : "-", v = r.expiresAt ? new Date(r.expiresAt).toLocaleDateString() : i === "active" ? "Never" : "-";
|
|
305
|
+
return /* @__PURE__ */ n(ne, { children: [
|
|
306
|
+
/* @__PURE__ */ e(y, { className: w(k.rowNumber), children: s + 1 }),
|
|
289
307
|
/* @__PURE__ */ e(
|
|
290
308
|
y,
|
|
291
309
|
{
|
|
292
|
-
className: w(
|
|
310
|
+
className: w(k.memoryText),
|
|
293
311
|
style: { wordBreak: "break-word" },
|
|
294
312
|
children: x
|
|
295
313
|
}
|
|
296
314
|
),
|
|
297
|
-
/* @__PURE__ */ e(y, { className: w(
|
|
298
|
-
/* @__PURE__ */ e(y, { className: w(
|
|
299
|
-
/* @__PURE__ */ e(y, {
|
|
300
|
-
i === "active" &&
|
|
301
|
-
|
|
315
|
+
/* @__PURE__ */ e(y, { className: w(k.date), children: g }),
|
|
316
|
+
/* @__PURE__ */ e(y, { className: w(k.dateCompact), children: v }),
|
|
317
|
+
/* @__PURE__ */ e(y, { align: "right", borderLeft: !0, children: /* @__PURE__ */ n("div", { className: "flex flex-wrap justify-end gap-2", children: [
|
|
318
|
+
i === "active" && o && /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
319
|
+
G,
|
|
302
320
|
{
|
|
303
321
|
label: "Edit memory",
|
|
304
322
|
mode: "system",
|
|
@@ -311,14 +329,14 @@ function We({
|
|
|
311
329
|
label: "Edit memory",
|
|
312
330
|
variant: "primary",
|
|
313
331
|
disabled: t,
|
|
314
|
-
onClick: () =>
|
|
315
|
-
children: /* @__PURE__ */ e(
|
|
332
|
+
onClick: () => o(r),
|
|
333
|
+
children: /* @__PURE__ */ e(Be, { size: "size-3", monotone: !0 })
|
|
316
334
|
}
|
|
317
335
|
)
|
|
318
336
|
}
|
|
319
337
|
) }),
|
|
320
338
|
i === "expired" && l && /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
321
|
-
|
|
339
|
+
G,
|
|
322
340
|
{
|
|
323
341
|
label: "Restore memory",
|
|
324
342
|
mode: "system",
|
|
@@ -332,20 +350,20 @@ function We({
|
|
|
332
350
|
variant: "primary",
|
|
333
351
|
disabled: a,
|
|
334
352
|
onClick: () => l(r.memoryId),
|
|
335
|
-
children: /* @__PURE__ */ e(
|
|
353
|
+
children: /* @__PURE__ */ e(Pe, { size: "size-3", monotone: !0 })
|
|
336
354
|
}
|
|
337
355
|
)
|
|
338
356
|
}
|
|
339
357
|
) }),
|
|
340
358
|
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: i === "active" ? /* @__PURE__ */ e(
|
|
341
|
-
|
|
359
|
+
Xe,
|
|
342
360
|
{
|
|
343
361
|
label: "Delete memory",
|
|
344
362
|
disabled: c,
|
|
345
363
|
onClick: () => p(r)
|
|
346
364
|
}
|
|
347
365
|
) : /* @__PURE__ */ e(
|
|
348
|
-
|
|
366
|
+
G,
|
|
349
367
|
{
|
|
350
368
|
label: "Delete memory",
|
|
351
369
|
mode: "system",
|
|
@@ -360,33 +378,33 @@ function We({
|
|
|
360
378
|
iconClassName: "text-copy-error-dark dark:text-copy-error-light",
|
|
361
379
|
disabled: c,
|
|
362
380
|
onClick: () => p(r),
|
|
363
|
-
children: /* @__PURE__ */ e(
|
|
381
|
+
children: /* @__PURE__ */ e(_e, { size: "size-3", monotone: !0 })
|
|
364
382
|
}
|
|
365
383
|
)
|
|
366
384
|
}
|
|
367
385
|
) })
|
|
368
386
|
] }) })
|
|
369
|
-
] }
|
|
387
|
+
] });
|
|
370
388
|
}
|
|
371
|
-
function
|
|
389
|
+
function it({
|
|
372
390
|
data: r,
|
|
373
391
|
isLoading: s,
|
|
374
392
|
isError: i,
|
|
375
393
|
viewMode: t,
|
|
376
394
|
sortDirection: c,
|
|
377
395
|
sortedCell: a,
|
|
378
|
-
isEditPending:
|
|
396
|
+
isEditPending: o = !1,
|
|
379
397
|
isDeletePending: p = !1,
|
|
380
398
|
isRestorePending: l = !1,
|
|
381
399
|
isFiltered: x = !1,
|
|
382
400
|
totalCount: g,
|
|
383
|
-
onSortChange:
|
|
401
|
+
onSortChange: v,
|
|
384
402
|
onEdit: A,
|
|
385
403
|
onDelete: d,
|
|
386
|
-
onRestore:
|
|
404
|
+
onRestore: D
|
|
387
405
|
}) {
|
|
388
406
|
const L = /* @__PURE__ */ e(
|
|
389
|
-
|
|
407
|
+
Je,
|
|
390
408
|
{
|
|
391
409
|
isLoading: s,
|
|
392
410
|
isError: i,
|
|
@@ -396,42 +414,50 @@ function Je({
|
|
|
396
414
|
if (s || i)
|
|
397
415
|
return L;
|
|
398
416
|
if (!r || r.items.length === 0)
|
|
399
|
-
return /* @__PURE__ */ e(
|
|
400
|
-
const I =
|
|
401
|
-
return /* @__PURE__ */
|
|
402
|
-
|
|
417
|
+
return /* @__PURE__ */ e(Ze, { viewMode: t });
|
|
418
|
+
const I = tt(r.items, a, c), O = x && g !== void 0 ? `Showing ${r.items.length} of ${te(g, r.totalTokenUsage)}` : te(r.total, r.totalTokenUsage);
|
|
419
|
+
return /* @__PURE__ */ n(
|
|
420
|
+
Ye,
|
|
403
421
|
{
|
|
404
422
|
stickyHeader: !0,
|
|
405
423
|
stickyFooter: !0,
|
|
406
424
|
compact: !0,
|
|
407
425
|
mode: "alt-system",
|
|
408
|
-
|
|
426
|
+
blurEffect: "medium",
|
|
427
|
+
columns: [
|
|
428
|
+
"auto",
|
|
429
|
+
"minmax(10px, 1fr)",
|
|
430
|
+
"min-content",
|
|
431
|
+
"min-content",
|
|
432
|
+
".3fr"
|
|
433
|
+
],
|
|
409
434
|
wrapperClassName: w(
|
|
410
435
|
"max-h-[clamp(12rem,calc(100dvh-24rem),60dvh)]",
|
|
411
436
|
"sm:max-h-[clamp(12rem,calc(100dvh-24rem),60dvh)]"
|
|
412
437
|
),
|
|
413
438
|
children: [
|
|
414
439
|
/* @__PURE__ */ e(
|
|
415
|
-
|
|
440
|
+
et,
|
|
416
441
|
{
|
|
417
442
|
sortDirection: c,
|
|
418
443
|
sortedCell: a,
|
|
419
444
|
viewMode: t,
|
|
420
|
-
onSortChange:
|
|
445
|
+
onSortChange: v,
|
|
446
|
+
caption: t === "active" ? O : void 0
|
|
421
447
|
}
|
|
422
448
|
),
|
|
423
|
-
/* @__PURE__ */ e(
|
|
424
|
-
|
|
449
|
+
/* @__PURE__ */ e(Ke, { children: I.map((h, T) => /* @__PURE__ */ e(
|
|
450
|
+
rt,
|
|
425
451
|
{
|
|
426
452
|
memory: h,
|
|
427
|
-
index:
|
|
453
|
+
index: T,
|
|
428
454
|
viewMode: t,
|
|
429
|
-
isEditPending:
|
|
455
|
+
isEditPending: o,
|
|
430
456
|
isDeletePending: p,
|
|
431
457
|
isRestorePending: l,
|
|
432
458
|
onEdit: A,
|
|
433
459
|
onDelete: d,
|
|
434
|
-
onRestore:
|
|
460
|
+
onRestore: D
|
|
435
461
|
},
|
|
436
462
|
h.memoryId
|
|
437
463
|
)) })
|
|
@@ -439,74 +465,70 @@ function Je({
|
|
|
439
465
|
}
|
|
440
466
|
);
|
|
441
467
|
}
|
|
442
|
-
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
447
|
-
const t = M(null), c = M(null), { getAccessToken: a } = Ae(), [n, p] = f(""), [l, x] = f("active"), [g, b] = Q({
|
|
448
|
-
key: X + Te,
|
|
449
|
-
initialValue: C.DESC
|
|
468
|
+
const pt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
469
|
+
const t = S(null), c = S(null), { getAccessToken: a } = De(), [o, p] = f(""), [l, x] = f("active"), [g, v] = Q({
|
|
470
|
+
key: Y + Se,
|
|
471
|
+
initialValue: N.DESC
|
|
450
472
|
}), [A, d] = Q({
|
|
451
|
-
key:
|
|
473
|
+
key: Y + we,
|
|
452
474
|
initialValue: "createdAt"
|
|
453
|
-
}), [
|
|
454
|
-
g ||
|
|
475
|
+
}), [D, L] = f(
|
|
476
|
+
g || N.DESC
|
|
455
477
|
), [I, O] = f(
|
|
456
478
|
A || "createdAt"
|
|
457
|
-
), { data: h, isLoading:
|
|
479
|
+
), { data: h, isLoading: T, isError: se } = Te({
|
|
458
480
|
user: i,
|
|
459
481
|
getAccessToken: a,
|
|
460
482
|
enabled: r && l === "active"
|
|
461
483
|
}), {
|
|
462
|
-
data:
|
|
463
|
-
isLoading:
|
|
464
|
-
isError:
|
|
465
|
-
} =
|
|
484
|
+
data: b,
|
|
485
|
+
isLoading: le,
|
|
486
|
+
isError: ae
|
|
487
|
+
} = Ee({
|
|
466
488
|
user: i,
|
|
467
489
|
getAccessToken: a,
|
|
468
490
|
enabled: r && l === "expired"
|
|
469
|
-
}),
|
|
491
|
+
}), z = J(() => {
|
|
470
492
|
if (!h)
|
|
471
493
|
return;
|
|
472
|
-
const m =
|
|
494
|
+
const m = re(h.items, o);
|
|
473
495
|
return {
|
|
474
496
|
...h,
|
|
475
497
|
items: m,
|
|
476
498
|
filteredTotal: m.length
|
|
477
499
|
};
|
|
478
|
-
}, [h,
|
|
479
|
-
if (!
|
|
500
|
+
}, [h, o]), q = J(() => {
|
|
501
|
+
if (!b)
|
|
480
502
|
return;
|
|
481
|
-
const m =
|
|
482
|
-
|
|
483
|
-
|
|
503
|
+
const m = re(
|
|
504
|
+
b.items,
|
|
505
|
+
o
|
|
484
506
|
);
|
|
485
507
|
return {
|
|
486
|
-
...
|
|
508
|
+
...b,
|
|
487
509
|
items: m,
|
|
488
510
|
filteredTotal: m.length
|
|
489
511
|
};
|
|
490
|
-
}, [
|
|
491
|
-
|
|
512
|
+
}, [b, o]), ce = je(
|
|
513
|
+
ze((m) => {
|
|
492
514
|
p(m.target.value.trim());
|
|
493
515
|
}, 300),
|
|
494
516
|
[]
|
|
495
|
-
),
|
|
517
|
+
), de = () => {
|
|
496
518
|
p(""), c.current && (c.current.value = "", c.current.focus());
|
|
497
|
-
},
|
|
519
|
+
}, $ = Me({ getAccessToken: a }), j = ke({ getAccessToken: a }), U = Re({ getAccessToken: a }), B = Le({ getAccessToken: a }), V = Ie({ getAccessToken: a }), [me, H] = f(!1), C = S(null), [ue, W] = f(!1), [xe, P] = f(!1), u = S(null), pe = (m) => {
|
|
498
520
|
O(m), d(m), L((_) => {
|
|
499
|
-
const
|
|
500
|
-
return
|
|
521
|
+
const X = _ === N.ASC ? N.DESC : N.ASC;
|
|
522
|
+
return v(X), X;
|
|
501
523
|
});
|
|
502
|
-
},
|
|
503
|
-
|
|
504
|
-
},
|
|
505
|
-
|
|
506
|
-
},
|
|
507
|
-
u.current = m,
|
|
508
|
-
},
|
|
509
|
-
u.current && i &&
|
|
524
|
+
}, he = (m) => {
|
|
525
|
+
C.current = m, H(!0);
|
|
526
|
+
}, fe = () => {
|
|
527
|
+
C.current && i && $.mutate({ user: i, memoryId: C.current.memoryId });
|
|
528
|
+
}, ge = (m) => {
|
|
529
|
+
u.current = m, P(!0);
|
|
530
|
+
}, ye = (m, _) => {
|
|
531
|
+
u.current && i && B.mutate(
|
|
510
532
|
{
|
|
511
533
|
user: i,
|
|
512
534
|
memoryId: u.current.memoryId,
|
|
@@ -515,23 +537,23 @@ const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
515
537
|
},
|
|
516
538
|
{
|
|
517
539
|
onSuccess: () => {
|
|
518
|
-
|
|
540
|
+
P(!1);
|
|
519
541
|
}
|
|
520
542
|
}
|
|
521
543
|
);
|
|
522
|
-
},
|
|
523
|
-
i &&
|
|
524
|
-
},
|
|
525
|
-
i &&
|
|
526
|
-
},
|
|
527
|
-
i && (l === "active" ?
|
|
528
|
-
},
|
|
529
|
-
return /* @__PURE__ */
|
|
544
|
+
}, ve = (m) => {
|
|
545
|
+
i && V.mutate({ user: i, memoryId: m });
|
|
546
|
+
}, Ce = () => {
|
|
547
|
+
i && W(!0);
|
|
548
|
+
}, Ne = () => {
|
|
549
|
+
i && (l === "active" ? j.mutate({ user: i }) : U.mutate({ user: i }));
|
|
550
|
+
}, be = l === "active" ? h : b, Ae = (l === "active" ? j.isPending : U.isPending) || (be?.total ?? 0) === 0;
|
|
551
|
+
return /* @__PURE__ */ n(E, { children: [
|
|
530
552
|
/* @__PURE__ */ e(
|
|
531
|
-
|
|
553
|
+
Qe,
|
|
532
554
|
{
|
|
533
|
-
open:
|
|
534
|
-
onOpenChange:
|
|
555
|
+
open: xe,
|
|
556
|
+
onOpenChange: P,
|
|
535
557
|
initialText: u.current?.description || "",
|
|
536
558
|
metadata: u.current ? {
|
|
537
559
|
categories: u.current.categories,
|
|
@@ -543,16 +565,16 @@ const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
543
565
|
expiration: u.current.expiration,
|
|
544
566
|
expiresAt: u.current.expiresAt
|
|
545
567
|
} : void 0,
|
|
546
|
-
onSave:
|
|
547
|
-
isSaving:
|
|
568
|
+
onSave: ye,
|
|
569
|
+
isSaving: B.isPending
|
|
548
570
|
}
|
|
549
571
|
),
|
|
550
|
-
/* @__PURE__ */
|
|
551
|
-
|
|
572
|
+
/* @__PURE__ */ n(
|
|
573
|
+
K,
|
|
552
574
|
{
|
|
553
|
-
showConfirmation:
|
|
554
|
-
setShowConfirmation:
|
|
555
|
-
action:
|
|
575
|
+
showConfirmation: me,
|
|
576
|
+
setShowConfirmation: H,
|
|
577
|
+
action: fe,
|
|
556
578
|
customStrings: {
|
|
557
579
|
title: "Delete memory",
|
|
558
580
|
confirmAction: "Delete",
|
|
@@ -560,37 +582,37 @@ const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
560
582
|
},
|
|
561
583
|
children: [
|
|
562
584
|
/* @__PURE__ */ e("p", { className: "m-0", children: "Are you sure you want to delete this memory?" }),
|
|
563
|
-
/* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ n("ul", { className: "m-0 mt-2 list-disc list-inside text-xs opacity-80", children: [
|
|
586
|
+
/* @__PURE__ */ n("li", { children: [
|
|
565
587
|
"Excerpt:",
|
|
566
588
|
" ",
|
|
567
|
-
(
|
|
589
|
+
(C.current?.description || C.current?.text || "").slice(0, 80)
|
|
568
590
|
] }),
|
|
569
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ n("li", { children: [
|
|
570
592
|
"Created:",
|
|
571
593
|
" ",
|
|
572
|
-
|
|
594
|
+
C.current?.createdAt ? new Date(C.current.createdAt).toLocaleString() : "-"
|
|
573
595
|
] })
|
|
574
596
|
] })
|
|
575
597
|
]
|
|
576
598
|
}
|
|
577
599
|
),
|
|
578
600
|
/* @__PURE__ */ e(
|
|
579
|
-
|
|
601
|
+
K,
|
|
580
602
|
{
|
|
581
|
-
showConfirmation:
|
|
582
|
-
setShowConfirmation:
|
|
583
|
-
action:
|
|
603
|
+
showConfirmation: ue,
|
|
604
|
+
setShowConfirmation: W,
|
|
605
|
+
action: Ne,
|
|
584
606
|
customStrings: {
|
|
585
607
|
title: "Delete memories",
|
|
586
608
|
confirmAction: "Delete all",
|
|
587
609
|
cancelAction: "Cancel"
|
|
588
610
|
},
|
|
589
|
-
children: /* @__PURE__ */ e("p", { className: "m-0", children: l === "active" ? /* @__PURE__ */
|
|
611
|
+
children: /* @__PURE__ */ e("p", { className: "m-0", children: l === "active" ? /* @__PURE__ */ n(E, { children: [
|
|
590
612
|
"This will permanently delete all ",
|
|
591
613
|
/* @__PURE__ */ e("em", { children: "active memories" }),
|
|
592
614
|
" for this user. This action cannot be undone."
|
|
593
|
-
] }) : /* @__PURE__ */
|
|
615
|
+
] }) : /* @__PURE__ */ n(E, { children: [
|
|
594
616
|
"This will permanently delete all ",
|
|
595
617
|
/* @__PURE__ */ e("em", { children: "expired memories" }),
|
|
596
618
|
" for this user. This action cannot be undone."
|
|
@@ -598,7 +620,7 @@ const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
598
620
|
}
|
|
599
621
|
),
|
|
600
622
|
/* @__PURE__ */ e(
|
|
601
|
-
|
|
623
|
+
ie,
|
|
602
624
|
{
|
|
603
625
|
open: r,
|
|
604
626
|
onOpenChange: (m) => s(m),
|
|
@@ -608,9 +630,9 @@ const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
608
630
|
blurEffect: "large",
|
|
609
631
|
initialFocus: t,
|
|
610
632
|
className: "h-full sm:h-max",
|
|
611
|
-
footer: /* @__PURE__ */
|
|
633
|
+
footer: /* @__PURE__ */ n("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
612
634
|
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
613
|
-
|
|
635
|
+
oe,
|
|
614
636
|
{
|
|
615
637
|
onOpenChange: s,
|
|
616
638
|
label: "Close",
|
|
@@ -623,18 +645,18 @@ const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
623
645
|
mode: "dark",
|
|
624
646
|
focusMode: "light",
|
|
625
647
|
variant: "danger",
|
|
626
|
-
disabled:
|
|
627
|
-
onClick:
|
|
648
|
+
disabled: Ae,
|
|
649
|
+
onClick: Ce,
|
|
628
650
|
children: "Delete All"
|
|
629
651
|
}
|
|
630
652
|
) })
|
|
631
653
|
] }),
|
|
632
|
-
children: /* @__PURE__ */
|
|
654
|
+
children: /* @__PURE__ */ n("div", { className: "flex h-full flex-col gap-4", children: [
|
|
633
655
|
/* @__PURE__ */ e(
|
|
634
|
-
|
|
656
|
+
Fe,
|
|
635
657
|
{
|
|
636
|
-
header:
|
|
637
|
-
toggles: /* @__PURE__ */
|
|
658
|
+
header: T && o ? "Loading..." : o ? "Filters applied" : "Filters",
|
|
659
|
+
toggles: /* @__PURE__ */ n(E, { children: [
|
|
638
660
|
/* @__PURE__ */ e(
|
|
639
661
|
R,
|
|
640
662
|
{
|
|
@@ -659,30 +681,36 @@ const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
659
681
|
)
|
|
660
682
|
] }),
|
|
661
683
|
inputSearchRef: c,
|
|
662
|
-
onSearchChange:
|
|
663
|
-
onResetSearch:
|
|
664
|
-
defaultValue:
|
|
665
|
-
resetDisabled:
|
|
684
|
+
onSearchChange: ce,
|
|
685
|
+
onResetSearch: de,
|
|
686
|
+
defaultValue: o,
|
|
687
|
+
resetDisabled: o === ""
|
|
666
688
|
}
|
|
667
689
|
),
|
|
668
690
|
/* @__PURE__ */ e(
|
|
669
|
-
|
|
691
|
+
Ge,
|
|
670
692
|
{
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
693
|
+
dependency: l === "active" ? z?.items?.length ?? 0 : q?.items?.length ?? 0,
|
|
694
|
+
children: /* @__PURE__ */ e(
|
|
695
|
+
it,
|
|
696
|
+
{
|
|
697
|
+
data: l === "active" ? z : q,
|
|
698
|
+
isLoading: l === "active" ? T : le,
|
|
699
|
+
isError: l === "active" ? se : ae,
|
|
700
|
+
viewMode: l,
|
|
701
|
+
sortDirection: D,
|
|
702
|
+
sortedCell: I,
|
|
703
|
+
isEditPending: B.isPending,
|
|
704
|
+
isDeletePending: $.isPending,
|
|
705
|
+
isRestorePending: V.isPending,
|
|
706
|
+
isFiltered: o !== "",
|
|
707
|
+
totalCount: l === "active" ? h?.total : b?.total,
|
|
708
|
+
onSortChange: pe,
|
|
709
|
+
onEdit: l === "active" ? ge : void 0,
|
|
710
|
+
onDelete: he,
|
|
711
|
+
onRestore: l === "expired" ? ve : void 0
|
|
712
|
+
}
|
|
713
|
+
)
|
|
686
714
|
}
|
|
687
715
|
)
|
|
688
716
|
] })
|
|
@@ -691,5 +719,5 @@ const dt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
691
719
|
] });
|
|
692
720
|
};
|
|
693
721
|
export {
|
|
694
|
-
|
|
722
|
+
pt as default
|
|
695
723
|
};
|