@versini/sassysaint 8.123.0 → 8.124.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.2b4KllZd.js → AboutChangelog.Cx_wPJ7Z.js} +2 -2
- package/dist/chunks/AboutEntry.DmNrMr5s.js +75 -0
- package/dist/chunks/{App.B_LD-vR0.js → App.BzXfTo0l.js} +2991 -2961
- package/dist/chunks/{BubbleActions.DTbMzW7Z.js → BubbleActions.Ce6tfTUh.js} +3 -3
- package/dist/chunks/{ButtonIconDelete.Bz-eNl50.js → ButtonIconDelete.jHkJLbpb.js} +4 -4
- package/dist/chunks/{Chart.CsUQ6BC_.js → Chart._j38jx2j.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.9yXdO78H.js → ChatBubbleAssistant.CkQRnSQt.js} +5 -5
- package/dist/chunks/{ChatBubbleUser.Zx32Vast.js → ChatBubbleUser.DMJbYD3z.js} +4 -4
- package/dist/chunks/GenericPanel.DmIVt33k.js +26 -0
- package/dist/chunks/{HistoryEntry.BrWVv3Ht.js → HistoryEntry.Cq6AUyXj.js} +89 -92
- package/dist/chunks/{LoginEntry.DEGPxs5r.js → LoginEntry.X1jBcMKD.js} +4 -4
- package/dist/chunks/{LogoEntry.B_z9Z3M8.js → LogoEntry.C2Nrhfij.js} +1 -1
- package/dist/chunks/{MemoriesEntry.DK3ujPS1.js → MemoriesEntry.BljMJwoe.js} +104 -107
- package/dist/chunks/{ProfileEntry.AocAbsku.js → ProfileEntry.vB7iyiQe.js} +62 -64
- package/dist/chunks/{SettingsEntry.CwfjIKPJ.js → SettingsEntry.WDa-6Ahy.js} +74 -76
- package/dist/chunks/{UsageEntry.uZCmdgqM.js → UsageEntry.CAtBTMVV.js} +68 -70
- package/dist/chunks/{_baseUniq.C8HdfQH2.js → _baseUniq.BzsifY_A.js} +1 -1
- package/dist/chunks/{arc.Ra7O3rum.js → arc.B3lKcxnQ.js} +1 -1
- package/dist/chunks/{architecture-U656AL7Q.BB18gzA_.js → architecture-U656AL7Q.BFw7ZYGi.js} +1 -1
- package/dist/chunks/{architectureDiagram-VXUJARFQ.DPcCGn6O.js → architectureDiagram-VXUJARFQ.DW4_F9jT.js} +4 -4
- package/dist/chunks/{blockDiagram-VD42YOAC.BY6WNivV.js → blockDiagram-VD42YOAC.99a2hvnj.js} +5 -5
- package/dist/chunks/{browser.5cmTf-no.js → browser.CqPCGHhZ.js} +1 -1
- package/dist/chunks/{c4Diagram-YG6GDRKO.BV46OiQA.js → c4Diagram-YG6GDRKO.myMIBFPP.js} +2 -2
- package/dist/chunks/{channel.DQic9pyC.js → channel.Dkod3nLl.js} +1 -1
- package/dist/chunks/{chunk-4BX2VUAB.C_06byXU.js → chunk-4BX2VUAB.C0KRn8vY.js} +1 -1
- package/dist/chunks/{chunk-55IACEB6.CCuxDebN.js → chunk-55IACEB6.Dw_54Cwl.js} +1 -1
- package/dist/chunks/{chunk-B4BG7PRW.BXh24WoS.js → chunk-B4BG7PRW.CQQl7odk.js} +4 -4
- package/dist/chunks/{chunk-DI55MBZ5.BFSADeqI.js → chunk-DI55MBZ5.DtwHmQbD.js} +3 -3
- package/dist/chunks/{chunk-FMBD7UC4.yQCTEezB.js → chunk-FMBD7UC4.Dw-3jbfc.js} +1 -1
- package/dist/chunks/{chunk-QN33PNHL.c7v3jei8.js → chunk-QN33PNHL.DRzByK1N.js} +1 -1
- package/dist/chunks/{chunk-QZHKN3VN.D5Goy_jc.js → chunk-QZHKN3VN.CCoztZwn.js} +1 -1
- package/dist/chunks/{chunk-TZMSLE5B.Db1SY_yc.js → chunk-TZMSLE5B.DUj8ncNV.js} +1 -1
- package/dist/chunks/{classDiagram-2ON5EDUG.CWCjlp4V.js → classDiagram-2ON5EDUG.cwLdwiQY.js} +2 -2
- package/dist/chunks/{classDiagram-v2-WZHVMYZB.CWCjlp4V.js → classDiagram-v2-WZHVMYZB.cwLdwiQY.js} +2 -2
- package/dist/chunks/{clone.DSp7aupr.js → clone.DlO4Hr4-.js} +1 -1
- package/dist/chunks/{cose-bilkent-S5V4N54A.D7q6FQwl.js → cose-bilkent-S5V4N54A.B_u1DhXJ.js} +2 -2
- package/dist/chunks/{dagre-6UL2VRFP.DpMx3i6h.js → dagre-6UL2VRFP.TBSnBVmF.js} +5 -5
- package/dist/chunks/{diagram-PSM6KHXK.M6UyMSHA.js → diagram-PSM6KHXK.DLpLnaMT.js} +4 -4
- package/dist/chunks/{diagram-QEK2KX5R.VE43YUIc.js → diagram-QEK2KX5R.iJhCSncs.js} +3 -3
- package/dist/chunks/{diagram-S2PKOQOG.zDWy68f2.js → diagram-S2PKOQOG.DzTERqf6.js} +3 -3
- package/dist/chunks/{erDiagram-Q2GNP2WA.-jbdKq4R.js → erDiagram-Q2GNP2WA.CWynsTWD.js} +4 -4
- package/dist/chunks/{flowDiagram-NV44I4VS.CGg4MUOQ.js → flowDiagram-NV44I4VS.CUp4f8Ee.js} +5 -5
- package/dist/chunks/{ganttDiagram-JELNMOA3.DmhJyzDl.js → ganttDiagram-JELNMOA3.BwMInK9h.js} +2 -2
- package/dist/chunks/{gitGraph-F6HP7TQM.1wv59Q1r.js → gitGraph-F6HP7TQM.DBVb1BdV.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-NY62KEGX.YLGGNdEP.js → gitGraphDiagram-NY62KEGX.j-nQ2JMn.js} +4 -4
- package/dist/chunks/{graph.BYoh5-LR.js → graph.BYpjTE9p.js} +2 -2
- package/dist/chunks/{index.CKdtlPDt.js → index.7rI3Zh6S.js} +3 -3
- package/dist/chunks/{index.D9YGZJvd.js → index.BFB2eeJO.js} +1 -1
- package/dist/chunks/{index.BBQ9YA1A.js → index.C09rfIPz.js} +1 -1
- package/dist/chunks/{index.CWjP4XNc.js → index.C6m5EDTb.js} +3 -3
- package/dist/chunks/{index.CgzUcaZl.js → index.CRokoEy5.js} +1 -1
- package/dist/chunks/{index.CzU9anvi.js → index.CSlM5RvZ.js} +1 -1
- package/dist/chunks/{index.BqpPP_Qo.js → index.Cm_5g9xp.js} +2 -2
- package/dist/chunks/{index.BdkrSQGX.js → index.DGtZMa5X.js} +1 -1
- package/dist/chunks/{index.SlB0lWhv.js → index.DsvBmOFD.js} +1 -1
- package/dist/chunks/{index.CPvhzPtL.js → index.TAyzxG2x.js} +1 -1
- package/dist/chunks/{info-NVLQJR56.DI1hYUZz.js → info-NVLQJR56.BgH6c6De.js} +1 -1
- package/dist/chunks/{infoDiagram-WHAUD3N6.BNOSPFJn.js → infoDiagram-WHAUD3N6.BZPdtfIu.js} +2 -2
- package/dist/chunks/{journeyDiagram-XKPGCS4Q.D8dj4q37.js → journeyDiagram-XKPGCS4Q.D315Q2BL.js} +4 -4
- package/dist/chunks/{kanban-definition-3W4ZIXB7.BmNqB2-l.js → kanban-definition-3W4ZIXB7.BCjgsWf5.js} +2 -2
- package/dist/chunks/{layout.mMx6y2Pz.js → layout.9eeN3x8q.js} +4 -4
- package/dist/chunks/{mermaid-parser.core.oqKnYEL4.js → mermaid-parser.core.CoF1zxxn.js} +10 -10
- package/dist/chunks/{min.3TgVSBMD.js → min.Db-v_EbW.js} +2 -2
- package/dist/chunks/{mindmap-definition-VGOIOE7T.B5qssEA-.js → mindmap-definition-VGOIOE7T.Gn_j5hFa.js} +3 -3
- package/dist/chunks/{packet-BFZMPI3H.CrC8NvWk.js → packet-BFZMPI3H.C7CPhtVD.js} +1 -1
- package/dist/chunks/{pie-7BOR55EZ.DHbl4pxc.js → pie-7BOR55EZ.DPOlEPeF.js} +1 -1
- package/dist/chunks/{pieDiagram-ADFJNKIX.CYOcE02w.js → pieDiagram-ADFJNKIX.H9WpXELq.js} +4 -4
- package/dist/chunks/{quadrantDiagram-AYHSOK5B.B7jLhGq_.js → quadrantDiagram-AYHSOK5B.CRrm72Te.js} +1 -1
- package/dist/chunks/{radar-NHE76QYJ.DVGleN7L.js → radar-NHE76QYJ.BTlYEVpC.js} +1 -1
- package/dist/chunks/{rehype-mermaid.Dpx1ScMs.js → rehype-mermaid.Ho-bmgDt.js} +33 -33
- package/dist/chunks/{requirementDiagram-UZGBJVZJ.cquXzCW7.js → requirementDiagram-UZGBJVZJ.CoxuILcQ.js} +3 -3
- package/dist/chunks/{sankeyDiagram-TZEHDZUN.CKKwZCSA.js → sankeyDiagram-TZEHDZUN.CQ35FCEw.js} +1 -1
- package/dist/chunks/{sequenceDiagram-WL72ISMW.0x1WkjsU.js → sequenceDiagram-WL72ISMW.Dimfha52.js} +3 -3
- package/dist/chunks/{stateDiagram-FKZM4ZOC.CTYt5iL3.js → stateDiagram-FKZM4ZOC.DHY9BdZ2.js} +4 -4
- package/dist/chunks/{stateDiagram-v2-4FDKWEC3.C0y3zYNK.js → stateDiagram-v2-4FDKWEC3.BIeOiDVI.js} +2 -2
- package/dist/chunks/{timeline-definition-IT6M3QCI.dbaugo2t.js → timeline-definition-IT6M3QCI.rQIKlqdA.js} +2 -2
- package/dist/chunks/{treemap-KMMF4GRG.DHyW_wIs.js → treemap-KMMF4GRG.DDkoXxdM.js} +1 -1
- package/dist/chunks/{useMarkdown.DTcNqkyN.js → useMarkdown.DZkkRI9v.js} +8 -8
- package/dist/chunks/{xychartDiagram-PRI3JC2R.DvTp-PjK.js → xychartDiagram-PRI3JC2R.Jw3wJAbf.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 +3 -3
- package/dist/chunks/AboutEntry.BYQKcrCI.js +0 -77
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx as e, jsxs as o, Fragment as
|
|
2
|
-
import { n as
|
|
3
|
-
import { Button as R, CellWrapper as
|
|
4
|
-
import { DataGridContext as Q, useColumnMeasurement as
|
|
5
|
-
import { Panel as
|
|
6
|
-
import { useState as f, useEffect as We, useContext as Xe, useRef as
|
|
7
|
-
import { TextArea as He } from "./index.
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { n as Ae, LOCAL_STORAGE_PREFIX as H, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as De, LOCAL_STORAGE_SORT_MEMORY_COLUMN as Se, useUserMemories as we, useExpiredMemories as Te, useDeleteMemory as Ee, useDeleteAllActiveMemories as Me, useDeleteAllExpiredMemories as ke, useUpdateMemory as Re, useRestoreMemory as Le } from "./index.Cm_5g9xp.js";
|
|
3
|
+
import { Button as R, CellWrapper as Ie, SortDirections as b, ButtonIcon as G, IconEdit as Pe, IconRestore as Oe, IconDelete as Be } from "./LogoEntry.C2Nrhfij.js";
|
|
4
|
+
import { DataGridContext as Q, useColumnMeasurement as _e, getBodyClass as Ge, DataGridHeader as Fe, DataGridRow as ie, DataGridCell as y, DataGridCellSort as K, ButtonIconDelete as ze, DataGrid as qe, InlineFilter as $e, AnimatedWrapper as je } from "./ButtonIconDelete.jHkJLbpb.js";
|
|
5
|
+
import { Panel as Ue, Toggle as E, ButtonCancel as ne, ResponsiveTooltip as F, useLocalStorage as J, debounce as Ve, ConfirmationPanel as Z } from "./App.BzXfTo0l.js";
|
|
6
|
+
import { useState as f, useEffect as We, useContext as Xe, useRef as w, useMemo as ee, useCallback as Ye } from "react";
|
|
7
|
+
import { TextArea as He } from "./index.DsvBmOFD.js";
|
|
8
|
+
import { GenericPanel as Qe } from "./GenericPanel.DmIVt33k.js";
|
|
8
9
|
import M from "clsx";
|
|
9
|
-
const
|
|
10
|
+
const Ke = ({
|
|
10
11
|
open: r,
|
|
11
12
|
onOpenChange: s,
|
|
12
13
|
initialText: i,
|
|
@@ -29,7 +30,7 @@ const Qe = ({
|
|
|
29
30
|
}
|
|
30
31
|
}, v = n.trim().length >= 3, A = n.trim() !== i.trim() || l !== (t?.expiration || "none");
|
|
31
32
|
return /* @__PURE__ */ e(
|
|
32
|
-
|
|
33
|
+
Ue,
|
|
33
34
|
{
|
|
34
35
|
open: r,
|
|
35
36
|
onOpenChange: s,
|
|
@@ -37,7 +38,7 @@ const Qe = ({
|
|
|
37
38
|
animation: !0,
|
|
38
39
|
animationType: "fade",
|
|
39
40
|
footer: /* @__PURE__ */ o("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
40
|
-
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
41
|
+
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(ne, { onOpenChange: s, label: "Cancel" }) }),
|
|
41
42
|
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
42
43
|
R,
|
|
43
44
|
{
|
|
@@ -180,14 +181,14 @@ const Qe = ({
|
|
|
180
181
|
}
|
|
181
182
|
);
|
|
182
183
|
};
|
|
183
|
-
const
|
|
184
|
-
const t = Xe(Q), c =
|
|
185
|
-
|
|
184
|
+
const Je = ({ className: r, children: s, ...i }) => {
|
|
185
|
+
const t = Xe(Q), c = w(null);
|
|
186
|
+
_e(c, s);
|
|
186
187
|
const a = Ge(r);
|
|
187
188
|
return /* @__PURE__ */ e(Q.Provider, {
|
|
188
189
|
value: {
|
|
189
190
|
...t,
|
|
190
|
-
cellWrapper:
|
|
191
|
+
cellWrapper: Ie.BODY
|
|
191
192
|
},
|
|
192
193
|
children: /* @__PURE__ */ e("div", {
|
|
193
194
|
ref: c,
|
|
@@ -198,7 +199,7 @@ const Ke = ({ className: r, children: s, ...i }) => {
|
|
|
198
199
|
})
|
|
199
200
|
});
|
|
200
201
|
};
|
|
201
|
-
function
|
|
202
|
+
function Ze({
|
|
202
203
|
isLoading: r,
|
|
203
204
|
isError: s,
|
|
204
205
|
viewMode: i
|
|
@@ -214,10 +215,10 @@ function Je({
|
|
|
214
215
|
"."
|
|
215
216
|
] }) : null;
|
|
216
217
|
}
|
|
217
|
-
function
|
|
218
|
+
function et({ viewMode: r }) {
|
|
218
219
|
return /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: r === "expired" ? "No expired memories." : "No memories stored." });
|
|
219
220
|
}
|
|
220
|
-
const
|
|
221
|
+
const tt = ({
|
|
221
222
|
sortDirection: r,
|
|
222
223
|
sortedCell: s,
|
|
223
224
|
viewMode: i,
|
|
@@ -227,7 +228,7 @@ const et = ({
|
|
|
227
228
|
const a = (n) => {
|
|
228
229
|
t(n);
|
|
229
230
|
};
|
|
230
|
-
return /* @__PURE__ */ e(
|
|
231
|
+
return /* @__PURE__ */ e(Fe, { caption: c, children: /* @__PURE__ */ o(ie, { children: [
|
|
231
232
|
/* @__PURE__ */ e(y, { className: "invisible", children: "Row" }),
|
|
232
233
|
/* @__PURE__ */ e(y, { children: "Memory" }),
|
|
233
234
|
/* @__PURE__ */ e(
|
|
@@ -257,15 +258,15 @@ const et = ({
|
|
|
257
258
|
/* @__PURE__ */ e(y, { align: "right", children: "Actions" })
|
|
258
259
|
] }) });
|
|
259
260
|
};
|
|
260
|
-
function
|
|
261
|
+
function rt(r, s, i) {
|
|
261
262
|
return [...r].sort((t, c) => {
|
|
262
263
|
if (s === "createdAt") {
|
|
263
264
|
const a = t.createdAt ? new Date(t.createdAt).getTime() : 0, n = c.createdAt ? new Date(c.createdAt).getTime() : 0;
|
|
264
|
-
return i ===
|
|
265
|
+
return i === b.ASC ? a - n : n - a;
|
|
265
266
|
}
|
|
266
267
|
if (s === "expiresAt") {
|
|
267
268
|
const a = t.expiresAt ? new Date(t.expiresAt).getTime() : Number.MAX_SAFE_INTEGER, n = c.expiresAt ? new Date(c.expiresAt).getTime() : Number.MAX_SAFE_INTEGER;
|
|
268
|
-
return i ===
|
|
269
|
+
return i === b.ASC ? a - n : n - a;
|
|
269
270
|
}
|
|
270
271
|
return 0;
|
|
271
272
|
});
|
|
@@ -287,7 +288,7 @@ function re(r, s) {
|
|
|
287
288
|
return c.includes(i) || a.includes(i) || n.includes(i);
|
|
288
289
|
}) : r;
|
|
289
290
|
}
|
|
290
|
-
function
|
|
291
|
+
function it({
|
|
291
292
|
memory: r,
|
|
292
293
|
index: s,
|
|
293
294
|
viewMode: i,
|
|
@@ -313,13 +314,13 @@ function rt({
|
|
|
313
314
|
/* @__PURE__ */ e(y, { className: M(k.dateCompact), children: v }),
|
|
314
315
|
/* @__PURE__ */ e(y, { align: "right", borderLeft: !0, children: /* @__PURE__ */ o("div", { className: "flex flex-wrap justify-end gap-2", children: [
|
|
315
316
|
i === "active" && n && /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
316
|
-
|
|
317
|
+
F,
|
|
317
318
|
{
|
|
318
319
|
label: "Edit memory",
|
|
319
320
|
mode: "system",
|
|
320
321
|
placement: "top",
|
|
321
322
|
trigger: /* @__PURE__ */ e(
|
|
322
|
-
|
|
323
|
+
G,
|
|
323
324
|
{
|
|
324
325
|
focusMode: "system",
|
|
325
326
|
noBorder: !0,
|
|
@@ -333,13 +334,13 @@ function rt({
|
|
|
333
334
|
}
|
|
334
335
|
) }),
|
|
335
336
|
i === "expired" && l && /* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
336
|
-
|
|
337
|
+
F,
|
|
337
338
|
{
|
|
338
339
|
label: "Restore memory",
|
|
339
340
|
mode: "system",
|
|
340
341
|
placement: "top",
|
|
341
342
|
trigger: /* @__PURE__ */ e(
|
|
342
|
-
|
|
343
|
+
G,
|
|
343
344
|
{
|
|
344
345
|
focusMode: "system",
|
|
345
346
|
noBorder: !0,
|
|
@@ -347,26 +348,26 @@ function rt({
|
|
|
347
348
|
variant: "primary",
|
|
348
349
|
disabled: a,
|
|
349
350
|
onClick: () => l(r.memoryId),
|
|
350
|
-
children: /* @__PURE__ */ e(
|
|
351
|
+
children: /* @__PURE__ */ e(Oe, { size: "size-3", monotone: !0 })
|
|
351
352
|
}
|
|
352
353
|
)
|
|
353
354
|
}
|
|
354
355
|
) }),
|
|
355
356
|
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: i === "active" ? /* @__PURE__ */ e(
|
|
356
|
-
|
|
357
|
+
ze,
|
|
357
358
|
{
|
|
358
359
|
label: "Delete memory",
|
|
359
360
|
disabled: c,
|
|
360
361
|
onClick: () => p(r)
|
|
361
362
|
}
|
|
362
363
|
) : /* @__PURE__ */ e(
|
|
363
|
-
|
|
364
|
+
F,
|
|
364
365
|
{
|
|
365
366
|
label: "Delete memory",
|
|
366
367
|
mode: "system",
|
|
367
368
|
placement: "top",
|
|
368
369
|
trigger: /* @__PURE__ */ e(
|
|
369
|
-
|
|
370
|
+
G,
|
|
370
371
|
{
|
|
371
372
|
focusMode: "system",
|
|
372
373
|
noBorder: !0,
|
|
@@ -375,7 +376,7 @@ function rt({
|
|
|
375
376
|
iconClassName: "text-copy-error-dark dark:text-copy-error-light",
|
|
376
377
|
disabled: c,
|
|
377
378
|
onClick: () => p(r),
|
|
378
|
-
children: /* @__PURE__ */ e(
|
|
379
|
+
children: /* @__PURE__ */ e(Be, { size: "size-3", monotone: !0 })
|
|
379
380
|
}
|
|
380
381
|
)
|
|
381
382
|
}
|
|
@@ -383,7 +384,7 @@ function rt({
|
|
|
383
384
|
] }) })
|
|
384
385
|
] });
|
|
385
386
|
}
|
|
386
|
-
function
|
|
387
|
+
function nt({
|
|
387
388
|
data: r,
|
|
388
389
|
isLoading: s,
|
|
389
390
|
isError: i,
|
|
@@ -401,7 +402,7 @@ function it({
|
|
|
401
402
|
onRestore: D
|
|
402
403
|
}) {
|
|
403
404
|
const L = /* @__PURE__ */ e(
|
|
404
|
-
|
|
405
|
+
Ze,
|
|
405
406
|
{
|
|
406
407
|
isLoading: s,
|
|
407
408
|
isError: i,
|
|
@@ -411,10 +412,10 @@ function it({
|
|
|
411
412
|
if (s || i)
|
|
412
413
|
return L;
|
|
413
414
|
if (!r || r.items.length === 0)
|
|
414
|
-
return /* @__PURE__ */ e(
|
|
415
|
-
const I =
|
|
415
|
+
return /* @__PURE__ */ e(et, { viewMode: t });
|
|
416
|
+
const I = rt(r.items, a, c), P = x && g !== void 0 ? `Showing ${r.items.length} of ${te(g, r.totalTokenUsage)}` : te(r.total, r.totalTokenUsage);
|
|
416
417
|
return /* @__PURE__ */ o(
|
|
417
|
-
|
|
418
|
+
qe,
|
|
418
419
|
{
|
|
419
420
|
columns: [
|
|
420
421
|
"auto",
|
|
@@ -425,20 +426,20 @@ function it({
|
|
|
425
426
|
],
|
|
426
427
|
children: [
|
|
427
428
|
/* @__PURE__ */ e(
|
|
428
|
-
|
|
429
|
+
tt,
|
|
429
430
|
{
|
|
430
431
|
sortDirection: c,
|
|
431
432
|
sortedCell: a,
|
|
432
433
|
viewMode: t,
|
|
433
434
|
onSortChange: v,
|
|
434
|
-
caption: t === "active" ?
|
|
435
|
+
caption: t === "active" ? P : void 0
|
|
435
436
|
}
|
|
436
437
|
),
|
|
437
|
-
/* @__PURE__ */ e(
|
|
438
|
-
|
|
438
|
+
/* @__PURE__ */ e(Je, { children: I.map((h, T) => /* @__PURE__ */ e(
|
|
439
|
+
it,
|
|
439
440
|
{
|
|
440
441
|
memory: h,
|
|
441
|
-
index:
|
|
442
|
+
index: T,
|
|
442
443
|
viewMode: t,
|
|
443
444
|
isEditPending: n,
|
|
444
445
|
isDeletePending: p,
|
|
@@ -453,26 +454,26 @@ function it({
|
|
|
453
454
|
}
|
|
454
455
|
);
|
|
455
456
|
}
|
|
456
|
-
const
|
|
457
|
-
const t =
|
|
458
|
-
key: H +
|
|
459
|
-
initialValue:
|
|
457
|
+
const ht = ({ open: r, onOpenChange: s, user: i }) => {
|
|
458
|
+
const t = w(null), c = w(null), { getAccessToken: a } = Ae(), [n, p] = f(""), [l, x] = f("active"), [g, v] = J({
|
|
459
|
+
key: H + De,
|
|
460
|
+
initialValue: b.DESC
|
|
460
461
|
}), [A, d] = J({
|
|
461
|
-
key: H +
|
|
462
|
+
key: H + Se,
|
|
462
463
|
initialValue: "createdAt"
|
|
463
464
|
}), [D, L] = f(
|
|
464
|
-
g ||
|
|
465
|
-
), [I,
|
|
465
|
+
g || b.DESC
|
|
466
|
+
), [I, P] = f(
|
|
466
467
|
A || "createdAt"
|
|
467
|
-
), { data: h, isLoading:
|
|
468
|
+
), { data: h, isLoading: T, isError: oe } = we({
|
|
468
469
|
user: i,
|
|
469
470
|
getAccessToken: a,
|
|
470
471
|
enabled: r && l === "active"
|
|
471
472
|
}), {
|
|
472
|
-
data:
|
|
473
|
-
isLoading:
|
|
474
|
-
isError:
|
|
475
|
-
} =
|
|
473
|
+
data: N,
|
|
474
|
+
isLoading: se,
|
|
475
|
+
isError: le
|
|
476
|
+
} = Te({
|
|
476
477
|
user: i,
|
|
477
478
|
getAccessToken: a,
|
|
478
479
|
enabled: r && l === "expired"
|
|
@@ -486,37 +487,37 @@ const xt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
486
487
|
filteredTotal: m.length
|
|
487
488
|
};
|
|
488
489
|
}, [h, n]), q = ee(() => {
|
|
489
|
-
if (!
|
|
490
|
+
if (!N)
|
|
490
491
|
return;
|
|
491
492
|
const m = re(
|
|
492
|
-
|
|
493
|
+
N.items,
|
|
493
494
|
n
|
|
494
495
|
);
|
|
495
496
|
return {
|
|
496
|
-
...
|
|
497
|
+
...N,
|
|
497
498
|
items: m,
|
|
498
499
|
filteredTotal: m.length
|
|
499
500
|
};
|
|
500
|
-
}, [
|
|
501
|
+
}, [N, n]), ae = Ye(
|
|
501
502
|
Ve((m) => {
|
|
502
503
|
p(m.target.value.trim());
|
|
503
504
|
}, 300),
|
|
504
505
|
[]
|
|
505
|
-
),
|
|
506
|
+
), ce = () => {
|
|
506
507
|
p(""), c.current && (c.current.value = "", c.current.focus());
|
|
507
|
-
}, $ =
|
|
508
|
-
|
|
509
|
-
const Y = _ ===
|
|
508
|
+
}, $ = Ee({ getAccessToken: a }), j = Me({ getAccessToken: a }), U = ke({ getAccessToken: a }), O = Re({ getAccessToken: a }), V = Le({ getAccessToken: a }), [de, W] = f(!1), C = w(null), [me, X] = f(!1), [ue, B] = f(!1), u = w(null), xe = (m) => {
|
|
509
|
+
P(m), d(m), L((_) => {
|
|
510
|
+
const Y = _ === b.ASC ? b.DESC : b.ASC;
|
|
510
511
|
return v(Y), Y;
|
|
511
512
|
});
|
|
512
|
-
},
|
|
513
|
+
}, pe = (m) => {
|
|
513
514
|
C.current = m, W(!0);
|
|
514
|
-
},
|
|
515
|
+
}, he = () => {
|
|
515
516
|
C.current && i && $.mutate({ user: i, memoryId: C.current.memoryId });
|
|
516
|
-
},
|
|
517
|
+
}, fe = (m) => {
|
|
517
518
|
u.current = m, B(!0);
|
|
518
|
-
},
|
|
519
|
-
u.current && i &&
|
|
519
|
+
}, ge = (m, _) => {
|
|
520
|
+
u.current && i && O.mutate(
|
|
520
521
|
{
|
|
521
522
|
user: i,
|
|
522
523
|
memoryId: u.current.memoryId,
|
|
@@ -529,18 +530,18 @@ const xt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
529
530
|
}
|
|
530
531
|
}
|
|
531
532
|
);
|
|
532
|
-
},
|
|
533
|
+
}, ye = (m) => {
|
|
533
534
|
i && V.mutate({ user: i, memoryId: m });
|
|
534
|
-
},
|
|
535
|
+
}, ve = () => {
|
|
535
536
|
i && X(!0);
|
|
536
|
-
},
|
|
537
|
+
}, Ce = () => {
|
|
537
538
|
i && (l === "active" ? j.mutate({ user: i }) : U.mutate({ user: i }));
|
|
538
|
-
}, be = l === "active" ? h :
|
|
539
|
-
return /* @__PURE__ */ o(
|
|
539
|
+
}, be = l === "active" ? h : N, Ne = (l === "active" ? j.isPending : U.isPending) || (be?.total ?? 0) === 0;
|
|
540
|
+
return /* @__PURE__ */ o(S, { children: [
|
|
540
541
|
/* @__PURE__ */ e(
|
|
541
|
-
|
|
542
|
+
Ke,
|
|
542
543
|
{
|
|
543
|
-
open:
|
|
544
|
+
open: ue,
|
|
544
545
|
onOpenChange: B,
|
|
545
546
|
initialText: u.current?.description || "",
|
|
546
547
|
metadata: u.current ? {
|
|
@@ -553,16 +554,16 @@ const xt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
553
554
|
expiration: u.current.expiration,
|
|
554
555
|
expiresAt: u.current.expiresAt
|
|
555
556
|
} : void 0,
|
|
556
|
-
onSave:
|
|
557
|
-
isSaving:
|
|
557
|
+
onSave: ge,
|
|
558
|
+
isSaving: O.isPending
|
|
558
559
|
}
|
|
559
560
|
),
|
|
560
561
|
/* @__PURE__ */ o(
|
|
561
562
|
Z,
|
|
562
563
|
{
|
|
563
|
-
showConfirmation:
|
|
564
|
+
showConfirmation: de,
|
|
564
565
|
setShowConfirmation: W,
|
|
565
|
-
action:
|
|
566
|
+
action: he,
|
|
566
567
|
customStrings: {
|
|
567
568
|
title: "Delete memory",
|
|
568
569
|
confirmAction: "Delete",
|
|
@@ -588,19 +589,19 @@ const xt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
588
589
|
/* @__PURE__ */ e(
|
|
589
590
|
Z,
|
|
590
591
|
{
|
|
591
|
-
showConfirmation:
|
|
592
|
+
showConfirmation: me,
|
|
592
593
|
setShowConfirmation: X,
|
|
593
|
-
action:
|
|
594
|
+
action: Ce,
|
|
594
595
|
customStrings: {
|
|
595
596
|
title: "Delete memories",
|
|
596
597
|
confirmAction: "Delete all",
|
|
597
598
|
cancelAction: "Cancel"
|
|
598
599
|
},
|
|
599
|
-
children: /* @__PURE__ */ e("p", { className: "m-0", children: l === "active" ? /* @__PURE__ */ o(
|
|
600
|
+
children: /* @__PURE__ */ e("p", { className: "m-0", children: l === "active" ? /* @__PURE__ */ o(S, { children: [
|
|
600
601
|
"This will permanently delete all ",
|
|
601
602
|
/* @__PURE__ */ e("em", { children: "active memories" }),
|
|
602
603
|
" for this user. This action cannot be undone."
|
|
603
|
-
] }) : /* @__PURE__ */ o(
|
|
604
|
+
] }) : /* @__PURE__ */ o(S, { children: [
|
|
604
605
|
"This will permanently delete all ",
|
|
605
606
|
/* @__PURE__ */ e("em", { children: "expired memories" }),
|
|
606
607
|
" for this user. This action cannot be undone."
|
|
@@ -608,19 +609,15 @@ const xt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
608
609
|
}
|
|
609
610
|
),
|
|
610
611
|
/* @__PURE__ */ e(
|
|
611
|
-
|
|
612
|
+
Qe,
|
|
612
613
|
{
|
|
613
614
|
open: r,
|
|
614
|
-
onOpenChange:
|
|
615
|
+
onOpenChange: s,
|
|
615
616
|
title: "User Memories",
|
|
616
|
-
animation: !0,
|
|
617
|
-
animationType: "fade",
|
|
618
|
-
blurEffect: "large",
|
|
619
617
|
initialFocus: t,
|
|
620
|
-
|
|
621
|
-
footer: /* @__PURE__ */ o("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
|
|
618
|
+
footer: /* @__PURE__ */ o(S, { children: [
|
|
622
619
|
/* @__PURE__ */ e("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ e(
|
|
623
|
-
|
|
620
|
+
ne,
|
|
624
621
|
{
|
|
625
622
|
onOpenChange: s,
|
|
626
623
|
label: "Close",
|
|
@@ -633,18 +630,18 @@ const xt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
633
630
|
mode: "dark",
|
|
634
631
|
focusMode: "light",
|
|
635
632
|
variant: "danger",
|
|
636
|
-
disabled:
|
|
637
|
-
onClick:
|
|
633
|
+
disabled: Ne,
|
|
634
|
+
onClick: ve,
|
|
638
635
|
children: "Delete All"
|
|
639
636
|
}
|
|
640
637
|
) })
|
|
641
638
|
] }),
|
|
642
639
|
children: /* @__PURE__ */ o("div", { className: "flex h-full flex-col gap-4", children: [
|
|
643
640
|
/* @__PURE__ */ e(
|
|
644
|
-
|
|
641
|
+
$e,
|
|
645
642
|
{
|
|
646
|
-
header:
|
|
647
|
-
toggles: /* @__PURE__ */ o(
|
|
643
|
+
header: T && n ? "Loading..." : n ? "Filters applied" : "Filters",
|
|
644
|
+
toggles: /* @__PURE__ */ o(S, { children: [
|
|
648
645
|
/* @__PURE__ */ e(
|
|
649
646
|
R,
|
|
650
647
|
{
|
|
@@ -669,34 +666,34 @@ const xt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
669
666
|
)
|
|
670
667
|
] }),
|
|
671
668
|
inputSearchRef: c,
|
|
672
|
-
onSearchChange:
|
|
673
|
-
onResetSearch:
|
|
669
|
+
onSearchChange: ae,
|
|
670
|
+
onResetSearch: ce,
|
|
674
671
|
defaultValue: n,
|
|
675
672
|
resetDisabled: n === ""
|
|
676
673
|
}
|
|
677
674
|
),
|
|
678
675
|
/* @__PURE__ */ e(
|
|
679
|
-
|
|
676
|
+
je,
|
|
680
677
|
{
|
|
681
678
|
dependency: l === "active" ? z?.items?.length ?? 0 : q?.items?.length ?? 0,
|
|
682
679
|
children: /* @__PURE__ */ e(
|
|
683
|
-
|
|
680
|
+
nt,
|
|
684
681
|
{
|
|
685
682
|
data: l === "active" ? z : q,
|
|
686
|
-
isLoading: l === "active" ?
|
|
687
|
-
isError: l === "active" ?
|
|
683
|
+
isLoading: l === "active" ? T : se,
|
|
684
|
+
isError: l === "active" ? oe : le,
|
|
688
685
|
viewMode: l,
|
|
689
686
|
sortDirection: D,
|
|
690
687
|
sortedCell: I,
|
|
691
|
-
isEditPending:
|
|
688
|
+
isEditPending: O.isPending,
|
|
692
689
|
isDeletePending: $.isPending,
|
|
693
690
|
isRestorePending: V.isPending,
|
|
694
691
|
isFiltered: n !== "",
|
|
695
|
-
totalCount: l === "active" ? h?.total :
|
|
696
|
-
onSortChange:
|
|
697
|
-
onEdit: l === "active" ?
|
|
698
|
-
onDelete:
|
|
699
|
-
onRestore: l === "expired" ?
|
|
692
|
+
totalCount: l === "active" ? h?.total : N?.total,
|
|
693
|
+
onSortChange: xe,
|
|
694
|
+
onEdit: l === "active" ? fe : void 0,
|
|
695
|
+
onDelete: pe,
|
|
696
|
+
onRestore: l === "expired" ? ye : void 0
|
|
700
697
|
}
|
|
701
698
|
)
|
|
702
699
|
}
|
|
@@ -707,5 +704,5 @@ const xt = ({ open: r, onOpenChange: s, user: i }) => {
|
|
|
707
704
|
] });
|
|
708
705
|
};
|
|
709
706
|
export {
|
|
710
|
-
|
|
707
|
+
ht as default
|
|
711
708
|
};
|