@fluid-app/fluid-cli-theme-dev 0.1.433 → 0.1.435
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/dist-cli-preview/.vite/manifest.json +311 -314
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{Breadcrumb-D_SqXp7d.js → Breadcrumb-BKdVGms9.js} +1 -1
- package/dist/dist-cli-preview/chunks/{Combobox-Km3Vrphp.js → Combobox-CyU4gagO.js} +27 -27
- package/dist/dist-cli-preview/chunks/{ContactsScreen-kuRxflCD.js → ContactsScreen-nqNyMwxa.js} +370 -370
- package/dist/dist-cli-preview/chunks/MediaScreen-BGWqRFE4.js +8 -0
- package/dist/dist-cli-preview/chunks/{MemberManagementProviders-BS6VVAvZ.js → MemberManagementProviders-D8tSqPWo.js} +6 -6
- package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-DMuIxGxX.js → MemberShareablesScreen-nYcxHAnv.js} +1313 -1329
- package/dist/dist-cli-preview/chunks/MessagingScreen-DaCvmrAU.js +50551 -0
- package/dist/dist-cli-preview/chunks/MobileActionSheet-DaIBkwQD.js +3884 -0
- package/dist/dist-cli-preview/chunks/{MySiteScreen-Ch1cOkKp.js → MySiteScreen-BYY4CFhu.js} +15 -15
- package/dist/dist-cli-preview/chunks/OrdersScreen-DDdLpJ-7.js +9 -0
- package/dist/dist-cli-preview/chunks/{OrdersScreen-DFqHUrkC.js → OrdersScreen-DkZKc0Z_.js} +7 -7
- package/dist/dist-cli-preview/chunks/PlaylistsScreen-F04j44L-.js +8 -0
- package/dist/dist-cli-preview/chunks/{PortalTenantClientProvider-DWOzWTBJ.js → PortalTenantClientProvider-D6a79po2.js} +1 -1
- package/dist/dist-cli-preview/chunks/{ProfileScreen-C_gqCV47.js → ProfileScreen-BPw0o_kl.js} +222 -237
- package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DiXGHeoZ.js → SubscriptionsScreen-DuiI_9iF.js} +3 -3
- package/dist/dist-cli-preview/chunks/{account-screen-runtime-BjzMc3GU.js → account-screen-runtime-BYj9PrHT.js} +2326 -2358
- package/dist/dist-cli-preview/chunks/ar-1KIG4DjU.js +1032 -0
- package/dist/dist-cli-preview/chunks/{arrow-left-D62DJteK.js → arrow-left-DnjGVTam.js} +1 -1
- package/dist/dist-cli-preview/chunks/bg-yBy5d6ww.js +1032 -0
- package/dist/dist-cli-preview/chunks/bn-BDIXtBiu.js +1032 -0
- package/dist/dist-cli-preview/chunks/{cli-preview-c45YGC1E.js → cli-preview-C-nTMZQi.js} +10 -10
- package/dist/dist-cli-preview/chunks/{client.gen-DfWiOTes.js → client.gen-DO8I8bB0.js} +9 -9
- package/dist/dist-cli-preview/chunks/{copy-zqKnEIeM.js → copy-COLmacny.js} +1 -1
- package/dist/dist-cli-preview/chunks/{countries-api-adapter-DRty_8ei.js → countries-api-adapter-B2ub-v6x.js} +2 -2
- package/dist/dist-cli-preview/chunks/{create-card-entry-container-4VLe3B5O.js → create-card-entry-container-C7h1cYNe.js} +7380 -7374
- package/dist/dist-cli-preview/chunks/cs-eyeSjS66.js +1032 -0
- package/dist/dist-cli-preview/chunks/da-BMwLUsWZ.js +1032 -0
- package/dist/dist-cli-preview/chunks/de-CWgvDnNQ.js +1032 -0
- package/dist/dist-cli-preview/chunks/el-BhX-RBtB.js +1032 -0
- package/dist/dist-cli-preview/chunks/ellipsis-wdxlMcjt.js +15 -0
- package/dist/dist-cli-preview/chunks/es-fIpwOat4.js +1032 -0
- package/dist/dist-cli-preview/chunks/{eye-Ce93vUsx.js → eye-Cs-LW2s_.js} +1 -1
- package/dist/dist-cli-preview/chunks/fi-BI9n529u.js +1032 -0
- package/dist/dist-cli-preview/chunks/fr-DMDmmtDd.js +1032 -0
- package/dist/dist-cli-preview/chunks/he-BQxAPia2.js +1032 -0
- package/dist/dist-cli-preview/chunks/{hey-api-client-GUem9W6L.js → hey-api-client-C0XYGcOp.js} +1 -1
- package/dist/dist-cli-preview/chunks/hi--CH25zD0.js +1032 -0
- package/dist/dist-cli-preview/chunks/hr-vHPscpGv.js +1032 -0
- package/dist/dist-cli-preview/chunks/hu-BQTLt458.js +1032 -0
- package/dist/dist-cli-preview/chunks/id-R9lUJSOz.js +1032 -0
- package/dist/dist-cli-preview/chunks/{index-B_xDY7q5.js → index-C3BTHcpz.js} +249 -232
- package/dist/dist-cli-preview/chunks/{index-DotYg_8P.js → index-DSTWchdg.js} +2294 -2088
- package/dist/dist-cli-preview/chunks/index-qwhiPvOP.js +135 -0
- package/dist/dist-cli-preview/chunks/isAfter-CcghMy5x.js +1324 -0
- package/dist/dist-cli-preview/chunks/it-iN8sGAC0.js +1032 -0
- package/dist/dist-cli-preview/chunks/ja-BGIZaAW0.js +1032 -0
- package/dist/dist-cli-preview/chunks/ko-Cr6Wl_2I.js +1032 -0
- package/dist/dist-cli-preview/chunks/log-out-BIykSy7b.js +30 -0
- package/dist/dist-cli-preview/chunks/{map-pin-C_2_P4BZ.js → map-pin-Be34_dU6.js} +1 -1
- package/dist/dist-cli-preview/chunks/messaging-D7ENrup9.js +4 -0
- package/dist/dist-cli-preview/chunks/{mount-account-screen-DLu4WsoN.js → mount-account-screen-BfLjUsgR.js} +8 -8
- package/dist/dist-cli-preview/chunks/ms-CVPERbjz.js +1032 -0
- package/dist/dist-cli-preview/chunks/{navigate-account-screen-Zm16FA01.js → navigate-account-screen-CiKHtySl.js} +1 -1
- package/dist/dist-cli-preview/chunks/nl-38XjLPxf.js +1032 -0
- package/dist/dist-cli-preview/chunks/no-C9CyNben.js +1032 -0
- package/dist/dist-cli-preview/chunks/pause-BBpqu34U.js +41 -0
- package/dist/dist-cli-preview/chunks/pl-DmR9h5su.js +1032 -0
- package/dist/dist-cli-preview/chunks/pt-t-mbd11H.js +1032 -0
- package/dist/dist-cli-preview/chunks/ro-T2DyDJMM.js +1032 -0
- package/dist/dist-cli-preview/chunks/ru-DEgbQN8m.js +1032 -0
- package/dist/dist-cli-preview/chunks/{schemas-CcDaDYH8.js → schemas-EHBiwcQ2.js} +1748 -1618
- package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-CKharc6_.js → screen-route-slug-utils-Bq-L-ohr.js} +1 -1
- package/dist/dist-cli-preview/chunks/{sheet-haptics-context-DTfySPrq.js → sheet-haptics-context-DT2_eUzd.js} +1 -1
- package/dist/dist-cli-preview/chunks/{sidebar-CkC-f9zG.js → sidebar-C09syHYk.js} +10 -10
- package/dist/dist-cli-preview/chunks/sk-CFYGY_a5.js +1032 -0
- package/dist/dist-cli-preview/chunks/{sortable.esm-e9hcrOle.js → sortable.esm-ClljxXn3.js} +2 -2
- package/dist/dist-cli-preview/chunks/{store-api-context-CDtl_X71.js → store-api-context-DzwRm7gt.js} +1 -1
- package/dist/dist-cli-preview/chunks/sv-i61vcDan.js +1032 -0
- package/dist/dist-cli-preview/chunks/th-DfFRan1t.js +1032 -0
- package/dist/dist-cli-preview/chunks/tl-olBNOPcn.js +1032 -0
- package/dist/dist-cli-preview/chunks/tr-LZKZ4tKb.js +1032 -0
- package/dist/dist-cli-preview/chunks/trash-2-CZhp1ODr.js +17 -0
- package/dist/dist-cli-preview/chunks/uk-BtXttbkl.js +1032 -0
- package/dist/dist-cli-preview/chunks/{use-mobile-DF76-293.js → use-mobile-B7ojcHh2.js} +3 -3
- package/dist/dist-cli-preview/chunks/{use-optional-store-DT9WAQPd.js → use-optional-store-DJYDCvhI.js} +2 -2
- package/dist/dist-cli-preview/chunks/use-store-DeK8QAFv.js +400 -0
- package/dist/dist-cli-preview/chunks/{useInfiniteQuery-CDXQnWw0.js → useInfiniteQuery-FHeNizQM.js} +1 -1
- package/dist/dist-cli-preview/chunks/{user-B-jZvwGL.js → user-ozIT6Hhj.js} +1 -1
- package/dist/dist-cli-preview/chunks/{users-TuK7MiQN.js → users-JoDv7hjw.js} +1 -1
- package/dist/dist-cli-preview/chunks/vi-BHWnhETf.js +1032 -0
- package/dist/dist-cli-preview/chunks/zh_CN-CTgClYOF.js +1032 -0
- package/dist/dist-cli-preview/chunks/zh_TW-aQ6cE6PF.js +1032 -0
- package/package.json +2 -2
- package/dist/dist-cli-preview/chunks/MediaScreen-BvJdBMeQ.js +0 -8
- package/dist/dist-cli-preview/chunks/MessagingScreen-BKHqT1Ej.js +0 -35760
- package/dist/dist-cli-preview/chunks/MobileActionSheet-CBoGiv4j.js +0 -2950
- package/dist/dist-cli-preview/chunks/OrdersScreen-BGgj4BZS.js +0 -9
- package/dist/dist-cli-preview/chunks/PlaylistsScreen-Bx1XIkZA.js +0 -8
- package/dist/dist-cli-preview/chunks/Select-sVTiAmsy.js +0 -952
- package/dist/dist-cli-preview/chunks/Textarea-D-fkMEdH.js +0 -349
- package/dist/dist-cli-preview/chunks/ar-2rvzIrIR.js +0 -626
- package/dist/dist-cli-preview/chunks/bg-BYPRLePV.js +0 -626
- package/dist/dist-cli-preview/chunks/bn-C0wttE43.js +0 -626
- package/dist/dist-cli-preview/chunks/cs-C7Irs0-j.js +0 -626
- package/dist/dist-cli-preview/chunks/da-80sKijLl.js +0 -626
- package/dist/dist-cli-preview/chunks/de-tvILU4R6.js +0 -626
- package/dist/dist-cli-preview/chunks/el-B3kxyML7.js +0 -626
- package/dist/dist-cli-preview/chunks/es-BTQqBZ3c.js +0 -626
- package/dist/dist-cli-preview/chunks/fi-B3aiDLBd.js +0 -626
- package/dist/dist-cli-preview/chunks/fr-C6aLQLnC.js +0 -626
- package/dist/dist-cli-preview/chunks/he-yMMGeZ3u.js +0 -626
- package/dist/dist-cli-preview/chunks/hi-Cnovv3v0.js +0 -626
- package/dist/dist-cli-preview/chunks/hr-B9M6sJu9.js +0 -626
- package/dist/dist-cli-preview/chunks/hu-D__s9KvX.js +0 -626
- package/dist/dist-cli-preview/chunks/id-CrrK_-vk.js +0 -626
- package/dist/dist-cli-preview/chunks/index-BF-Yok75.js +0 -341
- package/dist/dist-cli-preview/chunks/it-C_g-lMfy.js +0 -626
- package/dist/dist-cli-preview/chunks/ja-Dmdbg-it.js +0 -626
- package/dist/dist-cli-preview/chunks/ko-C-jyYnAw.js +0 -626
- package/dist/dist-cli-preview/chunks/lock-B3ps7XBv.js +0 -14
- package/dist/dist-cli-preview/chunks/log-out-CDzQuZ5N.js +0 -15
- package/dist/dist-cli-preview/chunks/messaging-BETZIbiu.js +0 -4
- package/dist/dist-cli-preview/chunks/ms-Bk6rBm7W.js +0 -626
- package/dist/dist-cli-preview/chunks/nl-Bh5tyFlK.js +0 -626
- package/dist/dist-cli-preview/chunks/no-BqMQtHFU.js +0 -626
- package/dist/dist-cli-preview/chunks/pl-B4xTBpA_.js +0 -626
- package/dist/dist-cli-preview/chunks/pt-Biz6F-Fo.js +0 -626
- package/dist/dist-cli-preview/chunks/ro-BKd4fPGi.js +0 -626
- package/dist/dist-cli-preview/chunks/ru-CD8HG55y.js +0 -626
- package/dist/dist-cli-preview/chunks/sk-5vqOdyEq.js +0 -626
- package/dist/dist-cli-preview/chunks/sv-D-_y-QCE.js +0 -626
- package/dist/dist-cli-preview/chunks/th-BHVHNGsc.js +0 -626
- package/dist/dist-cli-preview/chunks/tl-DdaRIJXv.js +0 -626
- package/dist/dist-cli-preview/chunks/tr-CP55XLFp.js +0 -626
- package/dist/dist-cli-preview/chunks/trash-2-C5c1weGY.js +0 -137
- package/dist/dist-cli-preview/chunks/uk-C5cwrSwu.js +0 -626
- package/dist/dist-cli-preview/chunks/use-store-DUukxuYV.js +0 -92
- package/dist/dist-cli-preview/chunks/vi-7y-mSoow.js +0 -626
- package/dist/dist-cli-preview/chunks/zh_CN-cvRqvqNw.js +0 -626
- package/dist/dist-cli-preview/chunks/zh_TW-_Qzm5B74.js +0 -626
package/dist/dist-cli-preview/chunks/{ContactsScreen-kuRxflCD.js → ContactsScreen-nqNyMwxa.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { c as ze, l as i, ac as dr, j as t, aa as ur, ab as mr, am as Ie,
|
|
2
|
-
import { c as kr, a as wr, u as Sr } from "./client.gen-
|
|
3
|
-
import { u as mn, a as Mr, c as Tr, C as Er } from "./countries-api-adapter-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { u as
|
|
7
|
-
import {
|
|
8
|
-
import { B as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { U as ke } from "./users-
|
|
12
|
-
import { E as
|
|
13
|
-
import { S as pa, b as fa, I as Ke, a as Oe, s as vn, d as ga, e as
|
|
14
|
-
import {
|
|
15
|
-
import { u as
|
|
16
|
-
import { g as Se, h as
|
|
17
|
-
import { M as jn,
|
|
18
|
-
import { M as Ra } from "./map-pin-
|
|
19
|
-
import { C as Ia } from "./copy-
|
|
1
|
+
import { c as ze, l as i, ac as dr, j as t, aa as ur, ab as mr, am as Ie, aK as pr, a9 as rn, a8 as wt, X as Ge, M as D, U as pt, aw as fr, Z as gr, K as q, N as _r, G as ve, R as an, J as W, E as O, aS as hr, ap as xr, $ as ue, a0 as me, a1 as pe, a2 as fe, a3 as ge, aU as br, at as sn, au as on, aR as ln, av as cn, C as yr, aT as yt, O as dn, H, Y as vr, b1 as jr, B as Nr, ag as un, z as Cr } from "./account-screen-runtime-BYj9PrHT.js";
|
|
2
|
+
import { c as kr, a as wr, u as Sr } from "./client.gen-DO8I8bB0.js";
|
|
3
|
+
import { u as mn, a as Mr, c as Tr, C as Er } from "./countries-api-adapter-B2ub-v6x.js";
|
|
4
|
+
import { H as Dr, Z as Ar, P as he, M as tt, u as re, o as Pr, r as Rt, s as ie, t as zr, c as It, m as pn, C as fn, R as De, j as Ae, k as gn } from "./schemas-EHBiwcQ2.js";
|
|
5
|
+
import { u as Fr } from "./use-mobile-B7ojcHh2.js";
|
|
6
|
+
import { a as Rr, c as Ir, b as Or, u as Lr, I as ae, S as Ee } from "./sheet-haptics-context-DT2_eUzd.js";
|
|
7
|
+
import { B as qr, a as $r, b as Ot, d as Kr, e as Br, c as Ur } from "./Breadcrumb-BKdVGms9.js";
|
|
8
|
+
import { v as _n, w as Gr, x as Hr, y as Qr, z as Yr, B as Vr, F as Wr, G as Xr, H as Jr, J as Zr, K as ea, L as ta, N as na, O as ra, Q as aa, T as sa, U as oa, P as hn, k as xn, l as bn, M as He, D as nt, a as rt, b as at, c as $e, S as ia, d as la, e as ca, f as da, g as ua, E as Je } from "./MobileActionSheet-DaIBkwQD.js";
|
|
9
|
+
import { u as ma, S as yn } from "./useInfiniteQuery-FHeNizQM.js";
|
|
10
|
+
import { T as st } from "./trash-2-CZhp1ODr.js";
|
|
11
|
+
import { U as ke } from "./users-JoDv7hjw.js";
|
|
12
|
+
import { E as Ze } from "./ellipsis-wdxlMcjt.js";
|
|
13
|
+
import { S as pa, b as fa, I as Ke, a as Oe, s as vn, d as ga, e as _a } from "./screen-route-slug-utils-Bq-L-ohr.js";
|
|
14
|
+
import { T as ha, U as xa, a as ba, b as ya, c as va, S as ja } from "./index-qwhiPvOP.js";
|
|
15
|
+
import { u as _e } from "./sidebar-C09syHYk.js";
|
|
16
|
+
import { g as Se, h as Na, C as Ca } from "./Combobox-CyU4gagO.js";
|
|
17
|
+
import { M as jn, f as Nn, S as ka, H as wa, P as Sa, u as Ma, d as Ta, L as Ea, e as Da, E as Aa, T as Pa, a as za, b as Lt, g as qt, c as Fa } from "./index-DSTWchdg.js";
|
|
18
|
+
import { M as Ra } from "./map-pin-Be34_dU6.js";
|
|
19
|
+
import { C as Ia } from "./copy-COLmacny.js";
|
|
20
20
|
/**
|
|
21
21
|
* @license lucide-react v0.575.0 - ISC
|
|
22
22
|
*
|
|
@@ -89,7 +89,7 @@ const Ga = [
|
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
91
|
*/
|
|
92
|
-
const
|
|
92
|
+
const Qa = [
|
|
93
93
|
["path", { d: "M12 2v8", key: "1q4o3n" }],
|
|
94
94
|
["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
|
|
95
95
|
["path", { d: "M2 18h2", key: "j10viu" }],
|
|
@@ -98,10 +98,10 @@ const Ya = [
|
|
|
98
98
|
["path", { d: "M22 22H2", key: "19qnx5" }],
|
|
99
99
|
["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }],
|
|
100
100
|
["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
|
|
101
|
-
],
|
|
101
|
+
], Ya = ze("sunrise", Qa);
|
|
102
102
|
var St = "ContextMenu", [Va] = ur(St, [
|
|
103
|
-
|
|
104
|
-
]), ee =
|
|
103
|
+
_n
|
|
104
|
+
]), ee = _n(), [Wa, Cn] = Va(St), kn = (e) => {
|
|
105
105
|
const { __scopeContextMenu: n, children: r, onOpenChange: a, dir: s, modal: o = !0 } = e, [l, c] = i.useState(!1), d = ee(n), u = dr(a), m = i.useCallback(
|
|
106
106
|
(g) => {
|
|
107
107
|
c(g), u(g);
|
|
@@ -170,14 +170,14 @@ var wn = "ContextMenuTrigger", Sn = i.forwardRef(
|
|
|
170
170
|
Sn.displayName = wn;
|
|
171
171
|
var Xa = "ContextMenuPortal", Mn = (e) => {
|
|
172
172
|
const { __scopeContextMenu: n, ...r } = e, a = ee(n);
|
|
173
|
-
return /* @__PURE__ */ t.jsx(
|
|
173
|
+
return /* @__PURE__ */ t.jsx(Qr, { ...a, ...r });
|
|
174
174
|
};
|
|
175
175
|
Mn.displayName = Xa;
|
|
176
176
|
var Tn = "ContextMenuContent", En = i.forwardRef(
|
|
177
177
|
(e, n) => {
|
|
178
178
|
const { __scopeContextMenu: r, ...a } = e, s = Cn(Tn, r), o = ee(r), l = i.useRef(!1);
|
|
179
179
|
return /* @__PURE__ */ t.jsx(
|
|
180
|
-
|
|
180
|
+
Yr,
|
|
181
181
|
{
|
|
182
182
|
...o,
|
|
183
183
|
...a,
|
|
@@ -204,13 +204,13 @@ var Tn = "ContextMenuContent", En = i.forwardRef(
|
|
|
204
204
|
}
|
|
205
205
|
);
|
|
206
206
|
En.displayName = Tn;
|
|
207
|
-
var
|
|
207
|
+
var Ja = "ContextMenuGroup", Za = i.forwardRef(
|
|
208
208
|
(e, n) => {
|
|
209
209
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
210
210
|
return /* @__PURE__ */ t.jsx(ea, { ...s, ...a, ref: n });
|
|
211
211
|
}
|
|
212
212
|
);
|
|
213
|
-
|
|
213
|
+
Za.displayName = Ja;
|
|
214
214
|
var es = "ContextMenuLabel", ts = i.forwardRef(
|
|
215
215
|
(e, n) => {
|
|
216
216
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
@@ -221,7 +221,7 @@ ts.displayName = es;
|
|
|
221
221
|
var ns = "ContextMenuItem", Dn = i.forwardRef(
|
|
222
222
|
(e, n) => {
|
|
223
223
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
224
|
-
return /* @__PURE__ */ t.jsx(
|
|
224
|
+
return /* @__PURE__ */ t.jsx(Jr, { ...s, ...a, ref: n });
|
|
225
225
|
}
|
|
226
226
|
);
|
|
227
227
|
Dn.displayName = ns;
|
|
@@ -247,7 +247,7 @@ var cs = "ContextMenuItemIndicator", ds = i.forwardRef((e, n) => {
|
|
|
247
247
|
ds.displayName = cs;
|
|
248
248
|
var us = "ContextMenuSeparator", An = i.forwardRef((e, n) => {
|
|
249
249
|
const { __scopeContextMenu: r, ...a } = e, s = ee(r);
|
|
250
|
-
return /* @__PURE__ */ t.jsx(
|
|
250
|
+
return /* @__PURE__ */ t.jsx(Zr, { ...s, ...a, ref: n });
|
|
251
251
|
});
|
|
252
252
|
An.displayName = us;
|
|
253
253
|
var ms = "ContextMenuArrow", ps = i.forwardRef(
|
|
@@ -295,7 +295,7 @@ Rn.displayName = gs;
|
|
|
295
295
|
function Ve(e) {
|
|
296
296
|
return (n) => n.pointerType !== "mouse" ? e(n) : void 0;
|
|
297
297
|
}
|
|
298
|
-
var
|
|
298
|
+
var _s = kn, hs = Sn, In = Mn, xs = En, bs = Dn, ys = An, vs = zn, js = Fn, Ns = Rn;
|
|
299
299
|
function ft(e) {
|
|
300
300
|
return e.replace(/_/g, " ").replace(/([A-Z])/g, " $1").split(" ").map((n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()).join(" ").trim();
|
|
301
301
|
}
|
|
@@ -476,7 +476,7 @@ function xe() {
|
|
|
476
476
|
function it() {
|
|
477
477
|
return ot().notes;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Qe() {
|
|
480
480
|
return ot().tasks;
|
|
481
481
|
}
|
|
482
482
|
function lt() {
|
|
@@ -640,7 +640,7 @@ const Is = (e) => e.client.get({
|
|
|
640
640
|
"Content-Type": "application/json",
|
|
641
641
|
...e.headers
|
|
642
642
|
}
|
|
643
|
-
}),
|
|
643
|
+
}), Qs = (e) => e.client.get({
|
|
644
644
|
responseStyle: "data",
|
|
645
645
|
security: [
|
|
646
646
|
{
|
|
@@ -651,7 +651,7 @@ const Is = (e) => e.client.get({
|
|
|
651
651
|
],
|
|
652
652
|
url: "/api/contacts/{contact_id}/notes",
|
|
653
653
|
...e
|
|
654
|
-
}),
|
|
654
|
+
}), Ys = (e) => e.client.post({
|
|
655
655
|
responseStyle: "data",
|
|
656
656
|
security: [
|
|
657
657
|
{
|
|
@@ -703,7 +703,7 @@ const Is = (e) => e.client.get({
|
|
|
703
703
|
],
|
|
704
704
|
url: "/api/contacts/{contact_id}/notes/{id}",
|
|
705
705
|
...e
|
|
706
|
-
}),
|
|
706
|
+
}), Js = (e) => e.client.patch({
|
|
707
707
|
responseStyle: "data",
|
|
708
708
|
security: [
|
|
709
709
|
{
|
|
@@ -718,7 +718,7 @@ const Is = (e) => e.client.get({
|
|
|
718
718
|
"Content-Type": "application/json",
|
|
719
719
|
...e.headers
|
|
720
720
|
}
|
|
721
|
-
}),
|
|
721
|
+
}), Zs = (e) => e.client.delete({
|
|
722
722
|
responseStyle: "data",
|
|
723
723
|
security: [
|
|
724
724
|
{
|
|
@@ -892,16 +892,16 @@ function io(e) {
|
|
|
892
892
|
}
|
|
893
893
|
function lo(e) {
|
|
894
894
|
return {
|
|
895
|
-
listNotes: async (n) => ({ notes: ((await
|
|
895
|
+
listNotes: async (n) => ({ notes: ((await Qs({
|
|
896
896
|
client: e,
|
|
897
897
|
path: { contact_id: ce(n) }
|
|
898
898
|
})).notes ?? []).map(no) }),
|
|
899
|
-
createNote: (n, r) =>
|
|
899
|
+
createNote: (n, r) => Ys({
|
|
900
900
|
client: e,
|
|
901
901
|
path: { contact_id: ce(n) },
|
|
902
902
|
body: { note: { title: r.title, body: r.body } }
|
|
903
903
|
}),
|
|
904
|
-
updateNote: (n, r, a) =>
|
|
904
|
+
updateNote: (n, r, a) => Js({
|
|
905
905
|
client: e,
|
|
906
906
|
path: { contact_id: ce(r), id: n },
|
|
907
907
|
body: { note: { title: a.title, body: a.body } }
|
|
@@ -934,7 +934,7 @@ function co(e) {
|
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
936
|
}),
|
|
937
|
-
deleteTask: (n, r) =>
|
|
937
|
+
deleteTask: (n, r) => Zs({
|
|
938
938
|
client: e,
|
|
939
939
|
path: { contact_id: ce(r), id: n }
|
|
940
940
|
})
|
|
@@ -1482,12 +1482,12 @@ function go(e, n) {
|
|
|
1482
1482
|
return Rr(e, n);
|
|
1483
1483
|
}
|
|
1484
1484
|
const {
|
|
1485
|
-
Context:
|
|
1486
|
-
Provider:
|
|
1485
|
+
Context: _o,
|
|
1486
|
+
Provider: ho,
|
|
1487
1487
|
useTranslation: xo
|
|
1488
|
-
} = Or("Contacts"), bo =
|
|
1489
|
-
function
|
|
1490
|
-
return i.use(
|
|
1488
|
+
} = Or("Contacts"), bo = ho, z = xo;
|
|
1489
|
+
function Ye() {
|
|
1490
|
+
return i.use(_o);
|
|
1491
1491
|
}
|
|
1492
1492
|
function yo({
|
|
1493
1493
|
children: e
|
|
@@ -1498,7 +1498,7 @@ function yo({
|
|
|
1498
1498
|
);
|
|
1499
1499
|
return /* @__PURE__ */ t.jsx(bo, { value: a, children: e });
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function Qn(e) {
|
|
1502
1502
|
const n = e.indexOf(`
|
|
1503
1503
|
|
|
1504
1504
|
`);
|
|
@@ -1522,13 +1522,13 @@ function le(e) {
|
|
|
1522
1522
|
const n = typeof e == "string" ? new Date(e) : e;
|
|
1523
1523
|
return new Date(n.getFullYear(), n.getMonth(), n.getDate());
|
|
1524
1524
|
}
|
|
1525
|
-
const vo = /^\d{4}-\d{2}-\d{2}(?:$|T00:00(?::00(?:\.\d+)?)?(?:[+-]\d{2}:\d{2}|Z)?)$/,
|
|
1525
|
+
const vo = /^\d{4}-\d{2}-\d{2}(?:$|T00:00(?::00(?:\.\d+)?)?(?:[+-]\d{2}:\d{2}|Z)?)$/, Yn = /^\d{4}-\d{2}-\d{2}T(\d{2}):(\d{2})(?::\d{2}(?:\.\d+)?)?(?:[+-]\d{2}:\d{2})?$/;
|
|
1526
1526
|
function ct(e) {
|
|
1527
1527
|
return vo.test(e);
|
|
1528
1528
|
}
|
|
1529
1529
|
function Vn(e) {
|
|
1530
1530
|
if (!e) return "";
|
|
1531
|
-
if (
|
|
1531
|
+
if (Yn.test(e))
|
|
1532
1532
|
return e.slice(0, 10);
|
|
1533
1533
|
if (ct(e)) {
|
|
1534
1534
|
const r = /^(\d{4})-(\d{2})-(\d{2})/.exec(e);
|
|
@@ -1559,7 +1559,7 @@ const de = {
|
|
|
1559
1559
|
all: (e) => [e],
|
|
1560
1560
|
list: (e) => [...de.all(e), "list"],
|
|
1561
1561
|
detail: (e, n) => [...de.all(e), "detail", n]
|
|
1562
|
-
},
|
|
1562
|
+
}, Q = {
|
|
1563
1563
|
activities: (e) => ["portal-contacts", "activities", e],
|
|
1564
1564
|
tasks: (e) => ["portal-contacts", "tasks", e],
|
|
1565
1565
|
notes: (e) => ["portal-contacts", "notes", e],
|
|
@@ -1571,7 +1571,7 @@ const de = {
|
|
|
1571
1571
|
};
|
|
1572
1572
|
function No(e) {
|
|
1573
1573
|
const n = xe();
|
|
1574
|
-
return
|
|
1574
|
+
return ma({
|
|
1575
1575
|
queryKey: [...de.list("contacts"), e],
|
|
1576
1576
|
queryFn: ({ pageParam: r }) => n.listContacts({
|
|
1577
1577
|
...e,
|
|
@@ -1585,14 +1585,14 @@ function No(e) {
|
|
|
1585
1585
|
initialPageParam: 1
|
|
1586
1586
|
});
|
|
1587
1587
|
}
|
|
1588
|
-
const Co = 30,
|
|
1588
|
+
const Co = 30, _t = "12:00", Tt = /^(\d{2}):(\d{2})$/;
|
|
1589
1589
|
function Et(e) {
|
|
1590
1590
|
const n = Tt.exec(e), r = n?.[1] ? Number(n[1]) : Number.NaN, a = n?.[2] ? Number(n[2]) : Number.NaN;
|
|
1591
1591
|
return Number.isInteger(r) && Number.isInteger(a) && r >= 0 && r <= 23 && a >= 0 && a <= 59;
|
|
1592
1592
|
}
|
|
1593
1593
|
function Ht(e) {
|
|
1594
1594
|
if (!e) return "";
|
|
1595
|
-
const n =
|
|
1595
|
+
const n = Yn.exec(e);
|
|
1596
1596
|
if (n?.[1] && n[2]) {
|
|
1597
1597
|
const a = `${n[1]}:${n[2]}`;
|
|
1598
1598
|
return Et(a) ? a : "";
|
|
@@ -1666,8 +1666,8 @@ function Mo({
|
|
|
1666
1666
|
onClose: c,
|
|
1667
1667
|
autoFocus: d = !0
|
|
1668
1668
|
}) {
|
|
1669
|
-
const { t: u, locale: m } = z(), [g, f] = i.useState(s), [
|
|
1670
|
-
() => Ht(o) ||
|
|
1669
|
+
const { t: u, locale: m } = z(), [g, f] = i.useState(s), [h, y] = i.useState(o ?? null), [p, _] = i.useState(
|
|
1670
|
+
() => Ht(o) || _t
|
|
1671
1671
|
), [v, C] = i.useState(!1), [k, j] = i.useState(!1), [x, P] = i.useState(() => /* @__PURE__ */ new Date()), R = i.useId(), F = i.useRef(null);
|
|
1672
1672
|
i.useEffect(() => {
|
|
1673
1673
|
d && F.current?.focus();
|
|
@@ -1686,7 +1686,7 @@ function Mo({
|
|
|
1686
1686
|
w != null && clearTimeout(w);
|
|
1687
1687
|
};
|
|
1688
1688
|
}, []);
|
|
1689
|
-
const I = i.useMemo(() => Vn(
|
|
1689
|
+
const I = i.useMemo(() => Vn(h), [h]), S = I !== "", L = Ht(o) !== "", $ = p !== "" && S && (v || L), b = i.useMemo(
|
|
1690
1690
|
() => I === "" ? void 0 : le(I),
|
|
1691
1691
|
[I]
|
|
1692
1692
|
), A = i.useMemo(
|
|
@@ -1721,14 +1721,14 @@ function Mo({
|
|
|
1721
1721
|
day: "numeric"
|
|
1722
1722
|
}), N = new Intl.DateTimeFormat(M, {
|
|
1723
1723
|
weekday: "short"
|
|
1724
|
-
}),
|
|
1724
|
+
}), Z = new Intl.NumberFormat(M);
|
|
1725
1725
|
return {
|
|
1726
1726
|
formatCaption: (G) => w.format(G),
|
|
1727
1727
|
formatMonthCaption: (G) => U.format(G),
|
|
1728
1728
|
formatYearCaption: (G) => ne.format(G),
|
|
1729
1729
|
formatDay: (G) => te.format(G),
|
|
1730
1730
|
formatWeekdayName: (G) => N.format(G),
|
|
1731
|
-
formatWeekNumber: (G) =>
|
|
1731
|
+
formatWeekNumber: (G) => Z.format(G)
|
|
1732
1732
|
};
|
|
1733
1733
|
}, [M]), be = i.useMemo(() => {
|
|
1734
1734
|
const w = new Intl.DateTimeFormat(M, {
|
|
@@ -1764,11 +1764,11 @@ function Mo({
|
|
|
1764
1764
|
due_at: v ? So(I, p) : o ?? null
|
|
1765
1765
|
});
|
|
1766
1766
|
}, Ne = g.trim().length > 0 && !n, E = (w) => {
|
|
1767
|
-
C(!0), y(w),
|
|
1767
|
+
C(!0), y(w), _((U) => U || _t);
|
|
1768
1768
|
}, K = () => {
|
|
1769
|
-
C(!0), y(null),
|
|
1770
|
-
},
|
|
1771
|
-
C(!0),
|
|
1769
|
+
C(!0), y(null), _(_t), j(!1);
|
|
1770
|
+
}, J = (w) => {
|
|
1771
|
+
C(!0), _(w), w && !S && y(Te(0, x));
|
|
1772
1772
|
};
|
|
1773
1773
|
return /* @__PURE__ */ t.jsxs("div", { className: "border-border/50 focus-within:border-foreground/30 rounded-xl border p-3 transition-colors", children: [
|
|
1774
1774
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-start gap-3", children: [
|
|
@@ -1805,7 +1805,7 @@ function Mo({
|
|
|
1805
1805
|
)
|
|
1806
1806
|
] }),
|
|
1807
1807
|
/* @__PURE__ */ t.jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-1.5 pl-(--row-indent) [--row-indent:2rem]", children: [
|
|
1808
|
-
/* @__PURE__ */ t.jsxs(
|
|
1808
|
+
/* @__PURE__ */ t.jsxs(hn, { open: k, onOpenChange: j, children: [
|
|
1809
1809
|
/* @__PURE__ */ t.jsx(xn, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
1810
1810
|
"button",
|
|
1811
1811
|
{
|
|
@@ -1847,7 +1847,7 @@ function Mo({
|
|
|
1847
1847
|
/* @__PURE__ */ t.jsx(
|
|
1848
1848
|
We,
|
|
1849
1849
|
{
|
|
1850
|
-
icon:
|
|
1850
|
+
icon: Ya,
|
|
1851
1851
|
label: u("quick_tomorrow"),
|
|
1852
1852
|
rightLabel: T.tomorrowLabel,
|
|
1853
1853
|
onSelect: () => E(T.tomorrow)
|
|
@@ -1856,7 +1856,7 @@ function Mo({
|
|
|
1856
1856
|
/* @__PURE__ */ t.jsx(
|
|
1857
1857
|
We,
|
|
1858
1858
|
{
|
|
1859
|
-
icon:
|
|
1859
|
+
icon: Na,
|
|
1860
1860
|
label: u("task_next_week"),
|
|
1861
1861
|
rightLabel: T.nextWeekLabel,
|
|
1862
1862
|
onSelect: () => E(T.nextWeek)
|
|
@@ -1923,7 +1923,7 @@ function Mo({
|
|
|
1923
1923
|
id: R,
|
|
1924
1924
|
type: "time",
|
|
1925
1925
|
value: p,
|
|
1926
|
-
onChange: (w) =>
|
|
1926
|
+
onChange: (w) => J(w.target.value),
|
|
1927
1927
|
"aria-label": u("task_time_aria"),
|
|
1928
1928
|
className: "h-full border-0 bg-transparent p-0 text-right text-sm outline-none [&::-webkit-calendar-picker-indicator]:hidden"
|
|
1929
1929
|
}
|
|
@@ -1977,7 +1977,7 @@ function To({
|
|
|
1977
1977
|
),
|
|
1978
1978
|
/* @__PURE__ */ t.jsx(q, { onClick: n, disabled: r, children: s(r ? "adding" : "add_contact") })
|
|
1979
1979
|
] }),
|
|
1980
|
-
/* @__PURE__ */ t.jsx(
|
|
1980
|
+
/* @__PURE__ */ t.jsx(_r, { children: /* @__PURE__ */ t.jsx(qr, { children: /* @__PURE__ */ t.jsxs($r, { className: "text-lg", children: [
|
|
1981
1981
|
/* @__PURE__ */ t.jsx(Ot, { children: /* @__PURE__ */ t.jsx(
|
|
1982
1982
|
Kr,
|
|
1983
1983
|
{
|
|
@@ -1997,7 +1997,7 @@ function To({
|
|
|
1997
1997
|
function Dt() {
|
|
1998
1998
|
const e = lt();
|
|
1999
1999
|
return ve({
|
|
2000
|
-
queryKey:
|
|
2000
|
+
queryKey: Q.groups(),
|
|
2001
2001
|
queryFn: () => e.listGroups(),
|
|
2002
2002
|
enabled: !!e,
|
|
2003
2003
|
select: (n) => n.groups
|
|
@@ -2046,15 +2046,15 @@ function Do({
|
|
|
2046
2046
|
onPointerTarget: d,
|
|
2047
2047
|
onDelete: u
|
|
2048
2048
|
}) {
|
|
2049
|
-
const { t: m } = z(), g = At(e, m), f = String(e.id),
|
|
2049
|
+
const { t: m } = z(), g = At(e, m), f = String(e.id), h = e.email ?? e.status?.trim() ?? null, y = i.useRef(null), p = i.useRef(null), _ = i.useRef(0), v = i.useRef(!1), C = i.useRef(0), k = i.useRef(0), j = i.useRef(!1), x = i.useRef(!1), P = i.useRef(!1), R = i.useRef(!1), F = i.useRef(null), I = i.useRef(null);
|
|
2050
2050
|
i.useEffect(() => () => {
|
|
2051
2051
|
I.current?.abort();
|
|
2052
2052
|
}, []);
|
|
2053
2053
|
const S = i.useCallback(
|
|
2054
2054
|
(E, K) => {
|
|
2055
|
-
|
|
2056
|
-
const
|
|
2057
|
-
|
|
2055
|
+
_.current = E;
|
|
2056
|
+
const J = p.current;
|
|
2057
|
+
J && (J.style.opacity = E === 0 ? "0" : "1", J.style.pointerEvents = E <= -80 ? "auto" : "none");
|
|
2058
2058
|
const w = y.current;
|
|
2059
2059
|
w && (K === "open" ? w.style.transition = "transform 0.15s cubic-bezier(0.25, 0.1, 0.25, 1)" : K === "close" ? w.style.transition = "transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1)" : w.style.transition = "none", w.style.transform = `translateX(${E}px)`);
|
|
2060
2060
|
},
|
|
@@ -2073,16 +2073,16 @@ function Do({
|
|
|
2073
2073
|
), $ = i.useCallback(
|
|
2074
2074
|
(E, K) => {
|
|
2075
2075
|
if (!j.current) return;
|
|
2076
|
-
const
|
|
2077
|
-
if (!x.current && (Math.abs(
|
|
2076
|
+
const J = E - C.current, w = K - k.current;
|
|
2077
|
+
if (!x.current && (Math.abs(J) < 4 && Math.abs(w) < 4 || (x.current = !0, P.current = Math.abs(J) > Math.abs(w), !P.current)) || !P.current) return;
|
|
2078
2078
|
R.current = !0;
|
|
2079
|
-
const ne = Math.max(-80, Math.min(0, (a ? -80 : 0) +
|
|
2079
|
+
const ne = Math.max(-80, Math.min(0, (a ? -80 : 0) + J));
|
|
2080
2080
|
S(ne, !1);
|
|
2081
2081
|
},
|
|
2082
2082
|
[a, S]
|
|
2083
2083
|
), b = i.useCallback(() => {
|
|
2084
2084
|
if (!j.current || (j.current = !1, !R.current)) return;
|
|
2085
|
-
|
|
2085
|
+
_.current < -40 ? (S(-80, "open"), s?.(f, !0)) : (S(0, "close"), s?.(f, !1));
|
|
2086
2086
|
}, [S, s, f]), A = i.useCallback(
|
|
2087
2087
|
(E) => {
|
|
2088
2088
|
const K = E.touches[0];
|
|
@@ -2101,17 +2101,17 @@ function Do({
|
|
|
2101
2101
|
L(E.clientX, E.clientY), I.current?.abort();
|
|
2102
2102
|
const K = new AbortController();
|
|
2103
2103
|
I.current = K;
|
|
2104
|
-
const { signal:
|
|
2104
|
+
const { signal: J } = K;
|
|
2105
2105
|
window.addEventListener(
|
|
2106
2106
|
"mousemove",
|
|
2107
2107
|
(w) => $(w.clientX, w.clientY),
|
|
2108
|
-
{ signal:
|
|
2108
|
+
{ signal: J }
|
|
2109
2109
|
), window.addEventListener(
|
|
2110
2110
|
"mouseup",
|
|
2111
2111
|
() => {
|
|
2112
2112
|
b(), K.abort(), I.current === K && (I.current = null);
|
|
2113
2113
|
},
|
|
2114
|
-
{ signal:
|
|
2114
|
+
{ signal: J }
|
|
2115
2115
|
);
|
|
2116
2116
|
},
|
|
2117
2117
|
[L, $, b]
|
|
@@ -2119,12 +2119,12 @@ function Do({
|
|
|
2119
2119
|
(E) => {
|
|
2120
2120
|
if (!u || Math.abs(E.deltaX) <= Math.abs(E.deltaY)) return;
|
|
2121
2121
|
!X.current && !a && o?.(), T.current += E.deltaX;
|
|
2122
|
-
const
|
|
2122
|
+
const J = Math.max(
|
|
2123
2123
|
-80,
|
|
2124
2124
|
Math.min(0, (a ? -80 : 0) - T.current)
|
|
2125
2125
|
);
|
|
2126
|
-
S(
|
|
2127
|
-
|
|
2126
|
+
S(J, !1), X.current && clearTimeout(X.current), X.current = setTimeout(() => {
|
|
2127
|
+
_.current < -40 ? (S(-80, "open"), s?.(f, !0)) : (S(0, "close"), s?.(f, !1)), T.current = 0, X.current = null;
|
|
2128
2128
|
}, 80);
|
|
2129
2129
|
},
|
|
2130
2130
|
[u, a, o, S, s, f]
|
|
@@ -2176,7 +2176,7 @@ function Do({
|
|
|
2176
2176
|
},
|
|
2177
2177
|
"aria-label": m("delete_contact_aria", { name: g }),
|
|
2178
2178
|
children: [
|
|
2179
|
-
/* @__PURE__ */ t.jsx(
|
|
2179
|
+
/* @__PURE__ */ t.jsx(st, { className: "size-5" }),
|
|
2180
2180
|
/* @__PURE__ */ t.jsx("span", { className: "text-xs font-medium", children: m("delete") })
|
|
2181
2181
|
]
|
|
2182
2182
|
}
|
|
@@ -2224,7 +2224,7 @@ function Do({
|
|
|
2224
2224
|
),
|
|
2225
2225
|
/* @__PURE__ */ t.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2226
2226
|
/* @__PURE__ */ t.jsx("span", { className: "text-foreground block truncate text-sm font-semibold tracking-tight", children: g }),
|
|
2227
|
-
|
|
2227
|
+
h && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground mt-0.5 block truncate text-sm", children: h })
|
|
2228
2228
|
] }),
|
|
2229
2229
|
n && /* @__PURE__ */ t.jsx(
|
|
2230
2230
|
an,
|
|
@@ -2241,12 +2241,12 @@ function Do({
|
|
|
2241
2241
|
function Ao({
|
|
2242
2242
|
...e
|
|
2243
2243
|
}) {
|
|
2244
|
-
return /* @__PURE__ */ t.jsx(
|
|
2244
|
+
return /* @__PURE__ */ t.jsx(_s, { "data-slot": "context-menu", ...e });
|
|
2245
2245
|
}
|
|
2246
2246
|
function Po({
|
|
2247
2247
|
...e
|
|
2248
2248
|
}) {
|
|
2249
|
-
return /* @__PURE__ */ t.jsx(
|
|
2249
|
+
return /* @__PURE__ */ t.jsx(hs, { "data-slot": "context-menu-trigger", ...e });
|
|
2250
2250
|
}
|
|
2251
2251
|
function zo({
|
|
2252
2252
|
className: e,
|
|
@@ -2264,7 +2264,7 @@ function zo({
|
|
|
2264
2264
|
}
|
|
2265
2265
|
) });
|
|
2266
2266
|
}
|
|
2267
|
-
function
|
|
2267
|
+
function ht({
|
|
2268
2268
|
className: e,
|
|
2269
2269
|
inset: n,
|
|
2270
2270
|
variant: r = "default",
|
|
@@ -2341,11 +2341,11 @@ function Oo({
|
|
|
2341
2341
|
}
|
|
2342
2342
|
) });
|
|
2343
2343
|
}
|
|
2344
|
-
const
|
|
2344
|
+
const Qt = 768;
|
|
2345
2345
|
function Xn() {
|
|
2346
2346
|
const [e, n] = i.useState(!1);
|
|
2347
2347
|
return i.useEffect(() => {
|
|
2348
|
-
const r = window.matchMedia(`(max-width: ${
|
|
2348
|
+
const r = window.matchMedia(`(max-width: ${Qt - 1}px)`), a = () => n(window.innerWidth < Qt);
|
|
2349
2349
|
return r.addEventListener("change", a), a(), () => r.removeEventListener("change", a);
|
|
2350
2350
|
}, []), e;
|
|
2351
2351
|
}
|
|
@@ -2382,10 +2382,10 @@ function Ko({
|
|
|
2382
2382
|
highlightGroupName: l,
|
|
2383
2383
|
onDeleteContact: c
|
|
2384
2384
|
}) {
|
|
2385
|
-
const { t: d } = z(), u = qo(), [m, g] = i.useState(""), [f,
|
|
2385
|
+
const { t: d } = z(), u = qo(), [m, g] = i.useState(""), [f, h] = i.useState(""), [y, p] = i.useState(
|
|
2386
2386
|
null
|
|
2387
|
-
),
|
|
2388
|
-
(N,
|
|
2387
|
+
), _ = i.useCallback(
|
|
2388
|
+
(N, Z) => p(Z ? N : null),
|
|
2389
2389
|
[]
|
|
2390
2390
|
), v = i.useCallback(
|
|
2391
2391
|
() => p(null),
|
|
@@ -2393,7 +2393,7 @@ function Ko({
|
|
|
2393
2393
|
), [C, k] = i.useState({ kind: "all" }), [j, x] = i.useState(null), [P, R] = i.useState(!1), [F, I] = i.useState(!1), S = i.useRef(!1), L = Xn(), $ = xe(), b = W();
|
|
2394
2394
|
i.useEffect(() => {
|
|
2395
2395
|
const N = window.setTimeout(() => {
|
|
2396
|
-
|
|
2396
|
+
h(m.trim());
|
|
2397
2397
|
}, Lo);
|
|
2398
2398
|
return () => window.clearTimeout(N);
|
|
2399
2399
|
}, [m]);
|
|
@@ -2428,19 +2428,19 @@ function Ko({
|
|
|
2428
2428
|
E.current = !0;
|
|
2429
2429
|
return;
|
|
2430
2430
|
}
|
|
2431
|
-
const
|
|
2432
|
-
|
|
2431
|
+
const Z = se[0];
|
|
2432
|
+
Z && (E.current = !0, r(String(Z.id)));
|
|
2433
2433
|
}, [e, T, se, r]), i.useEffect(() => {
|
|
2434
2434
|
const N = Ne.current;
|
|
2435
2435
|
if (!N || !be) return;
|
|
2436
|
-
const
|
|
2436
|
+
const Z = new IntersectionObserver((G) => {
|
|
2437
2437
|
G[0]?.isIntersecting && !X && oe();
|
|
2438
2438
|
});
|
|
2439
|
-
return
|
|
2439
|
+
return Z.observe(N), () => Z.disconnect();
|
|
2440
2440
|
}, [be, X, oe]);
|
|
2441
|
-
const K = $o(C),
|
|
2442
|
-
(N,
|
|
2443
|
-
x(String(
|
|
2441
|
+
const K = $o(C), J = i.useCallback(
|
|
2442
|
+
(N, Z) => {
|
|
2443
|
+
x(String(Z.id)), L && (N.preventDefault(), R(!0));
|
|
2444
2444
|
},
|
|
2445
2445
|
[L]
|
|
2446
2446
|
), w = i.useCallback((N) => {
|
|
@@ -2448,7 +2448,7 @@ function Ko({
|
|
|
2448
2448
|
}, []), U = i.useCallback(() => {
|
|
2449
2449
|
if (j) {
|
|
2450
2450
|
const N = se.find(
|
|
2451
|
-
(
|
|
2451
|
+
(Z) => String(Z.id) === j
|
|
2452
2452
|
);
|
|
2453
2453
|
return N ? [N] : [];
|
|
2454
2454
|
}
|
|
@@ -2458,9 +2458,9 @@ function Ko({
|
|
|
2458
2458
|
N && (c?.(N), x(null));
|
|
2459
2459
|
}, [U, c]), te = i.useCallback(
|
|
2460
2460
|
(N) => {
|
|
2461
|
-
const
|
|
2462
|
-
if (
|
|
2463
|
-
const G =
|
|
2461
|
+
const Z = U();
|
|
2462
|
+
if (Z.length === 0) return;
|
|
2463
|
+
const G = Z.filter((ye) => !(Array.isArray(ye.tags) ? ye.tags : []).includes(N));
|
|
2464
2464
|
if (G.length === 0) {
|
|
2465
2465
|
x(null);
|
|
2466
2466
|
return;
|
|
@@ -2514,7 +2514,7 @@ function Ko({
|
|
|
2514
2514
|
)
|
|
2515
2515
|
] }),
|
|
2516
2516
|
/* @__PURE__ */ t.jsxs(q, { type: "button", size: "sm", onClick: a, children: [
|
|
2517
|
-
/* @__PURE__ */ t.jsx(
|
|
2517
|
+
/* @__PURE__ */ t.jsx(he, { className: "size-3.5", "aria-hidden": "true" }),
|
|
2518
2518
|
d("add")
|
|
2519
2519
|
] })
|
|
2520
2520
|
] }) }),
|
|
@@ -2563,10 +2563,10 @@ function Ko({
|
|
|
2563
2563
|
isSelected: String(N.id) === e,
|
|
2564
2564
|
highlight: String(N.id) === n,
|
|
2565
2565
|
revealed: y === String(N.id),
|
|
2566
|
-
onRevealChange:
|
|
2566
|
+
onRevealChange: _,
|
|
2567
2567
|
onDismissRevealed: v,
|
|
2568
2568
|
onSelect: r,
|
|
2569
|
-
onContextMenu:
|
|
2569
|
+
onContextMenu: J,
|
|
2570
2570
|
onPointerTarget: w,
|
|
2571
2571
|
onDelete: c
|
|
2572
2572
|
},
|
|
@@ -2581,8 +2581,8 @@ function Ko({
|
|
|
2581
2581
|
/* @__PURE__ */ t.jsx(ke, { className: "size-4", "aria-hidden": "true" }),
|
|
2582
2582
|
d("groups_add_to_group")
|
|
2583
2583
|
] }),
|
|
2584
|
-
/* @__PURE__ */ t.jsx(Oo, { children: A.length === 0 ? /* @__PURE__ */ t.jsx(
|
|
2585
|
-
|
|
2584
|
+
/* @__PURE__ */ t.jsx(Oo, { children: A.length === 0 ? /* @__PURE__ */ t.jsx(ht, { disabled: !0, children: d("groups_no_groups_yet") }) : A.map((N) => /* @__PURE__ */ t.jsxs(
|
|
2585
|
+
ht,
|
|
2586
2586
|
{
|
|
2587
2587
|
onSelect: () => te(N.name),
|
|
2588
2588
|
children: [
|
|
@@ -2606,12 +2606,12 @@ function Ko({
|
|
|
2606
2606
|
c && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2607
2607
|
/* @__PURE__ */ t.jsx(Fo, {}),
|
|
2608
2608
|
/* @__PURE__ */ t.jsxs(
|
|
2609
|
-
|
|
2609
|
+
ht,
|
|
2610
2610
|
{
|
|
2611
2611
|
variant: "destructive",
|
|
2612
2612
|
onSelect: ne,
|
|
2613
2613
|
children: [
|
|
2614
|
-
/* @__PURE__ */ t.jsx(
|
|
2614
|
+
/* @__PURE__ */ t.jsx(st, { className: "size-4", "aria-hidden": "true" }),
|
|
2615
2615
|
d("delete")
|
|
2616
2616
|
]
|
|
2617
2617
|
}
|
|
@@ -2649,7 +2649,7 @@ function Ko({
|
|
|
2649
2649
|
}
|
|
2650
2650
|
),
|
|
2651
2651
|
L && /* @__PURE__ */ t.jsx(
|
|
2652
|
-
|
|
2652
|
+
tt,
|
|
2653
2653
|
{
|
|
2654
2654
|
open: F,
|
|
2655
2655
|
onOpenChange: (N) => {
|
|
@@ -2707,8 +2707,8 @@ function Bo({
|
|
|
2707
2707
|
[n, r]
|
|
2708
2708
|
);
|
|
2709
2709
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex items-center pt-4 pb-4", children: [
|
|
2710
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: /* @__PURE__ */ t.jsx("div", { className: "flex gap-1.5 pl-6", children: g.map(({ id: f, label:
|
|
2711
|
-
const p = f === e,
|
|
2710
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: /* @__PURE__ */ t.jsx("div", { className: "flex gap-1.5 pl-6", children: g.map(({ id: f, label: h, value: y }) => {
|
|
2711
|
+
const p = f === e, _ = l && f === `group:${l}`;
|
|
2712
2712
|
return /* @__PURE__ */ t.jsx(
|
|
2713
2713
|
"button",
|
|
2714
2714
|
{
|
|
@@ -2718,9 +2718,9 @@ function Bo({
|
|
|
2718
2718
|
className: D(
|
|
2719
2719
|
"shrink-0 rounded-full px-4 py-1.5 text-sm font-semibold capitalize transition-colors",
|
|
2720
2720
|
p ? "bg-primary text-primary-foreground" : "border-border/50 bg-muted text-foreground hover:bg-muted/70 border",
|
|
2721
|
-
|
|
2721
|
+
_ && "animate-highlight-fade"
|
|
2722
2722
|
),
|
|
2723
|
-
children:
|
|
2723
|
+
children: h
|
|
2724
2724
|
},
|
|
2725
2725
|
f
|
|
2726
2726
|
);
|
|
@@ -2735,7 +2735,7 @@ function Bo({
|
|
|
2735
2735
|
onClick: () => m(!0),
|
|
2736
2736
|
className: "text-muted-foreground hover:bg-muted hover:text-foreground flex items-center justify-center rounded-full p-1.5 transition-colors",
|
|
2737
2737
|
"aria-label": c("groups_options_aria"),
|
|
2738
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2738
|
+
children: /* @__PURE__ */ t.jsx(Ze, { className: "size-4" })
|
|
2739
2739
|
}
|
|
2740
2740
|
),
|
|
2741
2741
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2762,23 +2762,23 @@ function Bo({
|
|
|
2762
2762
|
]
|
|
2763
2763
|
}
|
|
2764
2764
|
)
|
|
2765
|
-
] }) : /* @__PURE__ */ t.jsxs(
|
|
2766
|
-
/* @__PURE__ */ t.jsx(
|
|
2765
|
+
] }) : /* @__PURE__ */ t.jsxs(nt, { children: [
|
|
2766
|
+
/* @__PURE__ */ t.jsx(rt, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
2767
2767
|
"button",
|
|
2768
2768
|
{
|
|
2769
2769
|
type: "button",
|
|
2770
2770
|
className: "text-muted-foreground hover:bg-muted hover:text-foreground flex items-center justify-center rounded-full p-1.5 transition-colors",
|
|
2771
2771
|
"aria-label": c("groups_options_aria"),
|
|
2772
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2772
|
+
children: /* @__PURE__ */ t.jsx(Ze, { className: "size-4" })
|
|
2773
2773
|
}
|
|
2774
2774
|
) }),
|
|
2775
|
-
/* @__PURE__ */ t.jsxs(
|
|
2775
|
+
/* @__PURE__ */ t.jsxs(at, { align: "end", children: [
|
|
2776
2776
|
s && /* @__PURE__ */ t.jsxs($e, { onClick: s, children: [
|
|
2777
2777
|
/* @__PURE__ */ t.jsx(pa, { className: "size-4", "aria-hidden": "true" }),
|
|
2778
2778
|
c("groups_manage_title")
|
|
2779
2779
|
] }),
|
|
2780
2780
|
o && /* @__PURE__ */ t.jsxs($e, { onClick: o, children: [
|
|
2781
|
-
/* @__PURE__ */ t.jsx(
|
|
2781
|
+
/* @__PURE__ */ t.jsx(he, { className: "size-4", "aria-hidden": "true" }),
|
|
2782
2782
|
c("groups_create_title")
|
|
2783
2783
|
] })
|
|
2784
2784
|
] })
|
|
@@ -2830,14 +2830,14 @@ const Go = {
|
|
|
2830
2830
|
status_cold: "Cold",
|
|
2831
2831
|
status_lead: "Lead",
|
|
2832
2832
|
status_customer: "Customer"
|
|
2833
|
-
}, Ho = [],
|
|
2833
|
+
}, Ho = [], Qo = [
|
|
2834
2834
|
"new",
|
|
2835
2835
|
"active",
|
|
2836
2836
|
"inactive",
|
|
2837
2837
|
"cold",
|
|
2838
2838
|
"lead",
|
|
2839
2839
|
"customer"
|
|
2840
|
-
],
|
|
2840
|
+
], Yo = {
|
|
2841
2841
|
new: "status_new",
|
|
2842
2842
|
active: "status_active",
|
|
2843
2843
|
inactive: "status_inactive",
|
|
@@ -2849,23 +2849,23 @@ const Go = {
|
|
|
2849
2849
|
countries: n = Ho,
|
|
2850
2850
|
renderAvatarPicker: r
|
|
2851
2851
|
}) => {
|
|
2852
|
-
const { control: a, watch: s, setValue: o } =
|
|
2853
|
-
(p,
|
|
2852
|
+
const { control: a, watch: s, setValue: o } = hr(), l = Ye(), c = i.useCallback(
|
|
2853
|
+
(p, _) => {
|
|
2854
2854
|
if (l)
|
|
2855
2855
|
return l.t(
|
|
2856
2856
|
p,
|
|
2857
|
-
|
|
2857
|
+
_
|
|
2858
2858
|
);
|
|
2859
2859
|
let v = Go[p] ?? p;
|
|
2860
|
-
if (
|
|
2861
|
-
for (const [C, k] of Object.entries(
|
|
2860
|
+
if (_)
|
|
2861
|
+
for (const [C, k] of Object.entries(_))
|
|
2862
2862
|
v = v.replaceAll(`{{${C}}}`, k);
|
|
2863
2863
|
return v;
|
|
2864
2864
|
},
|
|
2865
2865
|
[l]
|
|
2866
2866
|
), d = xr({ control: a, name: "status" }), u = s("avatar_url") ?? null, m = i.useMemo(
|
|
2867
|
-
() =>
|
|
2868
|
-
name: c(
|
|
2867
|
+
() => Qo.map((p) => ({
|
|
2868
|
+
name: c(Yo[p]),
|
|
2869
2869
|
value: p
|
|
2870
2870
|
})),
|
|
2871
2871
|
[c]
|
|
@@ -2875,7 +2875,7 @@ const Go = {
|
|
|
2875
2875
|
value: d
|
|
2876
2876
|
},
|
|
2877
2877
|
...m
|
|
2878
|
-
] : m, [d, m]), f = s("first_name")?.[0] ?? "",
|
|
2878
|
+
] : m, [d, m]), f = s("first_name")?.[0] ?? "", h = s("last_name")?.[0] ?? "", y = [f, h].filter(Boolean).join("").toUpperCase() || "?";
|
|
2879
2879
|
return /* @__PURE__ */ t.jsxs("div", { className: D("space-y-6", e), children: [
|
|
2880
2880
|
r && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-center gap-3", children: [
|
|
2881
2881
|
/* @__PURE__ */ t.jsx("div", { className: "border-border bg-background relative size-20 shrink-0 overflow-hidden rounded-full border-2", children: u ? /* @__PURE__ */ t.jsx(
|
|
@@ -2980,15 +2980,15 @@ const Go = {
|
|
|
2980
2980
|
name: "status",
|
|
2981
2981
|
render: ({ field: p }) => /* @__PURE__ */ t.jsxs(me, { children: [
|
|
2982
2982
|
/* @__PURE__ */ t.jsx(pe, { className: "font-inter text-foreground font-medium", children: c("label_status") }),
|
|
2983
|
-
/* @__PURE__ */ t.jsxs(
|
|
2984
|
-
/* @__PURE__ */ t.jsx(fe, { children: /* @__PURE__ */ t.jsx(
|
|
2983
|
+
/* @__PURE__ */ t.jsxs(ia, { value: p.value ?? "", onValueChange: p.onChange, children: [
|
|
2984
|
+
/* @__PURE__ */ t.jsx(fe, { children: /* @__PURE__ */ t.jsx(la, { className: "w-full", children: /* @__PURE__ */ t.jsx(ca, { placeholder: c("placeholder_status") }) }) }),
|
|
2985
2985
|
/* @__PURE__ */ t.jsx(
|
|
2986
|
-
|
|
2986
|
+
da,
|
|
2987
2987
|
{
|
|
2988
2988
|
position: "popper",
|
|
2989
2989
|
sideOffset: 4,
|
|
2990
2990
|
className: "z-[1060]",
|
|
2991
|
-
children: g.map((
|
|
2991
|
+
children: g.map((_) => /* @__PURE__ */ t.jsx(ua, { value: _.value, children: _.name }, _.value))
|
|
2992
2992
|
}
|
|
2993
2993
|
)
|
|
2994
2994
|
] }),
|
|
@@ -3084,11 +3084,11 @@ const Go = {
|
|
|
3084
3084
|
render: ({ field: p }) => /* @__PURE__ */ t.jsxs(me, { children: [
|
|
3085
3085
|
/* @__PURE__ */ t.jsx(pe, { className: "font-inter text-foreground font-medium", children: c("label_country") }),
|
|
3086
3086
|
/* @__PURE__ */ t.jsx(fe, { children: /* @__PURE__ */ t.jsx(
|
|
3087
|
-
|
|
3087
|
+
Ca,
|
|
3088
3088
|
{
|
|
3089
|
-
options: n.map((
|
|
3090
|
-
label:
|
|
3091
|
-
value:
|
|
3089
|
+
options: n.map((_) => ({
|
|
3090
|
+
label: _.name,
|
|
3091
|
+
value: _.value
|
|
3092
3092
|
})),
|
|
3093
3093
|
value: p.value ?? "",
|
|
3094
3094
|
onValueChange: p.onChange,
|
|
@@ -3126,7 +3126,7 @@ function Wo(e = "contacts", n) {
|
|
|
3126
3126
|
});
|
|
3127
3127
|
}
|
|
3128
3128
|
function Xo(e, n = "contacts", r) {
|
|
3129
|
-
const a =
|
|
3129
|
+
const a = Ye();
|
|
3130
3130
|
return Wo(n, {
|
|
3131
3131
|
onSuccess: () => {
|
|
3132
3132
|
O({
|
|
@@ -3143,7 +3143,7 @@ function Xo(e, n = "contacts", r) {
|
|
|
3143
3143
|
}
|
|
3144
3144
|
});
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3146
|
+
function Jo(e = "contacts", n) {
|
|
3147
3147
|
const r = W(), a = xe();
|
|
3148
3148
|
return re({
|
|
3149
3149
|
mutationFn: (s) => a.deleteContact(s),
|
|
@@ -3157,9 +3157,9 @@ function Zo(e = "contacts", n) {
|
|
|
3157
3157
|
}
|
|
3158
3158
|
});
|
|
3159
3159
|
}
|
|
3160
|
-
function
|
|
3161
|
-
const r =
|
|
3162
|
-
return
|
|
3160
|
+
function Zo(e = "contacts", n) {
|
|
3161
|
+
const r = Ye();
|
|
3162
|
+
return Jo(e, {
|
|
3163
3163
|
onSuccess: () => {
|
|
3164
3164
|
O({
|
|
3165
3165
|
title: r?.t("contact_deleted") ?? "Contact deleted successfully",
|
|
@@ -3175,7 +3175,7 @@ function Jo(e = "contacts", n) {
|
|
|
3175
3175
|
}
|
|
3176
3176
|
});
|
|
3177
3177
|
}
|
|
3178
|
-
function
|
|
3178
|
+
function Jn(e) {
|
|
3179
3179
|
return Pr({
|
|
3180
3180
|
first_name: ie().min(1, {
|
|
3181
3181
|
message: e?.first_name_required ?? "First name is required"
|
|
@@ -3196,34 +3196,34 @@ function Zn(e) {
|
|
|
3196
3196
|
metadata: Rt(ie(), It()).optional()
|
|
3197
3197
|
});
|
|
3198
3198
|
}
|
|
3199
|
-
const Pt =
|
|
3199
|
+
const Pt = Jn();
|
|
3200
3200
|
function ei(e) {
|
|
3201
|
-
return
|
|
3201
|
+
return Jn(e).passthrough();
|
|
3202
3202
|
}
|
|
3203
3203
|
Pt.passthrough();
|
|
3204
3204
|
const ti = Object.keys(
|
|
3205
3205
|
Pt.shape
|
|
3206
3206
|
);
|
|
3207
|
-
function
|
|
3207
|
+
function Zn(e, n) {
|
|
3208
3208
|
if (Object.is(e, n)) return !0;
|
|
3209
3209
|
if (typeof e != "object" || e === null || typeof n != "object" || n === null) return !1;
|
|
3210
3210
|
const r = Object.entries(e), a = Object.entries(n);
|
|
3211
3211
|
return r.length === a.length && r.every(
|
|
3212
|
-
([s, o]) => Object.hasOwn(n, s) &&
|
|
3212
|
+
([s, o]) => Object.hasOwn(n, s) && Zn(o, n[s])
|
|
3213
3213
|
);
|
|
3214
3214
|
}
|
|
3215
3215
|
function ni(e, n) {
|
|
3216
|
-
const r =
|
|
3216
|
+
const r = Ye(), a = n?.queryKeyPrefix ?? "contacts", { data: s, isLoading: o } = Vo(e, a), { data: l } = ve({
|
|
3217
3217
|
queryKey: n?.countriesQueryKey ?? ["countries"],
|
|
3218
3218
|
queryFn: n?.getCountries ?? (() => Promise.resolve([])),
|
|
3219
3219
|
enabled: !!n?.getCountries
|
|
3220
3220
|
}), c = i.useMemo(
|
|
3221
3221
|
() => [
|
|
3222
|
-
...l?.map((
|
|
3223
|
-
name:
|
|
3224
|
-
value:
|
|
3222
|
+
...l?.map((_) => ({
|
|
3223
|
+
name: _.name,
|
|
3224
|
+
value: _.iso ?? _.id.toString()
|
|
3225
3225
|
})) ?? []
|
|
3226
|
-
].sort((
|
|
3226
|
+
].sort((_, v) => _.name.localeCompare(v.name)),
|
|
3227
3227
|
[l]
|
|
3228
3228
|
), d = s?.contact, u = i.useMemo(() => {
|
|
3229
3229
|
if (d)
|
|
@@ -3246,26 +3246,26 @@ function ni(e, n) {
|
|
|
3246
3246
|
onSuccess: () => {
|
|
3247
3247
|
g.reset(g.getValues()), n?.onSaveSuccess?.();
|
|
3248
3248
|
}
|
|
3249
|
-
}),
|
|
3249
|
+
}), h = Zo(a, {
|
|
3250
3250
|
onSuccess: () => {
|
|
3251
3251
|
n?.onDeleteSuccess?.();
|
|
3252
3252
|
}
|
|
3253
3253
|
}), y = i.useCallback(() => {
|
|
3254
3254
|
g.handleSubmit(
|
|
3255
|
-
(
|
|
3255
|
+
(_) => {
|
|
3256
3256
|
const v = {};
|
|
3257
3257
|
for (const C of ti)
|
|
3258
|
-
C === "affiliate" &&
|
|
3259
|
-
|
|
3258
|
+
C === "affiliate" && Zn(
|
|
3259
|
+
_.affiliate,
|
|
3260
3260
|
g.formState.defaultValues?.affiliate
|
|
3261
|
-
) || C in
|
|
3261
|
+
) || C in _ && (v[C] = _[C]);
|
|
3262
3262
|
f.mutate({
|
|
3263
3263
|
id: e,
|
|
3264
3264
|
data: v
|
|
3265
3265
|
});
|
|
3266
3266
|
},
|
|
3267
|
-
(
|
|
3268
|
-
const v = Object.entries(
|
|
3267
|
+
(_) => {
|
|
3268
|
+
const v = Object.entries(_).map(([C, k]) => {
|
|
3269
3269
|
const j = typeof k?.message == "string" ? k.message : "invalid";
|
|
3270
3270
|
return `${C.replace(/_/g, " ")}: ${j}`;
|
|
3271
3271
|
}).join(", ");
|
|
@@ -3277,8 +3277,8 @@ function ni(e, n) {
|
|
|
3277
3277
|
}
|
|
3278
3278
|
)();
|
|
3279
3279
|
}, [g, f, e, r]), p = i.useCallback(() => {
|
|
3280
|
-
|
|
3281
|
-
}, [
|
|
3280
|
+
h.mutate(e);
|
|
3281
|
+
}, [h, e]);
|
|
3282
3282
|
return {
|
|
3283
3283
|
contact: d,
|
|
3284
3284
|
isLoading: o,
|
|
@@ -3286,15 +3286,15 @@ function ni(e, n) {
|
|
|
3286
3286
|
countryOptions: c,
|
|
3287
3287
|
isDirty: g.formState.isDirty,
|
|
3288
3288
|
isSubmitting: f.isPending,
|
|
3289
|
-
isDeleting:
|
|
3289
|
+
isDeleting: h.isPending,
|
|
3290
3290
|
onSave: y,
|
|
3291
3291
|
onDelete: p
|
|
3292
3292
|
};
|
|
3293
3293
|
}
|
|
3294
3294
|
function ri(e) {
|
|
3295
|
-
const n =
|
|
3295
|
+
const n = Qe();
|
|
3296
3296
|
return ve({
|
|
3297
|
-
queryKey:
|
|
3297
|
+
queryKey: Q.tasks(e),
|
|
3298
3298
|
queryFn: () => n.listTasks(e),
|
|
3299
3299
|
enabled: !!e,
|
|
3300
3300
|
select: (r) => r.tasks
|
|
@@ -3303,7 +3303,7 @@ function ri(e) {
|
|
|
3303
3303
|
function ai(e) {
|
|
3304
3304
|
const n = it();
|
|
3305
3305
|
return ve({
|
|
3306
|
-
queryKey:
|
|
3306
|
+
queryKey: Q.notes(e),
|
|
3307
3307
|
queryFn: () => n.listNotes(e),
|
|
3308
3308
|
enabled: !!e,
|
|
3309
3309
|
select: (r) => r.notes
|
|
@@ -3317,7 +3317,7 @@ function er() {
|
|
|
3317
3317
|
return e.createGroup(a);
|
|
3318
3318
|
},
|
|
3319
3319
|
onSuccess: () => {
|
|
3320
|
-
n.invalidateQueries({ queryKey:
|
|
3320
|
+
n.invalidateQueries({ queryKey: Q.groups() });
|
|
3321
3321
|
},
|
|
3322
3322
|
onError: (a) => {
|
|
3323
3323
|
O({
|
|
@@ -3393,7 +3393,7 @@ function ui({
|
|
|
3393
3393
|
onCreateGroup: a,
|
|
3394
3394
|
isSaving: s = !1
|
|
3395
3395
|
}) {
|
|
3396
|
-
const { t: o } = z(), [l, c] = i.useState(!1), [d, u] = i.useState([]), [m, g] = i.useState(""), [f,
|
|
3396
|
+
const { t: o } = z(), [l, c] = i.useState(!1), [d, u] = i.useState([]), [m, g] = i.useState(""), [f, h] = i.useState([]), [y, p] = i.useState(/* @__PURE__ */ new Set()), [_, v] = i.useState(/* @__PURE__ */ new Set()), [C, k] = i.useState(e), j = i.useRef(e);
|
|
3397
3397
|
i.useEffect(() => {
|
|
3398
3398
|
const b = j.current, A = b.filter((T) => !e.includes(T)), M = e.filter((T) => !b.includes(T));
|
|
3399
3399
|
let B;
|
|
@@ -3408,7 +3408,7 @@ function ui({
|
|
|
3408
3408
|
return () => clearTimeout(b);
|
|
3409
3409
|
}, [y]);
|
|
3410
3410
|
const x = i.useCallback(() => {
|
|
3411
|
-
u([...e]),
|
|
3411
|
+
u([...e]), h([...e]), g(""), c(!0);
|
|
3412
3412
|
}, [e]), P = i.useCallback(() => {
|
|
3413
3413
|
c(!1), g("");
|
|
3414
3414
|
}, []), R = i.useCallback(() => {
|
|
@@ -3430,7 +3430,7 @@ function ui({
|
|
|
3430
3430
|
const b = m.toLowerCase();
|
|
3431
3431
|
return b ? S.filter((A) => A.toLowerCase().includes(b)) : S;
|
|
3432
3432
|
}, [S, m]), $ = !!a && m.trim() && !S.some((b) => b.toLowerCase() === m.trim().toLowerCase());
|
|
3433
|
-
return /* @__PURE__ */ t.jsxs(
|
|
3433
|
+
return /* @__PURE__ */ t.jsxs(hn, { open: l, onOpenChange: (b) => !b && P(), children: [
|
|
3434
3434
|
/* @__PURE__ */ t.jsx(xn, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
3435
3435
|
"div",
|
|
3436
3436
|
{
|
|
@@ -3448,7 +3448,7 @@ function ui({
|
|
|
3448
3448
|
className: D(
|
|
3449
3449
|
"bg-muted text-foreground inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-all duration-300",
|
|
3450
3450
|
y.has(b) && "animate-[badge-in_0.3s_ease-out,highlight-fade_2s_ease-out]",
|
|
3451
|
-
|
|
3451
|
+
_.has(b) && "animate-[badge-out_0.3s_ease-in_forwards]"
|
|
3452
3452
|
),
|
|
3453
3453
|
children: b
|
|
3454
3454
|
},
|
|
@@ -3460,7 +3460,7 @@ function ui({
|
|
|
3460
3460
|
className: D(
|
|
3461
3461
|
"bg-muted text-muted-foreground hover:bg-muted/70 inline-flex items-center justify-center rounded-full px-2 py-0.5 text-xs font-medium transition-colors"
|
|
3462
3462
|
),
|
|
3463
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3463
|
+
children: /* @__PURE__ */ t.jsx(he, { className: "size-3.5" })
|
|
3464
3464
|
}
|
|
3465
3465
|
)
|
|
3466
3466
|
]
|
|
@@ -3528,7 +3528,7 @@ function ui({
|
|
|
3528
3528
|
},
|
|
3529
3529
|
className: "hover:bg-muted text-primary flex w-full items-center gap-2 px-3 py-2 text-left text-sm font-medium",
|
|
3530
3530
|
children: [
|
|
3531
|
-
/* @__PURE__ */ t.jsx(
|
|
3531
|
+
/* @__PURE__ */ t.jsx(he, { className: "size-3.5" }),
|
|
3532
3532
|
o("groups_inline_create", { name: m.trim() })
|
|
3533
3533
|
]
|
|
3534
3534
|
}
|
|
@@ -3594,13 +3594,13 @@ function mi({
|
|
|
3594
3594
|
] })
|
|
3595
3595
|
] }),
|
|
3596
3596
|
/* @__PURE__ */ t.jsxs("div", { className: "flex shrink-0 items-center gap-6 md:gap-8", children: [
|
|
3597
|
-
/* @__PURE__ */ t.jsx(
|
|
3597
|
+
/* @__PURE__ */ t.jsx(Yt, { label: d("tab_tasks"), value: n, icon: Ka }),
|
|
3598
3598
|
/* @__PURE__ */ t.jsx("div", { className: "bg-border h-10 w-px", "aria-hidden": "true" }),
|
|
3599
|
-
/* @__PURE__ */ t.jsx(
|
|
3599
|
+
/* @__PURE__ */ t.jsx(Yt, { label: d("tab_notes"), value: r, icon: fa })
|
|
3600
3600
|
] })
|
|
3601
3601
|
] });
|
|
3602
3602
|
}
|
|
3603
|
-
function
|
|
3603
|
+
function Yt({ label: e, value: n, icon: r }) {
|
|
3604
3604
|
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col items-start gap-1", children: [
|
|
3605
3605
|
/* @__PURE__ */ t.jsxs("div", { className: "text-muted-foreground flex items-center gap-1.5", children: [
|
|
3606
3606
|
/* @__PURE__ */ t.jsx(r, { className: "size-3.5", "aria-hidden": !0 }),
|
|
@@ -3687,7 +3687,7 @@ function xt({
|
|
|
3687
3687
|
/* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground/70 group-hover:text-muted-foreground truncate text-sm italic transition-colors", children: f })
|
|
3688
3688
|
] }),
|
|
3689
3689
|
/* @__PURE__ */ t.jsx(
|
|
3690
|
-
|
|
3690
|
+
he,
|
|
3691
3691
|
{
|
|
3692
3692
|
className: "text-muted-foreground/40 group-hover:text-foreground size-4 shrink-0 transition-colors",
|
|
3693
3693
|
"aria-hidden": !0
|
|
@@ -3702,7 +3702,7 @@ function xt({
|
|
|
3702
3702
|
/* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground/70 truncate text-sm italic", children: f })
|
|
3703
3703
|
] }),
|
|
3704
3704
|
/* @__PURE__ */ t.jsx(
|
|
3705
|
-
|
|
3705
|
+
he,
|
|
3706
3706
|
{
|
|
3707
3707
|
className: "text-muted-foreground/40 size-4 shrink-0",
|
|
3708
3708
|
"aria-hidden": !0
|
|
@@ -3739,7 +3739,7 @@ function xt({
|
|
|
3739
3739
|
] });
|
|
3740
3740
|
}
|
|
3741
3741
|
function gi(e) {
|
|
3742
|
-
const n = W(), r =
|
|
3742
|
+
const n = W(), r = Qe(), { t: a } = z();
|
|
3743
3743
|
return re({
|
|
3744
3744
|
mutationFn: ({
|
|
3745
3745
|
taskId: s,
|
|
@@ -3749,7 +3749,7 @@ function gi(e) {
|
|
|
3749
3749
|
}),
|
|
3750
3750
|
onSuccess: () => {
|
|
3751
3751
|
n.invalidateQueries({
|
|
3752
|
-
queryKey:
|
|
3752
|
+
queryKey: Q.tasks(e)
|
|
3753
3753
|
});
|
|
3754
3754
|
},
|
|
3755
3755
|
onError: (s) => {
|
|
@@ -3761,13 +3761,13 @@ function gi(e) {
|
|
|
3761
3761
|
}
|
|
3762
3762
|
});
|
|
3763
3763
|
}
|
|
3764
|
-
function
|
|
3765
|
-
const r = W(), a =
|
|
3764
|
+
function _i(e, n) {
|
|
3765
|
+
const r = W(), a = Qe(), { t: s } = z();
|
|
3766
3766
|
return re({
|
|
3767
3767
|
mutationFn: (o) => a.deleteTask(o, e),
|
|
3768
3768
|
onSuccess: () => {
|
|
3769
3769
|
O({ title: s("task_deleted"), type: "success" }), r.invalidateQueries({
|
|
3770
|
-
queryKey:
|
|
3770
|
+
queryKey: Q.tasks(e)
|
|
3771
3771
|
}), n?.onSuccess?.();
|
|
3772
3772
|
},
|
|
3773
3773
|
onError: (o) => {
|
|
@@ -3779,8 +3779,8 @@ function hi(e, n) {
|
|
|
3779
3779
|
}
|
|
3780
3780
|
});
|
|
3781
3781
|
}
|
|
3782
|
-
function
|
|
3783
|
-
const r = W(), a =
|
|
3782
|
+
function hi(e, n) {
|
|
3783
|
+
const r = W(), a = Qe(), { t: s } = z();
|
|
3784
3784
|
return re({
|
|
3785
3785
|
mutationFn: ({
|
|
3786
3786
|
taskId: o,
|
|
@@ -3788,7 +3788,7 @@ function _i(e, n) {
|
|
|
3788
3788
|
}) => a.updateTask(o, e, l),
|
|
3789
3789
|
onSuccess: () => {
|
|
3790
3790
|
O({ title: s("task_updated"), type: "success" }), r.invalidateQueries({
|
|
3791
|
-
queryKey:
|
|
3791
|
+
queryKey: Q.tasks(e)
|
|
3792
3792
|
}), n?.onSuccess?.();
|
|
3793
3793
|
},
|
|
3794
3794
|
onError: (o) => {
|
|
@@ -3836,12 +3836,12 @@ function xi({
|
|
|
3836
3836
|
showTitle: d = !0,
|
|
3837
3837
|
editorClassName: u
|
|
3838
3838
|
}) {
|
|
3839
|
-
const { t: m } = z(), g = e ?? m("editor_default_title"), f = n ?? m("editor_default_body_placeholder"), [
|
|
3839
|
+
const { t: m } = z(), g = e ?? m("editor_default_title"), f = n ?? m("editor_default_body_placeholder"), [h, y] = i.useState(c), p = i.useRef(c), _ = i.useRef(null);
|
|
3840
3840
|
i.useEffect(() => {
|
|
3841
|
-
p.current =
|
|
3842
|
-
}, [
|
|
3841
|
+
p.current = h;
|
|
3842
|
+
}, [h]);
|
|
3843
3843
|
const v = d ? s || o ? `<h1>${s ?? ""}</h1>${o ?? ""}` : void 0 : o || void 0, C = [
|
|
3844
|
-
|
|
3844
|
+
ka.configure({
|
|
3845
3845
|
heading: d ? !1 : { levels: [] },
|
|
3846
3846
|
bulletList: {
|
|
3847
3847
|
keepMarks: !0,
|
|
@@ -3852,16 +3852,16 @@ function xi({
|
|
|
3852
3852
|
keepAttributes: !1
|
|
3853
3853
|
}
|
|
3854
3854
|
}),
|
|
3855
|
-
...d ? [
|
|
3856
|
-
|
|
3855
|
+
...d ? [wa.configure({ levels: [1] })] : [],
|
|
3856
|
+
Sa.configure({
|
|
3857
3857
|
placeholder: ({ node: S }) => S.type.name === "heading" ? g : f
|
|
3858
3858
|
}),
|
|
3859
|
-
|
|
3859
|
+
ha.configure({
|
|
3860
3860
|
types: d ? ["heading", "paragraph"] : ["paragraph"],
|
|
3861
3861
|
alignments: ["left", "center", "right", "justify"]
|
|
3862
3862
|
}),
|
|
3863
3863
|
xa
|
|
3864
|
-
], j =
|
|
3864
|
+
], j = Ma({
|
|
3865
3865
|
extensions: C,
|
|
3866
3866
|
content: v ?? (d ? {
|
|
3867
3867
|
type: "doc",
|
|
@@ -3880,17 +3880,17 @@ function xi({
|
|
|
3880
3880
|
if (!(!j || !r))
|
|
3881
3881
|
if (d) {
|
|
3882
3882
|
const { title: S, body: L } = Vt(j);
|
|
3883
|
-
r({ title: S, body: L, dueDate:
|
|
3883
|
+
r({ title: S, body: L, dueDate: h });
|
|
3884
3884
|
} else {
|
|
3885
3885
|
const S = Wt(j);
|
|
3886
|
-
r({ title: "", body: S, dueDate:
|
|
3886
|
+
r({ title: "", body: S, dueDate: h });
|
|
3887
3887
|
}
|
|
3888
3888
|
};
|
|
3889
3889
|
i.useEffect(() => {
|
|
3890
3890
|
x();
|
|
3891
3891
|
}, [j]), i.useEffect(() => {
|
|
3892
3892
|
x();
|
|
3893
|
-
}, [
|
|
3893
|
+
}, [h]);
|
|
3894
3894
|
const P = "flex h-7 w-7 items-center justify-center rounded text-xs transition-colors", R = "bg-muted text-primary", F = "text-muted-foreground hover:bg-muted/50", I = /* @__PURE__ */ t.jsx("div", { className: "bg-border mx-1 h-5 w-px" });
|
|
3895
3895
|
return /* @__PURE__ */ t.jsxs(
|
|
3896
3896
|
"div",
|
|
@@ -3957,7 +3957,7 @@ function xi({
|
|
|
3957
3957
|
j?.isActive({ textAlign: "left" }) ? R : F
|
|
3958
3958
|
),
|
|
3959
3959
|
title: m("toolbar_align_left"),
|
|
3960
|
-
children: /* @__PURE__ */ t.jsx(
|
|
3960
|
+
children: /* @__PURE__ */ t.jsx(Ta, { className: "size-3.5" })
|
|
3961
3961
|
}
|
|
3962
3962
|
),
|
|
3963
3963
|
/* @__PURE__ */ t.jsx(
|
|
@@ -4010,7 +4010,7 @@ function xi({
|
|
|
4010
4010
|
j?.isActive("bulletList") ? R : F
|
|
4011
4011
|
),
|
|
4012
4012
|
title: m("toolbar_bullet_list"),
|
|
4013
|
-
children: /* @__PURE__ */ t.jsx(
|
|
4013
|
+
children: /* @__PURE__ */ t.jsx(Ea, { className: "size-3.5" })
|
|
4014
4014
|
}
|
|
4015
4015
|
),
|
|
4016
4016
|
/* @__PURE__ */ t.jsx(
|
|
@@ -4023,14 +4023,14 @@ function xi({
|
|
|
4023
4023
|
j?.isActive("orderedList") ? R : F
|
|
4024
4024
|
),
|
|
4025
4025
|
title: m("toolbar_ordered_list"),
|
|
4026
|
-
children: /* @__PURE__ */ t.jsx(
|
|
4026
|
+
children: /* @__PURE__ */ t.jsx(Da, { className: "size-3.5" })
|
|
4027
4027
|
}
|
|
4028
4028
|
),
|
|
4029
4029
|
l && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
4030
4030
|
I,
|
|
4031
|
-
|
|
4031
|
+
h ? /* @__PURE__ */ t.jsxs("div", { className: "bg-primary/10 flex items-center gap-1 rounded px-2 py-1", children: [
|
|
4032
4032
|
/* @__PURE__ */ t.jsx(Se, { className: "text-primary size-3.5" }),
|
|
4033
|
-
/* @__PURE__ */ t.jsx("span", { className: "text-primary text-xs font-medium", children: dt(
|
|
4033
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-primary text-xs font-medium", children: dt(h) }),
|
|
4034
4034
|
/* @__PURE__ */ t.jsx(
|
|
4035
4035
|
"button",
|
|
4036
4036
|
{
|
|
@@ -4046,7 +4046,7 @@ function xi({
|
|
|
4046
4046
|
"button",
|
|
4047
4047
|
{
|
|
4048
4048
|
type: "button",
|
|
4049
|
-
onClick: () =>
|
|
4049
|
+
onClick: () => _.current?.showPicker(),
|
|
4050
4050
|
className: "text-muted-foreground hover:bg-muted hover:text-foreground flex h-7 cursor-pointer items-center gap-1 rounded px-2 text-xs font-medium transition-colors",
|
|
4051
4051
|
children: [
|
|
4052
4052
|
/* @__PURE__ */ t.jsx(Se, { className: "size-3.5" }),
|
|
@@ -4057,7 +4057,7 @@ function xi({
|
|
|
4057
4057
|
/* @__PURE__ */ t.jsx(
|
|
4058
4058
|
"input",
|
|
4059
4059
|
{
|
|
4060
|
-
ref:
|
|
4060
|
+
ref: _,
|
|
4061
4061
|
type: "date",
|
|
4062
4062
|
className: "invisible absolute size-0",
|
|
4063
4063
|
onChange: (S) => {
|
|
@@ -4072,7 +4072,7 @@ function xi({
|
|
|
4072
4072
|
] })
|
|
4073
4073
|
] }),
|
|
4074
4074
|
/* @__PURE__ */ t.jsx(
|
|
4075
|
-
|
|
4075
|
+
Aa,
|
|
4076
4076
|
{
|
|
4077
4077
|
editor: j,
|
|
4078
4078
|
className: u ?? "min-h-[60vh] flex-1 overflow-y-auto p-4"
|
|
@@ -4139,9 +4139,9 @@ function tr({
|
|
|
4139
4139
|
onToggleComplete: g,
|
|
4140
4140
|
isTogglePending: f = !1
|
|
4141
4141
|
}) {
|
|
4142
|
-
const { t:
|
|
4142
|
+
const { t: h, locale: y } = z(), { isMobile: p } = _e(), [_, v] = i.useState(s), [C, k] = i.useState(o), j = i.useRef(null), [x, P] = i.useState(l), [R, F] = i.useState(!1), I = h(a === "note" ? "modal_note_label" : "modal_task_label"), S = r === "edit" ? h("modal_edit_type", { type: I }) : h("modal_new_type", { type: I }), L = a === "note", $ = !!_.trim() && (!L || !!C.trim()) && !u, b = () => {
|
|
4143
4143
|
$ && d({
|
|
4144
|
-
title:
|
|
4144
|
+
title: _.trim(),
|
|
4145
4145
|
body: C,
|
|
4146
4146
|
dueDate: x
|
|
4147
4147
|
});
|
|
@@ -4150,8 +4150,8 @@ function tr({
|
|
|
4150
4150
|
/* @__PURE__ */ t.jsx(
|
|
4151
4151
|
ae,
|
|
4152
4152
|
{
|
|
4153
|
-
placeholder:
|
|
4154
|
-
value:
|
|
4153
|
+
placeholder: h("modal_type_title_placeholder", { type: I }),
|
|
4154
|
+
value: _,
|
|
4155
4155
|
onChange: (M) => v(M.target.value)
|
|
4156
4156
|
}
|
|
4157
4157
|
),
|
|
@@ -4159,7 +4159,7 @@ function tr({
|
|
|
4159
4159
|
xi,
|
|
4160
4160
|
{
|
|
4161
4161
|
showTitle: !1,
|
|
4162
|
-
bodyPlaceholder:
|
|
4162
|
+
bodyPlaceholder: h("editor_start_writing"),
|
|
4163
4163
|
initialBody: o,
|
|
4164
4164
|
editorClassName: "min-h-[200px] flex-1 overflow-y-auto p-4",
|
|
4165
4165
|
onChange: (M) => {
|
|
@@ -4170,7 +4170,7 @@ function tr({
|
|
|
4170
4170
|
c && /* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-2", children: x ? /* @__PURE__ */ t.jsxs("div", { className: "bg-primary/10 inline-flex items-center gap-1.5 rounded-md px-2.5 py-1.5", children: [
|
|
4171
4171
|
/* @__PURE__ */ t.jsx(Se, { className: "text-primary size-3.5" }),
|
|
4172
4172
|
/* @__PURE__ */ t.jsxs("span", { className: "text-primary text-sm font-medium", children: [
|
|
4173
|
-
|
|
4173
|
+
h("activity_due"),
|
|
4174
4174
|
" ",
|
|
4175
4175
|
dt(x, y)
|
|
4176
4176
|
] }),
|
|
@@ -4181,9 +4181,9 @@ function tr({
|
|
|
4181
4181
|
onClick: () => {
|
|
4182
4182
|
P(void 0), F(!1);
|
|
4183
4183
|
},
|
|
4184
|
-
"aria-label":
|
|
4184
|
+
"aria-label": h("editor_remove_due_date"),
|
|
4185
4185
|
className: "text-primary/60 hover:text-primary ml-1",
|
|
4186
|
-
title:
|
|
4186
|
+
title: h("editor_remove_due_date"),
|
|
4187
4187
|
children: /* @__PURE__ */ t.jsx(Ge, { className: "size-3" })
|
|
4188
4188
|
}
|
|
4189
4189
|
)
|
|
@@ -4207,7 +4207,7 @@ function tr({
|
|
|
4207
4207
|
className: "text-muted-foreground hover:text-foreground hover:bg-muted inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition-colors",
|
|
4208
4208
|
children: [
|
|
4209
4209
|
/* @__PURE__ */ t.jsx(Se, { className: "size-3.5" }),
|
|
4210
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
4210
|
+
/* @__PURE__ */ t.jsx("span", { children: h("editor_add_due_date") })
|
|
4211
4211
|
]
|
|
4212
4212
|
}
|
|
4213
4213
|
),
|
|
@@ -4219,7 +4219,7 @@ function tr({
|
|
|
4219
4219
|
value: Vn(x),
|
|
4220
4220
|
tabIndex: R ? 0 : -1,
|
|
4221
4221
|
"aria-hidden": !R,
|
|
4222
|
-
"aria-label":
|
|
4222
|
+
"aria-label": h("editor_due_date"),
|
|
4223
4223
|
className: D(
|
|
4224
4224
|
R ? "rounded-md border p-2 text-sm" : "sr-only"
|
|
4225
4225
|
),
|
|
@@ -4238,15 +4238,15 @@ function tr({
|
|
|
4238
4238
|
onClick: g,
|
|
4239
4239
|
disabled: f,
|
|
4240
4240
|
className: "mr-auto",
|
|
4241
|
-
children:
|
|
4241
|
+
children: h(m ? "modal_mark_incomplete" : "modal_mark_complete")
|
|
4242
4242
|
}
|
|
4243
4243
|
),
|
|
4244
|
-
/* @__PURE__ */ t.jsx(q, { variant: "outline", onClick: () => n(!1), children:
|
|
4245
|
-
/* @__PURE__ */ t.jsx(q, { onClick: b, disabled: !$, children:
|
|
4244
|
+
/* @__PURE__ */ t.jsx(q, { variant: "outline", onClick: () => n(!1), children: h("cancel") }),
|
|
4245
|
+
/* @__PURE__ */ t.jsx(q, { onClick: b, disabled: !$, children: h(u ? "saving" : "save") })
|
|
4246
4246
|
] })
|
|
4247
4247
|
] });
|
|
4248
4248
|
return p ? /* @__PURE__ */ t.jsx(
|
|
4249
|
-
|
|
4249
|
+
tt,
|
|
4250
4250
|
{
|
|
4251
4251
|
open: e,
|
|
4252
4252
|
onOpenChange: n,
|
|
@@ -4295,7 +4295,7 @@ function ji({
|
|
|
4295
4295
|
onEdit: r,
|
|
4296
4296
|
onDeleteClick: a
|
|
4297
4297
|
}) {
|
|
4298
|
-
const { t: s, locale: o } = z(), { isMobile: l } =
|
|
4298
|
+
const { t: s, locale: o } = z(), { isMobile: l } = _e(), [c, d] = i.useState(!1), u = !!e.completed_at, { title: m, body: g } = Qn(e.body ?? ""), f = e.created_at ? bi(e.created_at, s) : "", h = e.due_at ? yi(e.due_at, u, s, o) : null;
|
|
4299
4299
|
return /* @__PURE__ */ t.jsxs(
|
|
4300
4300
|
"div",
|
|
4301
4301
|
{
|
|
@@ -4345,17 +4345,17 @@ function ji({
|
|
|
4345
4345
|
children: g
|
|
4346
4346
|
}
|
|
4347
4347
|
),
|
|
4348
|
-
(
|
|
4349
|
-
|
|
4348
|
+
(h || f) && /* @__PURE__ */ t.jsxs("div", { className: "mt-2.5 flex flex-wrap items-center gap-1.5", children: [
|
|
4349
|
+
h && /* @__PURE__ */ t.jsxs(
|
|
4350
4350
|
"span",
|
|
4351
4351
|
{
|
|
4352
4352
|
className: D(
|
|
4353
4353
|
"inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",
|
|
4354
|
-
vi[
|
|
4354
|
+
vi[h.tone]
|
|
4355
4355
|
),
|
|
4356
4356
|
children: [
|
|
4357
4357
|
/* @__PURE__ */ t.jsx(Se, { className: "size-3", "aria-hidden": "true" }),
|
|
4358
|
-
|
|
4358
|
+
h.label
|
|
4359
4359
|
]
|
|
4360
4360
|
}
|
|
4361
4361
|
),
|
|
@@ -4380,7 +4380,7 @@ function ji({
|
|
|
4380
4380
|
y.stopPropagation(), d(!0);
|
|
4381
4381
|
},
|
|
4382
4382
|
"aria-label": s("task_actions"),
|
|
4383
|
-
children: /* @__PURE__ */ t.jsx(
|
|
4383
|
+
children: /* @__PURE__ */ t.jsx(Je, { className: "size-4" })
|
|
4384
4384
|
}
|
|
4385
4385
|
),
|
|
4386
4386
|
/* @__PURE__ */ t.jsx(
|
|
@@ -4399,18 +4399,18 @@ function ji({
|
|
|
4399
4399
|
]
|
|
4400
4400
|
}
|
|
4401
4401
|
)
|
|
4402
|
-
] }) : /* @__PURE__ */ t.jsxs(
|
|
4403
|
-
/* @__PURE__ */ t.jsx(
|
|
4402
|
+
] }) : /* @__PURE__ */ t.jsxs(nt, { children: [
|
|
4403
|
+
/* @__PURE__ */ t.jsx(rt, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
4404
4404
|
q,
|
|
4405
4405
|
{
|
|
4406
4406
|
variant: "ghost",
|
|
4407
4407
|
size: "icon-xs",
|
|
4408
4408
|
onClick: (y) => y.stopPropagation(),
|
|
4409
4409
|
"aria-label": s("task_actions"),
|
|
4410
|
-
children: /* @__PURE__ */ t.jsx(
|
|
4410
|
+
children: /* @__PURE__ */ t.jsx(Je, { className: "size-4" })
|
|
4411
4411
|
}
|
|
4412
4412
|
) }),
|
|
4413
|
-
/* @__PURE__ */ t.jsx(
|
|
4413
|
+
/* @__PURE__ */ t.jsx(at, { align: "end", children: /* @__PURE__ */ t.jsx(
|
|
4414
4414
|
$e,
|
|
4415
4415
|
{
|
|
4416
4416
|
className: "text-destructive",
|
|
@@ -4432,20 +4432,20 @@ function Ni({
|
|
|
4432
4432
|
isLoading: n,
|
|
4433
4433
|
contactId: r
|
|
4434
4434
|
}) {
|
|
4435
|
-
const { t: a } = z(), { isMobile: s } =
|
|
4435
|
+
const { t: a } = z(), { isMobile: s } = _e(), [o, l] = i.useState(null), [c, d] = i.useState(null), u = gi(r), m = _i(r, {
|
|
4436
4436
|
onSuccess: () => l(null)
|
|
4437
|
-
}), g =
|
|
4437
|
+
}), g = hi(r, {
|
|
4438
4438
|
onSuccess: () => d(null)
|
|
4439
4439
|
}), f = (p) => {
|
|
4440
4440
|
if (!c) return;
|
|
4441
|
-
const
|
|
4441
|
+
const _ = p.body ? `${p.title}
|
|
4442
4442
|
|
|
4443
4443
|
${p.body}` : p.title;
|
|
4444
4444
|
g.mutate({
|
|
4445
4445
|
taskId: c.id,
|
|
4446
|
-
input: { body:
|
|
4446
|
+
input: { body: _, due_at: p.dueDate ?? null }
|
|
4447
4447
|
});
|
|
4448
|
-
},
|
|
4448
|
+
}, h = c ? Qn(c.body ?? "") : null, y = (p) => {
|
|
4449
4449
|
p || d(null);
|
|
4450
4450
|
};
|
|
4451
4451
|
return n ? /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-3", children: [1, 2, 3].map((p) => /* @__PURE__ */ t.jsx(
|
|
@@ -4472,8 +4472,8 @@ ${p.body}` : p.title;
|
|
|
4472
4472
|
onOpenChange: y,
|
|
4473
4473
|
mode: "edit",
|
|
4474
4474
|
type: "task",
|
|
4475
|
-
initialTitle:
|
|
4476
|
-
initialBody:
|
|
4475
|
+
initialTitle: h?.title ?? "",
|
|
4476
|
+
initialBody: h?.body ?? "",
|
|
4477
4477
|
initialDueDate: c?.due_at ?? void 0,
|
|
4478
4478
|
showDueDate: !0,
|
|
4479
4479
|
onSave: f,
|
|
@@ -4520,12 +4520,12 @@ ${p.body}` : p.title;
|
|
|
4520
4520
|
] });
|
|
4521
4521
|
}
|
|
4522
4522
|
function Ci(e, n) {
|
|
4523
|
-
const r = W(), a =
|
|
4523
|
+
const r = W(), a = Qe(), { t: s } = z();
|
|
4524
4524
|
return re({
|
|
4525
4525
|
mutationFn: (o) => a.createTask(e, o),
|
|
4526
4526
|
onSuccess: () => {
|
|
4527
4527
|
O({ title: s("task_created"), type: "success" }), r.invalidateQueries({
|
|
4528
|
-
queryKey:
|
|
4528
|
+
queryKey: Q.tasks(e)
|
|
4529
4529
|
}), n?.onSuccess?.();
|
|
4530
4530
|
},
|
|
4531
4531
|
onError: (o) => {
|
|
@@ -4556,7 +4556,7 @@ function ki({
|
|
|
4556
4556
|
onClick: () => a(!0),
|
|
4557
4557
|
className: "border-border/50 text-muted-foreground hover:border-foreground/30 hover:bg-muted/40 hover:text-foreground flex w-full items-center gap-3 rounded-xl border border-dashed px-5 py-4 text-sm font-medium transition-colors",
|
|
4558
4558
|
children: [
|
|
4559
|
-
/* @__PURE__ */ t.jsx(
|
|
4559
|
+
/* @__PURE__ */ t.jsx(he, { className: "size-4", "aria-hidden": "true" }),
|
|
4560
4560
|
n("new_task")
|
|
4561
4561
|
]
|
|
4562
4562
|
}
|
|
@@ -4568,7 +4568,7 @@ function wi(e, n) {
|
|
|
4568
4568
|
mutationFn: (o) => a.deleteNote(o, e),
|
|
4569
4569
|
onSuccess: () => {
|
|
4570
4570
|
O({ title: s("note_deleted"), type: "success" }), r.invalidateQueries({
|
|
4571
|
-
queryKey:
|
|
4571
|
+
queryKey: Q.notes(e)
|
|
4572
4572
|
}), n?.onSuccess?.();
|
|
4573
4573
|
},
|
|
4574
4574
|
onError: (o) => {
|
|
@@ -4589,7 +4589,7 @@ function Si(e, n) {
|
|
|
4589
4589
|
}) => a.updateNote(o, e, l),
|
|
4590
4590
|
onSuccess: () => {
|
|
4591
4591
|
O({ title: s("note_updated"), type: "success" }), r.invalidateQueries({
|
|
4592
|
-
queryKey:
|
|
4592
|
+
queryKey: Q.notes(e)
|
|
4593
4593
|
}), n?.onSuccess?.();
|
|
4594
4594
|
},
|
|
4595
4595
|
onError: (o) => {
|
|
@@ -4607,7 +4607,7 @@ function Mi(e, n) {
|
|
|
4607
4607
|
mutationFn: (o) => a.createNote(e, o),
|
|
4608
4608
|
onSuccess: () => {
|
|
4609
4609
|
O({ title: s("note_created"), type: "success" }), r.invalidateQueries({
|
|
4610
|
-
queryKey:
|
|
4610
|
+
queryKey: Q.notes(e)
|
|
4611
4611
|
}), n?.onSuccess?.();
|
|
4612
4612
|
},
|
|
4613
4613
|
onError: (o) => {
|
|
@@ -4638,9 +4638,9 @@ function Ei({
|
|
|
4638
4638
|
}), m = () => {
|
|
4639
4639
|
const f = r.trim();
|
|
4640
4640
|
if (!f || u.isPending) return;
|
|
4641
|
-
const
|
|
4641
|
+
const h = f.split(`
|
|
4642
4642
|
`)[0]?.slice(0, 120) ?? "Note";
|
|
4643
|
-
u.mutate({ title:
|
|
4643
|
+
u.mutate({ title: h, body: f });
|
|
4644
4644
|
}, g = r.trim().length > 0 && !u.isPending;
|
|
4645
4645
|
return /* @__PURE__ */ t.jsxs(
|
|
4646
4646
|
"div",
|
|
@@ -4703,7 +4703,7 @@ function Ai({
|
|
|
4703
4703
|
onEdit: n,
|
|
4704
4704
|
onDelete: r
|
|
4705
4705
|
}) {
|
|
4706
|
-
const { t: a } = z(), { isMobile: s } =
|
|
4706
|
+
const { t: a } = z(), { isMobile: s } = _e(), [o, l] = i.useState(!1), c = e.assets?.length ?? 0, d = !!e.title?.trim() && e.title.trim() !== e.body?.trim(), u = e.due_at ?? e.due_date ?? null, m = e.created_at ? Di(e.created_at, a) : null;
|
|
4707
4707
|
return /* @__PURE__ */ t.jsxs(
|
|
4708
4708
|
"div",
|
|
4709
4709
|
{
|
|
@@ -4754,7 +4754,7 @@ function Ai({
|
|
|
4754
4754
|
g.stopPropagation(), l(!0);
|
|
4755
4755
|
},
|
|
4756
4756
|
"aria-label": a("note_actions"),
|
|
4757
|
-
children: /* @__PURE__ */ t.jsx(
|
|
4757
|
+
children: /* @__PURE__ */ t.jsx(Je, { className: "size-4" })
|
|
4758
4758
|
}
|
|
4759
4759
|
),
|
|
4760
4760
|
/* @__PURE__ */ t.jsx(
|
|
@@ -4773,18 +4773,18 @@ function Ai({
|
|
|
4773
4773
|
]
|
|
4774
4774
|
}
|
|
4775
4775
|
)
|
|
4776
|
-
] }) : /* @__PURE__ */ t.jsxs(
|
|
4777
|
-
/* @__PURE__ */ t.jsx(
|
|
4776
|
+
] }) : /* @__PURE__ */ t.jsxs(nt, { children: [
|
|
4777
|
+
/* @__PURE__ */ t.jsx(rt, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
4778
4778
|
q,
|
|
4779
4779
|
{
|
|
4780
4780
|
variant: "ghost",
|
|
4781
4781
|
size: "icon-xs",
|
|
4782
4782
|
onClick: (g) => g.stopPropagation(),
|
|
4783
4783
|
"aria-label": a("note_actions"),
|
|
4784
|
-
children: /* @__PURE__ */ t.jsx(
|
|
4784
|
+
children: /* @__PURE__ */ t.jsx(Je, { className: "size-4" })
|
|
4785
4785
|
}
|
|
4786
4786
|
) }),
|
|
4787
|
-
/* @__PURE__ */ t.jsx(
|
|
4787
|
+
/* @__PURE__ */ t.jsx(at, { align: "end", children: /* @__PURE__ */ t.jsx(
|
|
4788
4788
|
$e,
|
|
4789
4789
|
{
|
|
4790
4790
|
className: "text-destructive",
|
|
@@ -4806,7 +4806,7 @@ function Pi({
|
|
|
4806
4806
|
isLoading: n,
|
|
4807
4807
|
contactId: r
|
|
4808
4808
|
}) {
|
|
4809
|
-
const { t: a } = z(), { isMobile: s } =
|
|
4809
|
+
const { t: a } = z(), { isMobile: s } = _e(), [o, l] = i.useState(null), [c, d] = i.useState(null), u = wi(r, {
|
|
4810
4810
|
onSuccess: () => l(null)
|
|
4811
4811
|
}), m = Si(r, {
|
|
4812
4812
|
onSuccess: () => d(null)
|
|
@@ -4960,16 +4960,16 @@ function Ri({
|
|
|
4960
4960
|
onBack: s,
|
|
4961
4961
|
showMobileBackButton: o = !0
|
|
4962
4962
|
}) {
|
|
4963
|
-
const { t: l } = z(), { isMobile: c } =
|
|
4963
|
+
const { t: l } = z(), { isMobile: c } = _e(), {
|
|
4964
4964
|
contact: d,
|
|
4965
4965
|
isLoading: u,
|
|
4966
4966
|
methods: m,
|
|
4967
4967
|
countryOptions: g,
|
|
4968
4968
|
isDirty: f,
|
|
4969
|
-
isSubmitting:
|
|
4969
|
+
isSubmitting: h,
|
|
4970
4970
|
isDeleting: y,
|
|
4971
4971
|
onSave: p,
|
|
4972
|
-
onDelete:
|
|
4972
|
+
onDelete: _
|
|
4973
4973
|
} = ni(e, {
|
|
4974
4974
|
queryKeyPrefix: n,
|
|
4975
4975
|
countriesQueryKey: r,
|
|
@@ -4985,8 +4985,8 @@ function Ri({
|
|
|
4985
4985
|
});
|
|
4986
4986
|
}
|
|
4987
4987
|
}), R = er(), [F, I] = i.useState(!1), [S, L] = i.useState("Tasks"), [$, b] = i.useState(!1), A = i.useCallback(() => {
|
|
4988
|
-
I(!1),
|
|
4989
|
-
}, [
|
|
4988
|
+
I(!1), _();
|
|
4989
|
+
}, [_]);
|
|
4990
4990
|
if (u)
|
|
4991
4991
|
return /* @__PURE__ */ t.jsx(
|
|
4992
4992
|
Ii,
|
|
@@ -5067,7 +5067,7 @@ function Ri({
|
|
|
5067
5067
|
{
|
|
5068
5068
|
open: $,
|
|
5069
5069
|
onOpenChange: (B) => {
|
|
5070
|
-
!B &&
|
|
5070
|
+
!B && h || b(B);
|
|
5071
5071
|
},
|
|
5072
5072
|
title: l("edit_contact_name", { name: M }),
|
|
5073
5073
|
presentation: c ? "bottom-sheet" : "dialog",
|
|
@@ -5081,7 +5081,7 @@ function Ri({
|
|
|
5081
5081
|
type: "button",
|
|
5082
5082
|
variant: "secondary",
|
|
5083
5083
|
onClick: () => b(!1),
|
|
5084
|
-
disabled:
|
|
5084
|
+
disabled: h,
|
|
5085
5085
|
children: l("cancel")
|
|
5086
5086
|
}
|
|
5087
5087
|
),
|
|
@@ -5090,11 +5090,11 @@ function Ri({
|
|
|
5090
5090
|
{
|
|
5091
5091
|
type: "button",
|
|
5092
5092
|
onClick: p,
|
|
5093
|
-
disabled: !f ||
|
|
5094
|
-
"aria-busy":
|
|
5093
|
+
disabled: !f || h,
|
|
5094
|
+
"aria-busy": h,
|
|
5095
5095
|
children: [
|
|
5096
|
-
|
|
5097
|
-
l(
|
|
5096
|
+
h && /* @__PURE__ */ t.jsx(ja, { className: "size-4" }),
|
|
5097
|
+
l(h ? "saving" : "save_changes")
|
|
5098
5098
|
]
|
|
5099
5099
|
}
|
|
5100
5100
|
)
|
|
@@ -5144,7 +5144,7 @@ function jt({
|
|
|
5144
5144
|
onEditProfile: s,
|
|
5145
5145
|
showMobileBackButton: o = !0
|
|
5146
5146
|
}) {
|
|
5147
|
-
const { t: l } = z(), { isMobile: c } =
|
|
5147
|
+
const { t: l } = z(), { isMobile: c } = _e(), [d, u] = i.useState(!1);
|
|
5148
5148
|
return /* @__PURE__ */ t.jsxs("div", { className: "border-border/50 bg-background/90 sticky top-0 z-10 flex items-center justify-between border-b px-4 py-3 backdrop-blur md:px-8", children: [
|
|
5149
5149
|
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
5150
5150
|
o ? /* @__PURE__ */ t.jsx(
|
|
@@ -5196,7 +5196,7 @@ function jt({
|
|
|
5196
5196
|
onClick: () => u(!0),
|
|
5197
5197
|
className: "text-muted-foreground hover:bg-muted hover:text-foreground flex size-8 items-center justify-center rounded-full transition-colors",
|
|
5198
5198
|
"aria-label": l("more_actions"),
|
|
5199
|
-
children: /* @__PURE__ */ t.jsx(
|
|
5199
|
+
children: /* @__PURE__ */ t.jsx(Ze, { className: "size-4" })
|
|
5200
5200
|
}
|
|
5201
5201
|
),
|
|
5202
5202
|
/* @__PURE__ */ t.jsx(
|
|
@@ -5215,23 +5215,23 @@ function jt({
|
|
|
5215
5215
|
]
|
|
5216
5216
|
}
|
|
5217
5217
|
)
|
|
5218
|
-
] }) : /* @__PURE__ */ t.jsxs(
|
|
5219
|
-
/* @__PURE__ */ t.jsx(
|
|
5218
|
+
] }) : /* @__PURE__ */ t.jsxs(nt, { children: [
|
|
5219
|
+
/* @__PURE__ */ t.jsx(rt, { asChild: !0, children: /* @__PURE__ */ t.jsx(
|
|
5220
5220
|
"button",
|
|
5221
5221
|
{
|
|
5222
5222
|
type: "button",
|
|
5223
5223
|
className: "text-muted-foreground hover:bg-muted hover:text-foreground flex size-8 items-center justify-center rounded-full transition-colors",
|
|
5224
5224
|
"aria-label": l("more_actions"),
|
|
5225
|
-
children: /* @__PURE__ */ t.jsx(
|
|
5225
|
+
children: /* @__PURE__ */ t.jsx(Ze, { className: "size-4" })
|
|
5226
5226
|
}
|
|
5227
5227
|
) }),
|
|
5228
|
-
/* @__PURE__ */ t.jsx(
|
|
5228
|
+
/* @__PURE__ */ t.jsx(at, { align: "end", children: /* @__PURE__ */ t.jsxs(
|
|
5229
5229
|
$e,
|
|
5230
5230
|
{
|
|
5231
5231
|
className: "text-destructive",
|
|
5232
5232
|
onClick: a,
|
|
5233
5233
|
children: [
|
|
5234
|
-
/* @__PURE__ */ t.jsx(
|
|
5234
|
+
/* @__PURE__ */ t.jsx(st, { className: "size-4", "aria-hidden": "true" }),
|
|
5235
5235
|
l("delete_contact")
|
|
5236
5236
|
]
|
|
5237
5237
|
}
|
|
@@ -5387,28 +5387,28 @@ var Ue = function(e, n, r) {
|
|
|
5387
5387
|
return "touches" in e;
|
|
5388
5388
|
}, Nt = function(e) {
|
|
5389
5389
|
return e && e.ownerDocument.defaultView || self;
|
|
5390
|
-
},
|
|
5390
|
+
}, Jt = function(e, n, r) {
|
|
5391
5391
|
var a = e.getBoundingClientRect(), s = qe(n) ? (function(o, l) {
|
|
5392
5392
|
for (var c = 0; c < o.length; c++) if (o[c].identifier === l) return o[c];
|
|
5393
5393
|
return o[0];
|
|
5394
5394
|
})(n.touches, r) : n;
|
|
5395
5395
|
return { left: Ue((s.pageX - (a.left + Nt(e).pageXOffset)) / a.width), top: Ue((s.pageY - (a.top + Nt(e).pageYOffset)) / a.height) };
|
|
5396
|
-
},
|
|
5396
|
+
}, Zt = function(e) {
|
|
5397
5397
|
!qe(e) && e.preventDefault();
|
|
5398
5398
|
}, rr = H.memo(function(e) {
|
|
5399
5399
|
var n = e.onMove, r = e.onKey, a = ut(e, ["onMove", "onKey"]), s = i.useRef(null), o = Be(n), l = Be(r), c = i.useRef(null), d = i.useRef(!1), u = i.useMemo(function() {
|
|
5400
|
-
var
|
|
5401
|
-
|
|
5400
|
+
var h = function(_) {
|
|
5401
|
+
Zt(_), (qe(_) ? _.touches.length > 0 : _.buttons > 0) && s.current ? o(Jt(s.current, _, c.current)) : p(!1);
|
|
5402
5402
|
}, y = function() {
|
|
5403
5403
|
return p(!1);
|
|
5404
5404
|
};
|
|
5405
|
-
function p(
|
|
5406
|
-
var v = d.current, C = Nt(s.current), k =
|
|
5407
|
-
k(v ? "touchmove" : "mousemove",
|
|
5405
|
+
function p(_) {
|
|
5406
|
+
var v = d.current, C = Nt(s.current), k = _ ? C.addEventListener : C.removeEventListener;
|
|
5407
|
+
k(v ? "touchmove" : "mousemove", h), k(v ? "touchend" : "mouseup", y);
|
|
5408
5408
|
}
|
|
5409
|
-
return [function(
|
|
5410
|
-
var v =
|
|
5411
|
-
if (C && (
|
|
5409
|
+
return [function(_) {
|
|
5410
|
+
var v = _.nativeEvent, C = s.current;
|
|
5411
|
+
if (C && (Zt(v), !(function(j, x) {
|
|
5412
5412
|
return x && !qe(j);
|
|
5413
5413
|
})(v, d.current) && C)) {
|
|
5414
5414
|
if (qe(v)) {
|
|
@@ -5416,11 +5416,11 @@ var Ue = function(e, n, r) {
|
|
|
5416
5416
|
var k = v.changedTouches || [];
|
|
5417
5417
|
k.length && (c.current = k[0].identifier);
|
|
5418
5418
|
}
|
|
5419
|
-
C.focus(), o(
|
|
5419
|
+
C.focus(), o(Jt(C, v, c.current)), p(!0);
|
|
5420
5420
|
}
|
|
5421
|
-
}, function(
|
|
5422
|
-
var v =
|
|
5423
|
-
v < 37 || v > 40 || (
|
|
5421
|
+
}, function(_) {
|
|
5422
|
+
var v = _.which || _.keyCode;
|
|
5423
|
+
v < 37 || v > 40 || (_.preventDefault(), l({ left: v === 39 ? 0.05 : v === 37 ? -0.05 : 0, top: v === 40 ? 0.05 : v === 38 ? -0.05 : 0 }));
|
|
5424
5424
|
}, p];
|
|
5425
5425
|
}, [l, o]), m = u[0], g = u[1], f = u[2];
|
|
5426
5426
|
return i.useEffect(function() {
|
|
@@ -5431,17 +5431,17 @@ var Ue = function(e, n, r) {
|
|
|
5431
5431
|
}, ar = function(e) {
|
|
5432
5432
|
var n = e.color, r = e.left, a = e.top, s = a === void 0 ? 0.5 : a, o = zt(["react-colorful__pointer", e.className]);
|
|
5433
5433
|
return H.createElement("div", { className: o, style: { top: 100 * s + "%", left: 100 * r + "%" } }, H.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: n } }));
|
|
5434
|
-
},
|
|
5434
|
+
}, Y = function(e, n, r) {
|
|
5435
5435
|
return n === void 0 && (n = 0), r === void 0 && (r = Math.pow(10, n)), Math.round(r * e) / r;
|
|
5436
5436
|
}, qi = function(e) {
|
|
5437
5437
|
return Gi(Ct(e));
|
|
5438
5438
|
}, Ct = function(e) {
|
|
5439
|
-
return e[0] === "#" && (e = e.substring(1)), e.length < 6 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ?
|
|
5439
|
+
return e[0] === "#" && (e = e.substring(1)), e.length < 6 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? Y(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : { r: parseInt(e.substring(0, 2), 16), g: parseInt(e.substring(2, 4), 16), b: parseInt(e.substring(4, 6), 16), a: e.length === 8 ? Y(parseInt(e.substring(6, 8), 16) / 255, 2) : 1 };
|
|
5440
5440
|
}, $i = function(e) {
|
|
5441
5441
|
return Ui(Bi(e));
|
|
5442
5442
|
}, Ki = function(e) {
|
|
5443
5443
|
var n = e.s, r = e.v, a = e.a, s = (200 - n) * r / 100;
|
|
5444
|
-
return { h:
|
|
5444
|
+
return { h: Y(e.h), s: Y(s > 0 && s < 200 ? n * r / 100 / (s <= 100 ? s : 200 - s) * 100 : 0), l: Y(s / 2), a: Y(a, 2) };
|
|
5445
5445
|
}, kt = function(e) {
|
|
5446
5446
|
var n = Ki(e);
|
|
5447
5447
|
return "hsl(" + n.h + ", " + n.s + "%, " + n.l + "%)";
|
|
@@ -5449,35 +5449,35 @@ var Ue = function(e, n, r) {
|
|
|
5449
5449
|
var n = e.h, r = e.s, a = e.v, s = e.a;
|
|
5450
5450
|
n = n / 360 * 6, r /= 100, a /= 100;
|
|
5451
5451
|
var o = Math.floor(n), l = a * (1 - r), c = a * (1 - (n - o) * r), d = a * (1 - (1 - n + o) * r), u = o % 6;
|
|
5452
|
-
return { r:
|
|
5452
|
+
return { r: Y(255 * [a, c, l, l, d, a][u]), g: Y(255 * [d, a, a, c, l, l][u]), b: Y(255 * [l, l, d, a, a, c][u]), a: Y(s, 2) };
|
|
5453
5453
|
}, Xe = function(e) {
|
|
5454
5454
|
var n = e.toString(16);
|
|
5455
5455
|
return n.length < 2 ? "0" + n : n;
|
|
5456
5456
|
}, Ui = function(e) {
|
|
5457
|
-
var n = e.r, r = e.g, a = e.b, s = e.a, o = s < 1 ? Xe(
|
|
5457
|
+
var n = e.r, r = e.g, a = e.b, s = e.a, o = s < 1 ? Xe(Y(255 * s)) : "";
|
|
5458
5458
|
return "#" + Xe(n) + Xe(r) + Xe(a) + o;
|
|
5459
5459
|
}, Gi = function(e) {
|
|
5460
5460
|
var n = e.r, r = e.g, a = e.b, s = e.a, o = Math.max(n, r, a), l = o - Math.min(n, r, a), c = l ? o === n ? (r - a) / l : o === r ? 2 + (a - n) / l : 4 + (n - r) / l : 0;
|
|
5461
|
-
return { h:
|
|
5461
|
+
return { h: Y(60 * (c < 0 ? c + 6 : c)), s: Y(o ? l / o * 100 : 0), v: Y(o / 255 * 100), a: s };
|
|
5462
5462
|
}, Hi = H.memo(function(e) {
|
|
5463
5463
|
var n = e.hue, r = e.onChange, a = zt(["react-colorful__hue", e.className]);
|
|
5464
5464
|
return H.createElement("div", { className: a }, H.createElement(rr, { onMove: function(s) {
|
|
5465
5465
|
r({ h: 360 * s.left });
|
|
5466
5466
|
}, onKey: function(s) {
|
|
5467
5467
|
r({ h: Ue(n + 360 * s.left, 0, 360) });
|
|
5468
|
-
}, "aria-label": "Hue", "aria-valuenow":
|
|
5469
|
-
}),
|
|
5468
|
+
}, "aria-label": "Hue", "aria-valuenow": Y(n), "aria-valuemax": "360", "aria-valuemin": "0" }, H.createElement(ar, { className: "react-colorful__hue-pointer", left: n / 360, color: kt({ h: n, s: 100, v: 100, a: 1 }) })));
|
|
5469
|
+
}), Qi = H.memo(function(e) {
|
|
5470
5470
|
var n = e.hsva, r = e.onChange, a = { backgroundColor: kt({ h: n.h, s: 100, v: 100, a: 1 }) };
|
|
5471
5471
|
return H.createElement("div", { className: "react-colorful__saturation", style: a }, H.createElement(rr, { onMove: function(s) {
|
|
5472
5472
|
r({ s: 100 * s.left, v: 100 - 100 * s.top });
|
|
5473
5473
|
}, onKey: function(s) {
|
|
5474
5474
|
r({ s: Ue(n.s + 100 * s.left, 0, 100), v: Ue(n.v - 100 * s.top, 0, 100) });
|
|
5475
|
-
}, "aria-label": "Color", "aria-valuetext": "Saturation " +
|
|
5475
|
+
}, "aria-label": "Color", "aria-valuetext": "Saturation " + Y(n.s) + "%, Brightness " + Y(n.v) + "%" }, H.createElement(ar, { className: "react-colorful__saturation-pointer", top: 1 - n.v / 100, left: n.s / 100, color: kt(n) })));
|
|
5476
5476
|
}), sr = function(e, n) {
|
|
5477
5477
|
if (e === n) return !0;
|
|
5478
5478
|
for (var r in e) if (e[r] !== n[r]) return !1;
|
|
5479
5479
|
return !0;
|
|
5480
|
-
},
|
|
5480
|
+
}, Yi = function(e, n) {
|
|
5481
5481
|
return e.toLowerCase() === n.toLowerCase() || sr(Ct(e), Ct(n));
|
|
5482
5482
|
};
|
|
5483
5483
|
function Vi(e, n, r) {
|
|
@@ -5502,7 +5502,7 @@ function Vi(e, n, r) {
|
|
|
5502
5502
|
}
|
|
5503
5503
|
var Wi = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Xi = function() {
|
|
5504
5504
|
return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
|
|
5505
|
-
}, en = /* @__PURE__ */ new Map(),
|
|
5505
|
+
}, en = /* @__PURE__ */ new Map(), Ji = function(e) {
|
|
5506
5506
|
Wi(function() {
|
|
5507
5507
|
var n = e.current ? e.current.ownerDocument : document;
|
|
5508
5508
|
if (n !== void 0 && !en.has(n)) {
|
|
@@ -5512,27 +5512,27 @@ var Wi = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Xi = function()
|
|
|
5512
5512
|
a && r.setAttribute("nonce", a), n.head.appendChild(r);
|
|
5513
5513
|
}
|
|
5514
5514
|
}, []);
|
|
5515
|
-
},
|
|
5515
|
+
}, Zi = function(e) {
|
|
5516
5516
|
var n = e.className, r = e.colorModel, a = e.color, s = a === void 0 ? r.defaultColor : a, o = e.onChange, l = ut(e, ["className", "colorModel", "color", "onChange"]), c = i.useRef(null);
|
|
5517
|
-
|
|
5517
|
+
Ji(c);
|
|
5518
5518
|
var d = Vi(r, s, o), u = d[0], m = d[1], g = zt(["react-colorful", n]);
|
|
5519
|
-
return H.createElement("div", Fe({}, l, { ref: c, className: g }), H.createElement(
|
|
5519
|
+
return H.createElement("div", Fe({}, l, { ref: c, className: g }), H.createElement(Qi, { hsva: u, onChange: m }), H.createElement(Hi, { hue: u.h, onChange: m, className: "react-colorful__last-control" }));
|
|
5520
5520
|
}, el = { defaultColor: "000", toHsva: qi, fromHsva: function(e) {
|
|
5521
5521
|
return $i({ h: e.h, s: e.s, v: e.v, a: 1 });
|
|
5522
|
-
}, equal:
|
|
5523
|
-
return H.createElement(
|
|
5522
|
+
}, equal: Yi }, tl = function(e) {
|
|
5523
|
+
return H.createElement(Zi, Fe({}, e, { colorModel: el }));
|
|
5524
5524
|
}, nl = /^#?([0-9A-F]{3,8})$/i, rl = function(e) {
|
|
5525
5525
|
var n = e.color, r = n === void 0 ? "" : n, a = e.onChange, s = e.onBlur, o = e.escape, l = e.validate, c = e.format, d = e.process, u = ut(e, ["color", "onChange", "onBlur", "escape", "validate", "format", "process"]), m = i.useState(function() {
|
|
5526
5526
|
return o(r);
|
|
5527
|
-
}), g = m[0], f = m[1],
|
|
5527
|
+
}), g = m[0], f = m[1], h = Be(a), y = Be(s), p = i.useCallback(function(v) {
|
|
5528
5528
|
var C = o(v.target.value);
|
|
5529
|
-
f(C), l(C) &&
|
|
5530
|
-
}, [o, d, l,
|
|
5529
|
+
f(C), l(C) && h(d ? d(C) : C);
|
|
5530
|
+
}, [o, d, l, h]), _ = i.useCallback(function(v) {
|
|
5531
5531
|
l(v.target.value) || f(o(r)), y(v);
|
|
5532
5532
|
}, [r, o, l, y]);
|
|
5533
5533
|
return i.useEffect(function() {
|
|
5534
5534
|
f(o(r));
|
|
5535
|
-
}, [r, o]), H.createElement("input", Fe({}, u, { value: c ? c(g) : g, spellCheck: "false", onChange: p, onBlur:
|
|
5535
|
+
}, [r, o]), H.createElement("input", Fe({}, u, { value: c ? c(g) : g, spellCheck: "false", onChange: p, onBlur: _ }));
|
|
5536
5536
|
}, tn = function(e) {
|
|
5537
5537
|
return "#" + e;
|
|
5538
5538
|
}, al = function(e) {
|
|
@@ -5554,7 +5554,7 @@ function sl() {
|
|
|
5554
5554
|
return e.deleteGroup(a);
|
|
5555
5555
|
},
|
|
5556
5556
|
onSuccess: () => {
|
|
5557
|
-
n.invalidateQueries({ queryKey:
|
|
5557
|
+
n.invalidateQueries({ queryKey: Q.groups() }), Pe(n);
|
|
5558
5558
|
},
|
|
5559
5559
|
onError: (a) => {
|
|
5560
5560
|
O({
|
|
@@ -5576,7 +5576,7 @@ function ol() {
|
|
|
5576
5576
|
return e.updateGroup(a, s);
|
|
5577
5577
|
},
|
|
5578
5578
|
onSuccess: () => {
|
|
5579
|
-
n.invalidateQueries({ queryKey:
|
|
5579
|
+
n.invalidateQueries({ queryKey: Q.groups() }), Pe(n);
|
|
5580
5580
|
},
|
|
5581
5581
|
onError: (a) => {
|
|
5582
5582
|
O({
|
|
@@ -5616,12 +5616,12 @@ function cl({
|
|
|
5616
5616
|
initialCreateOpen: r,
|
|
5617
5617
|
showMobileBackButton: a = !0
|
|
5618
5618
|
}) {
|
|
5619
|
-
const { t: s } = z(), { isMobile: o } =
|
|
5619
|
+
const { t: s } = z(), { isMobile: o } = _e(), { data: l = [], isLoading: c } = Dt(), d = sl(), [u, m] = i.useState(r ? { mode: "create" } : null), [g, f] = i.useState(null), [h, y] = i.useState(null);
|
|
5620
5620
|
i.useEffect(() => {
|
|
5621
|
-
if (
|
|
5622
|
-
const
|
|
5623
|
-
return () => clearTimeout(
|
|
5624
|
-
}, [
|
|
5621
|
+
if (h == null) return;
|
|
5622
|
+
const _ = setTimeout(() => y(null), 2e3);
|
|
5623
|
+
return () => clearTimeout(_);
|
|
5624
|
+
}, [h]);
|
|
5625
5625
|
const p = i.useCallback(() => {
|
|
5626
5626
|
g && d.mutate(g.id, {
|
|
5627
5627
|
onSuccess: () => {
|
|
@@ -5653,20 +5653,20 @@ function cl({
|
|
|
5653
5653
|
/* @__PURE__ */ t.jsx("h2", { className: "text-foreground text-lg font-semibold", children: s("groups_manage_title") })
|
|
5654
5654
|
] }),
|
|
5655
5655
|
/* @__PURE__ */ t.jsxs(q, { size: "sm", onClick: () => m({ mode: "create" }), children: [
|
|
5656
|
-
/* @__PURE__ */ t.jsx(
|
|
5656
|
+
/* @__PURE__ */ t.jsx(he, { className: "size-4" }),
|
|
5657
5657
|
s("groups_new_group")
|
|
5658
5658
|
] })
|
|
5659
5659
|
] }),
|
|
5660
|
-
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto px-6 py-6", children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto max-w-[857px]", children: c ? /* @__PURE__ */ t.jsx(gl, {}) : l.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground py-16 text-center text-sm", children: s("groups_empty") }) : /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: l.map((
|
|
5660
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto px-6 py-6", children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto max-w-[857px]", children: c ? /* @__PURE__ */ t.jsx(gl, {}) : l.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground py-16 text-center text-sm", children: s("groups_empty") }) : /* @__PURE__ */ t.jsx("div", { className: "space-y-2", children: l.map((_) => /* @__PURE__ */ t.jsx(
|
|
5661
5661
|
pl,
|
|
5662
5662
|
{
|
|
5663
|
-
group:
|
|
5664
|
-
highlight:
|
|
5665
|
-
onEdit: () => m({ mode: "edit", group:
|
|
5666
|
-
onDelete: () => f(
|
|
5663
|
+
group: _,
|
|
5664
|
+
highlight: h === _.id,
|
|
5665
|
+
onEdit: () => m({ mode: "edit", group: _ }),
|
|
5666
|
+
onDelete: () => f(_),
|
|
5667
5667
|
onSelectContact: n
|
|
5668
5668
|
},
|
|
5669
|
-
|
|
5669
|
+
_.id
|
|
5670
5670
|
)) }) }) }),
|
|
5671
5671
|
u && /* @__PURE__ */ t.jsx(
|
|
5672
5672
|
or,
|
|
@@ -5674,9 +5674,9 @@ function cl({
|
|
|
5674
5674
|
mode: u.mode,
|
|
5675
5675
|
group: u.mode === "edit" ? u.group : void 0,
|
|
5676
5676
|
open: !!u,
|
|
5677
|
-
onOpenChange: (
|
|
5678
|
-
onGroupCreated: (
|
|
5679
|
-
y(
|
|
5677
|
+
onOpenChange: (_) => !_ && m(null),
|
|
5678
|
+
onGroupCreated: (_) => {
|
|
5679
|
+
y(_);
|
|
5680
5680
|
}
|
|
5681
5681
|
},
|
|
5682
5682
|
u.mode === "edit" ? u.group.id : "create"
|
|
@@ -5685,7 +5685,7 @@ function cl({
|
|
|
5685
5685
|
De,
|
|
5686
5686
|
{
|
|
5687
5687
|
open: !!g,
|
|
5688
|
-
onOpenChange: (
|
|
5688
|
+
onOpenChange: (_) => !_ && f(null),
|
|
5689
5689
|
title: s("groups_delete_title"),
|
|
5690
5690
|
description: s("groups_delete_confirm", {
|
|
5691
5691
|
name: g?.name ?? ""
|
|
@@ -5725,14 +5725,14 @@ function or({
|
|
|
5725
5725
|
onGroupCreated: s,
|
|
5726
5726
|
onGroupCreatedWithName: o
|
|
5727
5727
|
}) {
|
|
5728
|
-
const { t: l } = z(), { isMobile: c } =
|
|
5728
|
+
const { t: l } = z(), { isMobile: c } = _e(), d = er(), u = ol(), m = e === "create" ? d.isPending : u.isPending, [g, f] = i.useState(n?.name ?? ""), [h, y] = i.useState(n?.avatar ?? ""), [p, _] = i.useState(
|
|
5729
5729
|
n?.avatar_background ?? "#6366f1"
|
|
5730
5730
|
), v = i.useCallback(() => {
|
|
5731
5731
|
const k = g.trim();
|
|
5732
5732
|
k && (e === "create" ? d.mutate(
|
|
5733
5733
|
{
|
|
5734
5734
|
name: k,
|
|
5735
|
-
avatar:
|
|
5735
|
+
avatar: h || void 0,
|
|
5736
5736
|
avatar_background: p || void 0
|
|
5737
5737
|
},
|
|
5738
5738
|
{
|
|
@@ -5748,7 +5748,7 @@ function or({
|
|
|
5748
5748
|
groupId: n.id,
|
|
5749
5749
|
input: {
|
|
5750
5750
|
name: k,
|
|
5751
|
-
avatar:
|
|
5751
|
+
avatar: h || void 0,
|
|
5752
5752
|
avatar_background: p || void 0
|
|
5753
5753
|
}
|
|
5754
5754
|
},
|
|
@@ -5761,7 +5761,7 @@ function or({
|
|
|
5761
5761
|
}, [
|
|
5762
5762
|
e,
|
|
5763
5763
|
g,
|
|
5764
|
-
|
|
5764
|
+
h,
|
|
5765
5765
|
p,
|
|
5766
5766
|
n,
|
|
5767
5767
|
d,
|
|
@@ -5788,10 +5788,10 @@ function or({
|
|
|
5788
5788
|
{
|
|
5789
5789
|
className: "flex size-20 items-center justify-center rounded-full text-4xl transition-colors",
|
|
5790
5790
|
style: { backgroundColor: C },
|
|
5791
|
-
children:
|
|
5791
|
+
children: h || /* @__PURE__ */ t.jsx(ke, { className: "size-8 text-white/60" })
|
|
5792
5792
|
}
|
|
5793
5793
|
),
|
|
5794
|
-
|
|
5794
|
+
h && /* @__PURE__ */ t.jsx(
|
|
5795
5795
|
Ke,
|
|
5796
5796
|
{
|
|
5797
5797
|
icon: Ge,
|
|
@@ -5815,8 +5815,8 @@ function or({
|
|
|
5815
5815
|
)
|
|
5816
5816
|
] })
|
|
5817
5817
|
] }),
|
|
5818
|
-
/* @__PURE__ */ t.jsxs(
|
|
5819
|
-
/* @__PURE__ */ t.jsxs(
|
|
5818
|
+
/* @__PURE__ */ t.jsxs(Pa, { defaultValue: "emoji", children: [
|
|
5819
|
+
/* @__PURE__ */ t.jsxs(za, { className: "border-border h-auto w-full justify-center gap-6 rounded-none border-b bg-transparent p-0", children: [
|
|
5820
5820
|
/* @__PURE__ */ t.jsx(
|
|
5821
5821
|
Lt,
|
|
5822
5822
|
{
|
|
@@ -5861,7 +5861,7 @@ function or({
|
|
|
5861
5861
|
tl,
|
|
5862
5862
|
{
|
|
5863
5863
|
color: p || "#6366f1",
|
|
5864
|
-
onChange:
|
|
5864
|
+
onChange: _,
|
|
5865
5865
|
className: "h-40 w-full"
|
|
5866
5866
|
}
|
|
5867
5867
|
),
|
|
@@ -5871,7 +5871,7 @@ function or({
|
|
|
5871
5871
|
al,
|
|
5872
5872
|
{
|
|
5873
5873
|
color: p || "6366f1",
|
|
5874
|
-
onChange:
|
|
5874
|
+
onChange: _,
|
|
5875
5875
|
className: "text-foreground w-20 bg-transparent text-sm outline-none"
|
|
5876
5876
|
}
|
|
5877
5877
|
)
|
|
@@ -5880,7 +5880,7 @@ function or({
|
|
|
5880
5880
|
"button",
|
|
5881
5881
|
{
|
|
5882
5882
|
type: "button",
|
|
5883
|
-
onClick: () =>
|
|
5883
|
+
onClick: () => _(k),
|
|
5884
5884
|
className: D(
|
|
5885
5885
|
"size-7 rounded-full transition-all",
|
|
5886
5886
|
p === k ? "ring-primary ring-2 ring-offset-2" : "hover:scale-110"
|
|
@@ -5998,7 +5998,7 @@ function pl({
|
|
|
5998
5998
|
/* @__PURE__ */ t.jsx(
|
|
5999
5999
|
Ke,
|
|
6000
6000
|
{
|
|
6001
|
-
icon:
|
|
6001
|
+
icon: st,
|
|
6002
6002
|
onClick: (u) => {
|
|
6003
6003
|
u.stopPropagation(), a();
|
|
6004
6004
|
},
|
|
@@ -6029,34 +6029,34 @@ function fl({
|
|
|
6029
6029
|
contactCount: a,
|
|
6030
6030
|
onSelectContact: s
|
|
6031
6031
|
}) {
|
|
6032
|
-
const { t: o } = z(), { isMobile: l } =
|
|
6032
|
+
const { t: o } = z(), { isMobile: l } = _e(), c = xe(), d = W(), u = e.avatar_background ?? "var(--color-muted)", [m, g] = i.useState(""), [f, h] = i.useState(null);
|
|
6033
6033
|
i.useEffect(() => {
|
|
6034
6034
|
if (f == null) return;
|
|
6035
|
-
const x = setTimeout(() =>
|
|
6035
|
+
const x = setTimeout(() => h(null), 2e3);
|
|
6036
6036
|
return () => clearTimeout(x);
|
|
6037
6037
|
}, [f]);
|
|
6038
6038
|
const { data: y, isLoading: p } = ve({
|
|
6039
|
-
queryKey:
|
|
6039
|
+
queryKey: Q.groupMembers(e.name),
|
|
6040
6040
|
queryFn: async () => (await c.listContacts({
|
|
6041
6041
|
tags: [e.name],
|
|
6042
6042
|
per_page: 100
|
|
6043
6043
|
})).contacts,
|
|
6044
6044
|
enabled: n
|
|
6045
|
-
}), { data:
|
|
6046
|
-
queryKey:
|
|
6045
|
+
}), { data: _ } = ve({
|
|
6046
|
+
queryKey: Q.groupAddSearch(e.name, m),
|
|
6047
6047
|
queryFn: () => c.listContacts({
|
|
6048
6048
|
search_query: m,
|
|
6049
6049
|
per_page: 10
|
|
6050
6050
|
}),
|
|
6051
6051
|
enabled: m.length > 0 && n
|
|
6052
|
-
}), v = (
|
|
6052
|
+
}), v = (_?.contacts ?? []).filter(
|
|
6053
6053
|
(x) => !y?.some((P) => P.id === x.id)
|
|
6054
6054
|
), C = i.useCallback(
|
|
6055
6055
|
(x) => {
|
|
6056
6056
|
const R = (Array.isArray(x.tags) ? x.tags : []).filter((F) => F !== e.name);
|
|
6057
6057
|
c.updateContact(String(x.id), { tags: R }).then(() => {
|
|
6058
6058
|
d.invalidateQueries({
|
|
6059
|
-
queryKey:
|
|
6059
|
+
queryKey: Q.groupMembers(e.name)
|
|
6060
6060
|
}), Pe(d), O({
|
|
6061
6061
|
title: o("groups_member_removed_toast", {
|
|
6062
6062
|
contact: x.full_name ?? "",
|
|
@@ -6083,8 +6083,8 @@ function fl({
|
|
|
6083
6083
|
const R = [...P, e.name];
|
|
6084
6084
|
c.updateContact(String(x.id), { tags: R }).then(() => {
|
|
6085
6085
|
d.invalidateQueries({
|
|
6086
|
-
queryKey:
|
|
6087
|
-
}), Pe(d), g(""),
|
|
6086
|
+
queryKey: Q.groupMembers(e.name)
|
|
6087
|
+
}), Pe(d), g(""), h(x.id), O({
|
|
6088
6088
|
title: o("groups_member_added_toast", {
|
|
6089
6089
|
contact: x.full_name ?? "",
|
|
6090
6090
|
group: e.name
|
|
@@ -6147,12 +6147,12 @@ function fl({
|
|
|
6147
6147
|
/* @__PURE__ */ t.jsx("p", { className: "text-foreground truncate text-sm", children: x.full_name }),
|
|
6148
6148
|
x.email && /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground truncate text-xs", children: x.email })
|
|
6149
6149
|
] }),
|
|
6150
|
-
/* @__PURE__ */ t.jsx(
|
|
6150
|
+
/* @__PURE__ */ t.jsx(he, { className: "text-primary size-4 shrink-0" })
|
|
6151
6151
|
]
|
|
6152
6152
|
},
|
|
6153
6153
|
x.id
|
|
6154
6154
|
)) }),
|
|
6155
|
-
m && v.length === 0 &&
|
|
6155
|
+
m && v.length === 0 && _ && /* @__PURE__ */ t.jsx("div", { className: "bg-popover border-border absolute right-6 left-6 z-10 mt-1 rounded-md border p-3 shadow-md", children: /* @__PURE__ */ t.jsx("p", { className: "text-muted-foreground text-center text-sm", children: o("groups_no_contacts_found") }) })
|
|
6156
6156
|
] }),
|
|
6157
6157
|
/* @__PURE__ */ t.jsx("div", { className: "flex-1 overflow-y-auto px-6 py-3", children: p ? /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground py-8 text-center text-sm", children: o("groups_loading_members") }) : !y || y.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground py-8 text-center text-sm", children: o("groups_empty_members") }) : /* @__PURE__ */ t.jsx("div", { className: "space-y-1", children: y.map((x) => /* @__PURE__ */ t.jsxs(
|
|
6158
6158
|
"div",
|
|
@@ -6197,7 +6197,7 @@ function fl({
|
|
|
6197
6197
|
)) }) })
|
|
6198
6198
|
] });
|
|
6199
6199
|
return l ? /* @__PURE__ */ t.jsx(
|
|
6200
|
-
|
|
6200
|
+
tt,
|
|
6201
6201
|
{
|
|
6202
6202
|
open: n,
|
|
6203
6203
|
onOpenChange: r,
|
|
@@ -6223,7 +6223,7 @@ function gl() {
|
|
|
6223
6223
|
e
|
|
6224
6224
|
)) });
|
|
6225
6225
|
}
|
|
6226
|
-
function
|
|
6226
|
+
function _l(e = "contacts", n) {
|
|
6227
6227
|
const r = W(), a = xe();
|
|
6228
6228
|
return re({
|
|
6229
6229
|
mutationFn: (s) => a.createContact(s),
|
|
@@ -6239,9 +6239,9 @@ function hl(e = "contacts", n) {
|
|
|
6239
6239
|
}
|
|
6240
6240
|
});
|
|
6241
6241
|
}
|
|
6242
|
-
function
|
|
6243
|
-
const r =
|
|
6244
|
-
return
|
|
6242
|
+
function hl(e = "contacts", n) {
|
|
6243
|
+
const r = Ye();
|
|
6244
|
+
return _l(e, {
|
|
6245
6245
|
onSuccess: (a) => {
|
|
6246
6246
|
O({
|
|
6247
6247
|
title: r?.t("contact_created") ?? "Contact created successfully",
|
|
@@ -6278,7 +6278,7 @@ function xl(e) {
|
|
|
6278
6278
|
}
|
|
6279
6279
|
function nn(e, n) {
|
|
6280
6280
|
const r = ir(e);
|
|
6281
|
-
return n.view === "new" ? `${r}/new` : n.selectedContactId ? `${r}/${
|
|
6281
|
+
return n.view === "new" ? `${r}/new` : n.selectedContactId ? `${r}/${_a(n.selectedContactId)}` : r;
|
|
6282
6282
|
}
|
|
6283
6283
|
const lr = "sdk-contacts";
|
|
6284
6284
|
function bl({
|
|
@@ -6291,16 +6291,16 @@ function bl({
|
|
|
6291
6291
|
highlightGroupName: l,
|
|
6292
6292
|
showMobileDetailBackButton: c = !0
|
|
6293
6293
|
}) {
|
|
6294
|
-
const { t: d } = z(), { locale: u } = wt(), m = mn(), g = xe(), f = W(),
|
|
6294
|
+
const { t: d } = z(), { locale: u } = wt(), m = mn(), g = xe(), f = W(), h = i.useMemo(
|
|
6295
6295
|
() => [...un.countries(u), "contact-detail"],
|
|
6296
6296
|
[u]
|
|
6297
6297
|
), y = i.useCallback(async () => (await m.listCountries({
|
|
6298
6298
|
languageIso: u
|
|
6299
6299
|
})).countries.map((v) => ({ id: 0, name: v.name, iso: v.code })), [m, u]), p = i.useCallback(
|
|
6300
|
-
(
|
|
6301
|
-
const v =
|
|
6302
|
-
g.deleteContact(String(
|
|
6303
|
-
Pe(f), e === String(
|
|
6300
|
+
(_) => {
|
|
6301
|
+
const v = _.full_name || d("contact_label");
|
|
6302
|
+
g.deleteContact(String(_.id)).then(() => {
|
|
6303
|
+
Pe(f), e === String(_.id) && r(null), O({
|
|
6304
6304
|
title: d("contact_deleted_toast", { name: v }),
|
|
6305
6305
|
type: "success"
|
|
6306
6306
|
});
|
|
@@ -6326,7 +6326,7 @@ function bl({
|
|
|
6326
6326
|
highlightGroupName: l,
|
|
6327
6327
|
onDeleteContact: p,
|
|
6328
6328
|
queryKeyPrefix: lr,
|
|
6329
|
-
countriesQueryKey:
|
|
6329
|
+
countriesQueryKey: h,
|
|
6330
6330
|
getCountries: y,
|
|
6331
6331
|
showMobileDetailBackButton: c
|
|
6332
6332
|
}
|
|
@@ -6360,7 +6360,7 @@ function vl({
|
|
|
6360
6360
|
[c]
|
|
6361
6361
|
), u = pn(Pt, {
|
|
6362
6362
|
defaultValues: yl
|
|
6363
|
-
}), m =
|
|
6363
|
+
}), m = hl(lr, {
|
|
6364
6364
|
onSuccess: (y) => {
|
|
6365
6365
|
n?.();
|
|
6366
6366
|
const p = y?.contact?.id;
|
|
@@ -6372,8 +6372,8 @@ function vl({
|
|
|
6372
6372
|
}), { mutate: g } = m, f = i.useMemo(
|
|
6373
6373
|
() => u.handleSubmit(
|
|
6374
6374
|
(y) => {
|
|
6375
|
-
const { affiliate: p, ...
|
|
6376
|
-
for (const [C, k] of Object.entries(
|
|
6375
|
+
const { affiliate: p, ..._ } = y, v = {};
|
|
6376
|
+
for (const [C, k] of Object.entries(_))
|
|
6377
6377
|
k !== "" && k !== null && k !== void 0 && (v[C] = k);
|
|
6378
6378
|
p && Object.keys(p).length > 0 && (v.affiliate = p), g(v);
|
|
6379
6379
|
},
|
|
@@ -6381,15 +6381,15 @@ function vl({
|
|
|
6381
6381
|
}
|
|
6382
6382
|
),
|
|
6383
6383
|
[u, g]
|
|
6384
|
-
),
|
|
6384
|
+
), h = i.useCallback(() => {
|
|
6385
6385
|
e({ view: "browse", selectedContactId: null });
|
|
6386
6386
|
}, [e]);
|
|
6387
6387
|
return r ? /* @__PURE__ */ t.jsx(
|
|
6388
|
-
|
|
6388
|
+
tt,
|
|
6389
6389
|
{
|
|
6390
6390
|
open: !0,
|
|
6391
6391
|
onOpenChange: (y) => {
|
|
6392
|
-
y ||
|
|
6392
|
+
y || h();
|
|
6393
6393
|
},
|
|
6394
6394
|
title: a("breadcrumb_new"),
|
|
6395
6395
|
children: /* @__PURE__ */ t.jsx(yt, { ...u, children: /* @__PURE__ */ t.jsxs(
|
|
@@ -6406,7 +6406,7 @@ function vl({
|
|
|
6406
6406
|
{
|
|
6407
6407
|
type: "button",
|
|
6408
6408
|
variant: "outline",
|
|
6409
|
-
onClick:
|
|
6409
|
+
onClick: h,
|
|
6410
6410
|
children: a("cancel")
|
|
6411
6411
|
}
|
|
6412
6412
|
),
|
|
@@ -6419,7 +6419,7 @@ function vl({
|
|
|
6419
6419
|
) : /* @__PURE__ */ t.jsx(
|
|
6420
6420
|
To,
|
|
6421
6421
|
{
|
|
6422
|
-
onNavigateToList:
|
|
6422
|
+
onNavigateToList: h,
|
|
6423
6423
|
onSubmit: () => s.current?.requestSubmit(),
|
|
6424
6424
|
isPending: m.isPending,
|
|
6425
6425
|
children: /* @__PURE__ */ t.jsx(yt, { ...u, children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto max-w-7xl space-y-12 md:px-10 md:py-8", children: /* @__PURE__ */ t.jsx(
|
|
@@ -6451,10 +6451,10 @@ function jl({
|
|
|
6451
6451
|
const { currentSlug: m, navigate: g } = Nr(), f = i.useMemo(
|
|
6452
6452
|
() => ir(m),
|
|
6453
6453
|
[m]
|
|
6454
|
-
), { nav:
|
|
6454
|
+
), { nav: h, subPage: y } = i.useMemo(
|
|
6455
6455
|
() => xl(m),
|
|
6456
6456
|
[m]
|
|
6457
|
-
), p = Fr(), [
|
|
6457
|
+
), p = Fr(), [_, v] = i.useState(!1), [C, k] = i.useState(
|
|
6458
6458
|
null
|
|
6459
6459
|
);
|
|
6460
6460
|
i.useEffect(() => {
|
|
@@ -6487,9 +6487,9 @@ function jl({
|
|
|
6487
6487
|
[j]
|
|
6488
6488
|
), I = i.useCallback(
|
|
6489
6489
|
(T) => {
|
|
6490
|
-
v(!1), (
|
|
6490
|
+
v(!1), (h.view === "new" || T.view === "new" || T.view === "browse" && T.selectedContactId) && F(T);
|
|
6491
6491
|
},
|
|
6492
|
-
[F,
|
|
6492
|
+
[F, h.view]
|
|
6493
6493
|
), [S, L] = i.useState(!1), [$, b] = i.useState(
|
|
6494
6494
|
null
|
|
6495
6495
|
);
|
|
@@ -6500,7 +6500,7 @@ function jl({
|
|
|
6500
6500
|
}, [$]);
|
|
6501
6501
|
const A = i.useCallback(() => {
|
|
6502
6502
|
L(!0);
|
|
6503
|
-
}, []), M =
|
|
6503
|
+
}, []), M = _ || h.view === "new", B = p || !M;
|
|
6504
6504
|
return /* @__PURE__ */ t.jsx(yo, { children: /* @__PURE__ */ t.jsx(mo, { api: e, children: /* @__PURE__ */ t.jsxs("div", { ...u, className: D("h-full", u.className), children: [
|
|
6505
6505
|
y === "manage-groups" ? /* @__PURE__ */ t.jsx(
|
|
6506
6506
|
cl,
|
|
@@ -6520,7 +6520,7 @@ function jl({
|
|
|
6520
6520
|
B ? /* @__PURE__ */ t.jsx(
|
|
6521
6521
|
bl,
|
|
6522
6522
|
{
|
|
6523
|
-
selectedContactId:
|
|
6523
|
+
selectedContactId: h.view === "browse" ? h.selectedContactId : null,
|
|
6524
6524
|
highlightContactId: C,
|
|
6525
6525
|
onSelect: x,
|
|
6526
6526
|
onAdd: P,
|