@wealthx/shadcn 1.5.31 → 1.5.33
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/.turbo/turbo-build.log +101 -101
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-SYJ6LVJ6.mjs → chunk-3ZU5BH6X.mjs} +1 -1
- package/dist/{chunk-FTQ2AKZ2.mjs → chunk-4QTHK7ML.mjs} +1 -1
- package/dist/{chunk-T5HU4S4X.mjs → chunk-C7ZTZTEW.mjs} +1 -1
- package/dist/{chunk-KI57CBJR.mjs → chunk-DQNNP6I4.mjs} +33 -24
- package/dist/{chunk-AE4JKISB.mjs → chunk-EEI4FLEE.mjs} +1 -1
- package/dist/{chunk-IEQX4UVP.mjs → chunk-EY36WDCF.mjs} +1 -1
- package/dist/{chunk-HB5BKRMH.mjs → chunk-F3CU6KEI.mjs} +11 -1
- package/dist/chunk-H65NB7KI.mjs +182 -0
- package/dist/{chunk-TRM3KIHT.mjs → chunk-ICCPK3J2.mjs} +1 -1
- package/dist/{chunk-KGVVK6OS.mjs → chunk-ORMC3TV3.mjs} +3 -1
- package/dist/{chunk-HSXMTFIM.mjs → chunk-UD5UF5OC.mjs} +1 -1
- package/dist/{chunk-IW33VLL5.mjs → chunk-X3VEDQPO.mjs} +7 -3
- package/dist/{chunk-AAZSLTER.mjs → chunk-XGRSPFFC.mjs} +16 -7
- package/dist/components/ui/about-you-form.js +9 -6
- package/dist/components/ui/about-you-form.mjs +2 -2
- package/dist/components/ui/ai-conversations/index.js +4 -1
- package/dist/components/ui/ai-conversations/index.mjs +2 -2
- package/dist/components/ui/appointment-availability-settings.js +24 -12
- package/dist/components/ui/appointment-availability-settings.mjs +3 -3
- package/dist/components/ui/appointment-book-dialog.js +33 -24
- package/dist/components/ui/appointment-book-dialog.mjs +1 -1
- package/dist/components/ui/appointment-detail-sheet.js +3 -1
- package/dist/components/ui/appointment-detail-sheet.mjs +1 -1
- package/dist/components/ui/appointment-gmail-connect.js +127 -70
- package/dist/components/ui/appointment-gmail-connect.mjs +1 -1
- package/dist/components/ui/backoffice-signup-steps.js +23 -16
- package/dist/components/ui/backoffice-signup-steps.mjs +3 -3
- package/dist/components/ui/bank-statement-generate-dialog.js +12 -9
- package/dist/components/ui/bank-statement-generate-dialog.mjs +3 -3
- package/dist/components/ui/color-picker.js +21 -14
- package/dist/components/ui/color-picker.mjs +2 -2
- package/dist/components/ui/date-picker.js +6 -3
- package/dist/components/ui/date-picker.mjs +2 -2
- package/dist/components/ui/opportunity-edit-modals.js +45 -42
- package/dist/components/ui/opportunity-edit-modals.mjs +3 -3
- package/dist/components/ui/opportunity-summary-tab.js +48 -45
- package/dist/components/ui/opportunity-summary-tab.mjs +4 -4
- package/dist/components/ui/pipeline-dialogs.js +12 -9
- package/dist/components/ui/pipeline-dialogs.mjs +3 -3
- package/dist/components/ui/popover.js +22 -1
- package/dist/components/ui/popover.mjs +3 -1
- package/dist/components/ui/savings-goal-modal.js +11 -8
- package/dist/components/ui/savings-goal-modal.mjs +2 -2
- package/dist/index.js +349 -257
- package/dist/index.mjs +15 -13
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/index.tsx +4 -0
- package/src/components/ui/appointment-availability-settings.tsx +32 -19
- package/src/components/ui/appointment-book-dialog.tsx +52 -73
- package/src/components/ui/appointment-detail-sheet.tsx +3 -1
- package/src/components/ui/appointment-gmail-connect.tsx +89 -29
- package/src/components/ui/color-picker.tsx +12 -4
- package/src/components/ui/popover.tsx +33 -2
- package/src/styles/styles-css.ts +1 -1
- package/dist/chunk-7TMPOZDE.mjs +0 -122
|
@@ -10,8 +10,16 @@ import {
|
|
|
10
10
|
} from "./chunk-WNQUEZJF.mjs";
|
|
11
11
|
|
|
12
12
|
// src/components/ui/popover.tsx
|
|
13
|
+
import * as React from "react";
|
|
13
14
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
14
15
|
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
var PopoverPortalContext = React.createContext(void 0);
|
|
17
|
+
function PopoverPortalProvider({
|
|
18
|
+
container,
|
|
19
|
+
children
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsx(PopoverPortalContext.Provider, { value: container, children });
|
|
22
|
+
}
|
|
15
23
|
function Popover(_a) {
|
|
16
24
|
var props = __objRest(_a, []);
|
|
17
25
|
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
@@ -33,7 +41,8 @@ function PopoverContent(_a) {
|
|
|
33
41
|
"style"
|
|
34
42
|
]);
|
|
35
43
|
const themeVars = useThemeVars();
|
|
36
|
-
|
|
44
|
+
const portalContainer = React.useContext(PopoverPortalContext);
|
|
45
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ jsx(
|
|
37
46
|
PopoverPrimitive.Positioner,
|
|
38
47
|
{
|
|
39
48
|
className: "z-[200]",
|
|
@@ -104,6 +113,7 @@ function PopoverDescription(_a) {
|
|
|
104
113
|
}
|
|
105
114
|
|
|
106
115
|
export {
|
|
116
|
+
PopoverPortalProvider,
|
|
107
117
|
Popover,
|
|
108
118
|
PopoverTrigger,
|
|
109
119
|
PopoverContent,
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Separator
|
|
3
|
+
} from "./chunk-2GIYVERS.mjs";
|
|
4
|
+
import {
|
|
5
|
+
Badge
|
|
6
|
+
} from "./chunk-X6RC5UWB.mjs";
|
|
7
|
+
import {
|
|
8
|
+
Input
|
|
9
|
+
} from "./chunk-LBTHZSBT.mjs";
|
|
10
|
+
import {
|
|
11
|
+
Button
|
|
12
|
+
} from "./chunk-NOOEKOWY.mjs";
|
|
13
|
+
import {
|
|
14
|
+
cn
|
|
15
|
+
} from "./chunk-AFML43VJ.mjs";
|
|
16
|
+
|
|
17
|
+
// src/components/ui/appointment-gmail-connect.tsx
|
|
18
|
+
import { Check, Copy, ExternalLink, Link2, Mail, Settings } from "lucide-react";
|
|
19
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
+
function GmailIcon({ className }) {
|
|
21
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className, "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
22
|
+
"path",
|
|
23
|
+
{
|
|
24
|
+
fill: "#EA4335",
|
|
25
|
+
d: "M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z"
|
|
26
|
+
}
|
|
27
|
+
) });
|
|
28
|
+
}
|
|
29
|
+
function OutlookIcon({ className }) {
|
|
30
|
+
return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className, "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
31
|
+
"path",
|
|
32
|
+
{
|
|
33
|
+
fill: "#0078D4",
|
|
34
|
+
d: "M0 3.449L9.75 2.1v9.451H0m10.949-9.602L24 0v11.4H10.949M0 12.6h9.75v9.451L0 20.699M10.949 12.6H24V24l-12.9-1.801"
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
var PROVIDER_META = {
|
|
39
|
+
gmail: { label: "Gmail", iconBg: "bg-[#EA4335]/10", Icon: GmailIcon },
|
|
40
|
+
outlook: { label: "Outlook", iconBg: "bg-[#0078D4]/10", Icon: OutlookIcon }
|
|
41
|
+
};
|
|
42
|
+
var PERMISSIONS = [
|
|
43
|
+
"Read your calendar availability",
|
|
44
|
+
"Send appointment confirmation emails",
|
|
45
|
+
"Create calendar events on your behalf"
|
|
46
|
+
];
|
|
47
|
+
function AppointmentGmailConnect({
|
|
48
|
+
provider = "gmail",
|
|
49
|
+
connection,
|
|
50
|
+
calendarLink,
|
|
51
|
+
highlighted = false,
|
|
52
|
+
onCopyLink,
|
|
53
|
+
onGoToIntegrations
|
|
54
|
+
}) {
|
|
55
|
+
const { label, iconBg, Icon } = PROVIDER_META[provider];
|
|
56
|
+
if (connection.connected) {
|
|
57
|
+
return /* @__PURE__ */ jsxs(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: cn(
|
|
61
|
+
"flex flex-col border bg-card",
|
|
62
|
+
highlighted ? "border-primary" : "border-border"
|
|
63
|
+
),
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 px-5 py-4", children: [
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: cn(
|
|
70
|
+
"flex h-10 w-10 shrink-0 items-center justify-center",
|
|
71
|
+
iconBg
|
|
72
|
+
),
|
|
73
|
+
children: /* @__PURE__ */ jsx(Icon, { className: "h-5 w-5" })
|
|
74
|
+
}
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
77
|
+
/* @__PURE__ */ jsxs("p", { className: "text-base font-semibold", children: [
|
|
78
|
+
label,
|
|
79
|
+
" Connected"
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsx("p", { className: "truncate text-sm text-muted-foreground", children: connection.email })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 flex-col items-end gap-1.5", children: [
|
|
84
|
+
/* @__PURE__ */ jsxs(
|
|
85
|
+
Button,
|
|
86
|
+
{
|
|
87
|
+
size: "sm",
|
|
88
|
+
variant: "ghost",
|
|
89
|
+
className: "gap-1.5 text-muted-foreground",
|
|
90
|
+
onClick: onGoToIntegrations,
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsx(Settings, { className: "h-3.5 w-3.5" }),
|
|
93
|
+
"Manage"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
98
|
+
/* @__PURE__ */ jsxs(Badge, { variant: "success", children: [
|
|
99
|
+
/* @__PURE__ */ jsx(Check, { size: 10 }),
|
|
100
|
+
"Active"
|
|
101
|
+
] }),
|
|
102
|
+
connection.connectedAt && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
103
|
+
"Connected since ",
|
|
104
|
+
connection.connectedAt
|
|
105
|
+
] })
|
|
106
|
+
] })
|
|
107
|
+
] })
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
110
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 px-5 py-4", children: [
|
|
111
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: "Permissions granted" }),
|
|
112
|
+
PERMISSIONS.map((perm) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
113
|
+
/* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 shrink-0 text-success" }),
|
|
114
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: perm })
|
|
115
|
+
] }, perm))
|
|
116
|
+
] }),
|
|
117
|
+
calendarLink && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
118
|
+
/* @__PURE__ */ jsx(Separator, {}),
|
|
119
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2.5 px-5 py-4", children: [
|
|
120
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
121
|
+
/* @__PURE__ */ jsx(Link2, { className: "h-4 w-4 text-muted-foreground" }),
|
|
122
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: "Calendar Appointment Link" })
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Share with clients so they can self-book." }),
|
|
125
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
Input,
|
|
128
|
+
{
|
|
129
|
+
id: "calendar-link",
|
|
130
|
+
readOnly: true,
|
|
131
|
+
value: calendarLink,
|
|
132
|
+
className: "cursor-default select-all pr-10 text-muted-foreground"
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
Button,
|
|
137
|
+
{
|
|
138
|
+
type: "button",
|
|
139
|
+
variant: "ghost",
|
|
140
|
+
size: "icon",
|
|
141
|
+
onClick: onCopyLink,
|
|
142
|
+
className: "absolute right-1 top-1/2 h-8 w-8 -translate-y-1/2",
|
|
143
|
+
children: /* @__PURE__ */ jsx(Copy, { className: "h-4 w-4" })
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
] })
|
|
147
|
+
] })
|
|
148
|
+
] })
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4 border border-border bg-card px-6 py-8 text-center", children: [
|
|
154
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-12 w-12 items-center justify-center bg-muted", children: /* @__PURE__ */ jsx(Mail, { className: "h-6 w-6 text-muted-foreground" }) }),
|
|
155
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
156
|
+
/* @__PURE__ */ jsxs("p", { className: "text-base font-semibold", children: [
|
|
157
|
+
label,
|
|
158
|
+
" not connected"
|
|
159
|
+
] }),
|
|
160
|
+
/* @__PURE__ */ jsxs("p", { className: "max-w-xs text-sm text-muted-foreground", children: [
|
|
161
|
+
"Connect your ",
|
|
162
|
+
label,
|
|
163
|
+
" account in Integrations to enable calendar booking and appointment confirmations."
|
|
164
|
+
] })
|
|
165
|
+
] }),
|
|
166
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-xs flex-col gap-2 text-left", children: [
|
|
167
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: "Once connected, WealthX will be able to:" }),
|
|
168
|
+
PERMISSIONS.map((perm) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
169
|
+
/* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" }),
|
|
170
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: perm })
|
|
171
|
+
] }, perm))
|
|
172
|
+
] }),
|
|
173
|
+
/* @__PURE__ */ jsxs(Button, { onClick: onGoToIntegrations, className: "gap-2", children: [
|
|
174
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4" }),
|
|
175
|
+
"Go to Integrations"
|
|
176
|
+
] })
|
|
177
|
+
] });
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export {
|
|
181
|
+
AppointmentGmailConnect
|
|
182
|
+
};
|
|
@@ -73,11 +73,13 @@ var MEETING_FORMAT_META = {
|
|
|
73
73
|
icon: /* @__PURE__ */ jsx(Users, { className: ICON_CLASS }),
|
|
74
74
|
label: "Microsoft Teams"
|
|
75
75
|
},
|
|
76
|
+
online: { icon: /* @__PURE__ */ jsx(Video, { className: ICON_CLASS }), label: "Online Meeting" },
|
|
76
77
|
offline: { icon: /* @__PURE__ */ jsx(MapPin, { className: ICON_CLASS }), label: "In Person" }
|
|
77
78
|
};
|
|
78
79
|
var ONLINE_FORMATS = /* @__PURE__ */ new Set([
|
|
79
80
|
"google-meet",
|
|
80
|
-
"microsoft-teams"
|
|
81
|
+
"microsoft-teams",
|
|
82
|
+
"online"
|
|
81
83
|
]);
|
|
82
84
|
function AppointmentDetailSheet({
|
|
83
85
|
appointment,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Popover,
|
|
3
3
|
PopoverContent,
|
|
4
4
|
PopoverTrigger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-F3CU6KEI.mjs";
|
|
6
6
|
import {
|
|
7
7
|
Input
|
|
8
8
|
} from "./chunk-LBTHZSBT.mjs";
|
|
@@ -93,14 +93,18 @@ function ColorPickerContent({
|
|
|
93
93
|
presets = COLOR_PICKER_PRESETS
|
|
94
94
|
}) {
|
|
95
95
|
const [hexInput, setHexInput] = React.useState(value);
|
|
96
|
+
const hexInputRef = React.useRef(hexInput);
|
|
97
|
+
hexInputRef.current = hexInput;
|
|
96
98
|
React.useEffect(() => {
|
|
97
|
-
|
|
99
|
+
if (value !== hexInputRef.current) {
|
|
100
|
+
setHexInput(value);
|
|
101
|
+
}
|
|
98
102
|
}, [value]);
|
|
99
103
|
function handleHexInputChange(e) {
|
|
100
104
|
const raw = e.target.value;
|
|
101
105
|
setHexInput(raw);
|
|
102
106
|
const normalized = normalizeHex(raw);
|
|
103
|
-
if (
|
|
107
|
+
if (/^#[0-9A-Fa-f]{6}$/.test(normalized)) {
|
|
104
108
|
onChange(normalized);
|
|
105
109
|
}
|
|
106
110
|
}
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-2GIYVERS.mjs";
|
|
28
28
|
import {
|
|
29
29
|
DatePicker
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ICCPK3J2.mjs";
|
|
31
31
|
import {
|
|
32
32
|
formatDateWithWeekday
|
|
33
33
|
} from "./chunk-LHWJQNLG.mjs";
|
|
@@ -262,7 +262,8 @@ function AppointmentAvailabilitySettings({
|
|
|
262
262
|
blockedDates: blockedDatesProp,
|
|
263
263
|
publicHolidays: publicHolidaysProp,
|
|
264
264
|
onSave,
|
|
265
|
-
onBlockedDatesChange
|
|
265
|
+
onBlockedDatesChange,
|
|
266
|
+
onPrefsChange
|
|
266
267
|
}) {
|
|
267
268
|
var _a, _b, _c, _d, _e;
|
|
268
269
|
const [schedule, setSchedule] = React.useState(initialSchedule);
|
|
@@ -319,6 +320,7 @@ function AppointmentAvailabilitySettings({
|
|
|
319
320
|
);
|
|
320
321
|
const saveGuard = React.useRef(false);
|
|
321
322
|
const timeOffGuard = React.useRef(false);
|
|
323
|
+
const prefsChangeGuard = React.useRef(false);
|
|
322
324
|
React.useEffect(() => {
|
|
323
325
|
if (!saveGuard.current) {
|
|
324
326
|
saveGuard.current = true;
|
|
@@ -326,6 +328,13 @@ function AppointmentAvailabilitySettings({
|
|
|
326
328
|
}
|
|
327
329
|
onSave == null ? void 0 : onSave(schedule, currentPrefs);
|
|
328
330
|
}, [schedule, currentPrefs]);
|
|
331
|
+
React.useEffect(() => {
|
|
332
|
+
if (!prefsChangeGuard.current) {
|
|
333
|
+
prefsChangeGuard.current = true;
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
onPrefsChange == null ? void 0 : onPrefsChange(currentPrefs);
|
|
337
|
+
}, [currentPrefs]);
|
|
329
338
|
React.useEffect(() => {
|
|
330
339
|
if (!timeOffGuard.current) {
|
|
331
340
|
timeOffGuard.current = true;
|
|
@@ -436,7 +445,7 @@ function AppointmentAvailabilitySettings({
|
|
|
436
445
|
value: meetingDuration,
|
|
437
446
|
onValueChange: (v) => setMeetingDuration(v),
|
|
438
447
|
children: [
|
|
439
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-
|
|
448
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ jsx(SelectValue, { children: (v) => selectLabel(MEETING_DURATION_OPTIONS, v) }) }),
|
|
440
449
|
/* @__PURE__ */ jsx(SelectContent, { children: MEETING_DURATION_OPTIONS.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
441
450
|
]
|
|
442
451
|
}
|
|
@@ -454,7 +463,7 @@ function AppointmentAvailabilitySettings({
|
|
|
454
463
|
value: schedulingBuffer,
|
|
455
464
|
onValueChange: (v) => setSchedulingBuffer(v),
|
|
456
465
|
children: [
|
|
457
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-
|
|
466
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ jsx(SelectValue, { children: (v) => selectLabel(SCHEDULING_BUFFER_OPTIONS, v) }) }),
|
|
458
467
|
/* @__PURE__ */ jsx(SelectContent, { children: SCHEDULING_BUFFER_OPTIONS.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
459
468
|
]
|
|
460
469
|
}
|
|
@@ -472,7 +481,7 @@ function AppointmentAvailabilitySettings({
|
|
|
472
481
|
value: maxSlotsPerDay,
|
|
473
482
|
onValueChange: (v) => setMaxSlotsPerDay(v),
|
|
474
483
|
children: [
|
|
475
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-
|
|
484
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ jsx(SelectValue, { children: (v) => selectLabel(MAX_SLOTS_OPTIONS, v) }) }),
|
|
476
485
|
/* @__PURE__ */ jsx(SelectContent, { children: MAX_SLOTS_OPTIONS.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
477
486
|
]
|
|
478
487
|
}
|
|
@@ -490,7 +499,7 @@ function AppointmentAvailabilitySettings({
|
|
|
490
499
|
value: timezone,
|
|
491
500
|
onValueChange: (v) => setTimezone(v),
|
|
492
501
|
children: [
|
|
493
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-
|
|
502
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ jsx(SelectValue, { children: (v) => selectLabel(TIMEZONE_OPTIONS, v) }) }),
|
|
494
503
|
/* @__PURE__ */ jsx(SelectContent, { children: TIMEZONE_OPTIONS.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
495
504
|
]
|
|
496
505
|
}
|
|
@@ -510,7 +519,7 @@ function AppointmentAvailabilitySettings({
|
|
|
510
519
|
v
|
|
511
520
|
),
|
|
512
521
|
children: [
|
|
513
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-
|
|
522
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ jsx(SelectValue, { children: (v) => selectLabel(MEETING_PLATFORM_OPTIONS, v) }) }),
|
|
514
523
|
/* @__PURE__ */ jsx(SelectContent, { children: MEETING_PLATFORM_OPTIONS.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
515
524
|
]
|
|
516
525
|
}
|
|
@@ -155,7 +155,7 @@ function Label(_a) {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
// src/components/ui/date-picker.tsx
|
|
158
|
-
var
|
|
158
|
+
var React5 = __toESM(require("react"));
|
|
159
159
|
var import_date_fns2 = require("date-fns");
|
|
160
160
|
var import_lucide_react3 = require("lucide-react");
|
|
161
161
|
|
|
@@ -502,6 +502,7 @@ function CalendarDayButton(_a) {
|
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
// src/components/ui/popover.tsx
|
|
505
|
+
var React4 = __toESM(require("react"));
|
|
505
506
|
var import_popover = require("@base-ui/react/popover");
|
|
506
507
|
|
|
507
508
|
// src/lib/theme-provider.tsx
|
|
@@ -514,6 +515,7 @@ function useThemeVars() {
|
|
|
514
515
|
|
|
515
516
|
// src/components/ui/popover.tsx
|
|
516
517
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
518
|
+
var PopoverPortalContext = React4.createContext(void 0);
|
|
517
519
|
function Popover(_a) {
|
|
518
520
|
var props = __objRest(_a, []);
|
|
519
521
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
@@ -535,7 +537,8 @@ function PopoverContent(_a) {
|
|
|
535
537
|
"style"
|
|
536
538
|
]);
|
|
537
539
|
const themeVars = useThemeVars();
|
|
538
|
-
|
|
540
|
+
const portalContainer = React4.useContext(PopoverPortalContext);
|
|
541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popover.Popover.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
539
542
|
import_popover.Popover.Positioner,
|
|
540
543
|
{
|
|
541
544
|
className: "z-[200]",
|
|
@@ -567,7 +570,7 @@ function DatePicker({
|
|
|
567
570
|
className,
|
|
568
571
|
calendarProps
|
|
569
572
|
}) {
|
|
570
|
-
const [open, setOpen] =
|
|
573
|
+
const [open, setOpen] = React5.useState(false);
|
|
571
574
|
function handleDaySelect(day) {
|
|
572
575
|
if (!day) {
|
|
573
576
|
onChange == null ? void 0 : onChange(void 0);
|
|
@@ -656,7 +659,7 @@ function DatePicker({
|
|
|
656
659
|
}
|
|
657
660
|
|
|
658
661
|
// src/components/ui/toggle-group.tsx
|
|
659
|
-
var
|
|
662
|
+
var React6 = __toESM(require("react"));
|
|
660
663
|
var import_toggle_group = require("@base-ui/react/toggle-group");
|
|
661
664
|
var import_toggle2 = require("@base-ui/react/toggle");
|
|
662
665
|
|
|
@@ -687,7 +690,7 @@ var toggleVariants = (0, import_class_variance_authority2.cva)(
|
|
|
687
690
|
|
|
688
691
|
// src/components/ui/toggle-group.tsx
|
|
689
692
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
690
|
-
var ToggleGroupContext =
|
|
693
|
+
var ToggleGroupContext = React6.createContext({
|
|
691
694
|
size: "default",
|
|
692
695
|
variant: "default",
|
|
693
696
|
spacing: 0
|
|
@@ -739,7 +742,7 @@ function ToggleGroupItem(_a) {
|
|
|
739
742
|
"variant",
|
|
740
743
|
"size"
|
|
741
744
|
]);
|
|
742
|
-
const context =
|
|
745
|
+
const context = React6.useContext(ToggleGroupContext);
|
|
743
746
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
744
747
|
import_toggle2.Toggle,
|
|
745
748
|
__spreadProps(__spreadValues({
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "../../chunk-FFXTQTB4.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DatePicker
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
} from "../../chunk-ICCPK3J2.mjs";
|
|
7
|
+
import "../../chunk-F3CU6KEI.mjs";
|
|
8
8
|
import "../../chunk-OWFQSXVD.mjs";
|
|
9
9
|
import "../../chunk-6QAFGZC2.mjs";
|
|
10
10
|
import "../../chunk-FBNEIYSE.mjs";
|
|
@@ -1126,8 +1126,10 @@ function DropdownMenuSeparator(_a) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
|
|
1128
1128
|
// src/components/ui/popover.tsx
|
|
1129
|
+
var React4 = __toESM(require("react"));
|
|
1129
1130
|
var import_popover = require("@base-ui/react/popover");
|
|
1130
1131
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1132
|
+
var PopoverPortalContext = React4.createContext(void 0);
|
|
1131
1133
|
function Popover(_a) {
|
|
1132
1134
|
var props = __objRest(_a, []);
|
|
1133
1135
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
@@ -1149,7 +1151,8 @@ function PopoverContent(_a) {
|
|
|
1149
1151
|
"style"
|
|
1150
1152
|
]);
|
|
1151
1153
|
const themeVars = useThemeVars();
|
|
1152
|
-
|
|
1154
|
+
const portalContainer = React4.useContext(PopoverPortalContext);
|
|
1155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_popover.Popover.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1153
1156
|
import_popover.Popover.Positioner,
|
|
1154
1157
|
{
|
|
1155
1158
|
className: "z-[200]",
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ConversationStatusChip,
|
|
10
10
|
ConversationsPage,
|
|
11
11
|
LeadInfoPanel
|
|
12
|
-
} from "../../../chunk-
|
|
12
|
+
} from "../../../chunk-EEI4FLEE.mjs";
|
|
13
13
|
import "../../../chunk-3S6KVFF5.mjs";
|
|
14
14
|
import "../../../chunk-WE4YKBDE.mjs";
|
|
15
15
|
import "../../../chunk-T5FRVEJQ.mjs";
|
|
@@ -18,7 +18,7 @@ import "../../../chunk-H6NQTIF4.mjs";
|
|
|
18
18
|
import "../../../chunk-2GIYVERS.mjs";
|
|
19
19
|
import "../../../chunk-BS75ICOO.mjs";
|
|
20
20
|
import "../../../chunk-X6RC5UWB.mjs";
|
|
21
|
-
import "../../../chunk-
|
|
21
|
+
import "../../../chunk-F3CU6KEI.mjs";
|
|
22
22
|
import "../../../chunk-OWFQSXVD.mjs";
|
|
23
23
|
import "../../../chunk-6QAFGZC2.mjs";
|
|
24
24
|
import "../../../chunk-LBTHZSBT.mjs";
|
|
@@ -232,7 +232,7 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
|
232
232
|
});
|
|
233
233
|
|
|
234
234
|
// src/components/ui/date-picker.tsx
|
|
235
|
-
var
|
|
235
|
+
var React5 = __toESM(require("react"));
|
|
236
236
|
var import_date_fns2 = require("date-fns");
|
|
237
237
|
var import_lucide_react3 = require("lucide-react");
|
|
238
238
|
|
|
@@ -479,6 +479,7 @@ function CalendarDayButton(_a) {
|
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
// src/components/ui/popover.tsx
|
|
482
|
+
var React4 = __toESM(require("react"));
|
|
482
483
|
var import_popover = require("@base-ui/react/popover");
|
|
483
484
|
|
|
484
485
|
// src/lib/theme-provider.tsx
|
|
@@ -491,6 +492,7 @@ function useThemeVars() {
|
|
|
491
492
|
|
|
492
493
|
// src/components/ui/popover.tsx
|
|
493
494
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
495
|
+
var PopoverPortalContext = React4.createContext(void 0);
|
|
494
496
|
function Popover(_a) {
|
|
495
497
|
var props = __objRest(_a, []);
|
|
496
498
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
|
|
@@ -512,7 +514,8 @@ function PopoverContent(_a) {
|
|
|
512
514
|
"style"
|
|
513
515
|
]);
|
|
514
516
|
const themeVars = useThemeVars();
|
|
515
|
-
|
|
517
|
+
const portalContainer = React4.useContext(PopoverPortalContext);
|
|
518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_popover.Popover.Portal, { container: portalContainer != null ? portalContainer : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
516
519
|
import_popover.Popover.Positioner,
|
|
517
520
|
{
|
|
518
521
|
className: "z-[200]",
|
|
@@ -544,7 +547,7 @@ function DatePicker({
|
|
|
544
547
|
className,
|
|
545
548
|
calendarProps
|
|
546
549
|
}) {
|
|
547
|
-
const [open, setOpen] =
|
|
550
|
+
const [open, setOpen] = React5.useState(false);
|
|
548
551
|
function handleDaySelect(day) {
|
|
549
552
|
if (!day) {
|
|
550
553
|
onChange == null ? void 0 : onChange(void 0);
|
|
@@ -841,11 +844,11 @@ function Label(_a) {
|
|
|
841
844
|
}
|
|
842
845
|
|
|
843
846
|
// src/components/ui/select.tsx
|
|
844
|
-
var
|
|
847
|
+
var React6 = __toESM(require("react"));
|
|
845
848
|
var import_lucide_react5 = require("lucide-react");
|
|
846
849
|
var import_select = require("@base-ui/react/select");
|
|
847
850
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
848
|
-
var SelectPortalContext =
|
|
851
|
+
var SelectPortalContext = React6.createContext(
|
|
849
852
|
void 0
|
|
850
853
|
);
|
|
851
854
|
function Select(_a) {
|
|
@@ -894,7 +897,7 @@ function SelectContent(_a) {
|
|
|
894
897
|
"style"
|
|
895
898
|
]);
|
|
896
899
|
const themeVars = useThemeVars();
|
|
897
|
-
const portalContainer =
|
|
900
|
+
const portalContainer = React6.useContext(SelectPortalContext);
|
|
898
901
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_select.Select.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
899
902
|
import_select.Select.Positioner,
|
|
900
903
|
{
|
|
@@ -1377,7 +1380,8 @@ function AppointmentAvailabilitySettings({
|
|
|
1377
1380
|
blockedDates: blockedDatesProp,
|
|
1378
1381
|
publicHolidays: publicHolidaysProp,
|
|
1379
1382
|
onSave,
|
|
1380
|
-
onBlockedDatesChange
|
|
1383
|
+
onBlockedDatesChange,
|
|
1384
|
+
onPrefsChange
|
|
1381
1385
|
}) {
|
|
1382
1386
|
var _a, _b, _c, _d, _e;
|
|
1383
1387
|
const [schedule, setSchedule] = import_react4.default.useState(initialSchedule);
|
|
@@ -1434,6 +1438,7 @@ function AppointmentAvailabilitySettings({
|
|
|
1434
1438
|
);
|
|
1435
1439
|
const saveGuard = import_react4.default.useRef(false);
|
|
1436
1440
|
const timeOffGuard = import_react4.default.useRef(false);
|
|
1441
|
+
const prefsChangeGuard = import_react4.default.useRef(false);
|
|
1437
1442
|
import_react4.default.useEffect(() => {
|
|
1438
1443
|
if (!saveGuard.current) {
|
|
1439
1444
|
saveGuard.current = true;
|
|
@@ -1441,6 +1446,13 @@ function AppointmentAvailabilitySettings({
|
|
|
1441
1446
|
}
|
|
1442
1447
|
onSave == null ? void 0 : onSave(schedule, currentPrefs);
|
|
1443
1448
|
}, [schedule, currentPrefs]);
|
|
1449
|
+
import_react4.default.useEffect(() => {
|
|
1450
|
+
if (!prefsChangeGuard.current) {
|
|
1451
|
+
prefsChangeGuard.current = true;
|
|
1452
|
+
return;
|
|
1453
|
+
}
|
|
1454
|
+
onPrefsChange == null ? void 0 : onPrefsChange(currentPrefs);
|
|
1455
|
+
}, [currentPrefs]);
|
|
1444
1456
|
import_react4.default.useEffect(() => {
|
|
1445
1457
|
if (!timeOffGuard.current) {
|
|
1446
1458
|
timeOffGuard.current = true;
|
|
@@ -1551,7 +1563,7 @@ function AppointmentAvailabilitySettings({
|
|
|
1551
1563
|
value: meetingDuration,
|
|
1552
1564
|
onValueChange: (v) => setMeetingDuration(v),
|
|
1553
1565
|
children: [
|
|
1554
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-
|
|
1566
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectValue, { children: (v) => selectLabel(MEETING_DURATION_OPTIONS, v) }) }),
|
|
1555
1567
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectContent, { children: MEETING_DURATION_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1556
1568
|
]
|
|
1557
1569
|
}
|
|
@@ -1569,7 +1581,7 @@ function AppointmentAvailabilitySettings({
|
|
|
1569
1581
|
value: schedulingBuffer,
|
|
1570
1582
|
onValueChange: (v) => setSchedulingBuffer(v),
|
|
1571
1583
|
children: [
|
|
1572
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-
|
|
1584
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectValue, { children: (v) => selectLabel(SCHEDULING_BUFFER_OPTIONS, v) }) }),
|
|
1573
1585
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectContent, { children: SCHEDULING_BUFFER_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1574
1586
|
]
|
|
1575
1587
|
}
|
|
@@ -1587,7 +1599,7 @@ function AppointmentAvailabilitySettings({
|
|
|
1587
1599
|
value: maxSlotsPerDay,
|
|
1588
1600
|
onValueChange: (v) => setMaxSlotsPerDay(v),
|
|
1589
1601
|
children: [
|
|
1590
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-
|
|
1602
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectValue, { children: (v) => selectLabel(MAX_SLOTS_OPTIONS, v) }) }),
|
|
1591
1603
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectContent, { children: MAX_SLOTS_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1592
1604
|
]
|
|
1593
1605
|
}
|
|
@@ -1605,7 +1617,7 @@ function AppointmentAvailabilitySettings({
|
|
|
1605
1617
|
value: timezone,
|
|
1606
1618
|
onValueChange: (v) => setTimezone(v),
|
|
1607
1619
|
children: [
|
|
1608
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-
|
|
1620
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectValue, { children: (v) => selectLabel(TIMEZONE_OPTIONS, v) }) }),
|
|
1609
1621
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectContent, { children: TIMEZONE_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1610
1622
|
]
|
|
1611
1623
|
}
|
|
@@ -1625,7 +1637,7 @@ function AppointmentAvailabilitySettings({
|
|
|
1625
1637
|
v
|
|
1626
1638
|
),
|
|
1627
1639
|
children: [
|
|
1628
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-
|
|
1640
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectTrigger, { className: "w-64", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectValue, { children: (v) => selectLabel(MEETING_PLATFORM_OPTIONS, v) }) }),
|
|
1629
1641
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectContent, { children: MEETING_PLATFORM_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1630
1642
|
]
|
|
1631
1643
|
}
|