@elevasis/ui 2.33.2 → 2.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/dist/api/index.d.ts +9 -2
  2. package/dist/api/index.js +1 -1
  3. package/dist/app/index.css +452 -0
  4. package/dist/app/index.d.ts +1250 -3
  5. package/dist/app/index.js +144 -8
  6. package/dist/charts/index.js +2 -3
  7. package/dist/{chunk-VGU4ZFYZ.js → chunk-3AJVNMY5.js} +45 -28
  8. package/dist/chunk-3QXJK5IY.js +25 -0
  9. package/dist/chunk-4O4MII5S.js +4716 -0
  10. package/dist/{chunk-KW7ZNQD7.js → chunk-5EYJ2GIN.js} +4 -8
  11. package/dist/{chunk-OIBHQH5Q.js → chunk-BPQVTIUP.js} +12 -3
  12. package/dist/{chunk-52K5RFDH.js → chunk-DTFKWZ7A.js} +1098 -2280
  13. package/dist/{chunk-EPTHX4VZ.js → chunk-HRWLKKWM.js} +11 -2
  14. package/dist/{chunk-ZMK5Z6KE.js → chunk-IGDYWFNE.js} +2 -2
  15. package/dist/{chunk-44I4LOH6.js → chunk-IVGI4GDL.js} +3 -3
  16. package/dist/{chunk-4DYOXEH6.js → chunk-LAWLB6CT.js} +1 -1
  17. package/dist/{chunk-TGVAIWIL.js → chunk-LRWTWOGP.js} +3 -3
  18. package/dist/{chunk-O56ESZCQ.js → chunk-MP3GPBPX.js} +3 -3
  19. package/dist/{chunk-T3J6U77J.js → chunk-NLBQTDOW.js} +12 -17
  20. package/dist/{chunk-IBWMR4TI.js → chunk-O6JXQ6UQ.js} +1 -2
  21. package/dist/{chunk-TBVLQRXT.js → chunk-OBBQ2JCM.js} +3 -3
  22. package/dist/{chunk-GWGQI6V4.js → chunk-PLP3NYPL.js} +80 -171
  23. package/dist/{chunk-Z2K2EAPL.js → chunk-RIAXZ6AH.js} +5 -6
  24. package/dist/chunk-SDXSB3HN.js +425 -0
  25. package/dist/{chunk-JA5ECJJB.js → chunk-VTXTZXAU.js} +156 -4
  26. package/dist/{chunk-32I2RCGC.js → chunk-W73ZABT6.js} +1 -1
  27. package/dist/{chunk-2ZZ72TAB.js → chunk-WU4FNWCW.js} +3 -3
  28. package/dist/{chunk-A4VDJJCV.js → chunk-YNWZIWJL.js} +4 -5
  29. package/dist/components/index.d.ts +0 -23
  30. package/dist/components/index.js +27 -448
  31. package/dist/components/navigation/index.js +4 -6
  32. package/dist/features/clients/index.js +7 -12
  33. package/dist/features/crm/index.js +9 -14
  34. package/dist/features/dashboard/index.d.ts +0 -23
  35. package/dist/features/dashboard/index.js +9 -14
  36. package/dist/features/delivery/index.js +8 -13
  37. package/dist/features/knowledge/index.js +5 -7
  38. package/dist/features/lead-gen/index.js +9 -14
  39. package/dist/features/monitoring/index.js +10 -15
  40. package/dist/features/monitoring/requests/index.js +7 -12
  41. package/dist/features/operations/index.d.ts +44 -35
  42. package/dist/features/operations/index.js +12 -17
  43. package/dist/features/settings/index.js +8 -13
  44. package/dist/hooks/index.d.ts +20 -27
  45. package/dist/hooks/index.js +7 -12
  46. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +20 -27
  47. package/dist/hooks/published.d.ts +20 -27
  48. package/dist/hooks/published.js +7 -12
  49. package/dist/index.d.ts +53 -38
  50. package/dist/index.js +8 -13
  51. package/dist/knowledge/index.d.ts +30 -38
  52. package/dist/knowledge/index.js +36 -200
  53. package/dist/{knowledge-search-index-VMAW7FLR.js → knowledge-search-index-ORIJCEZX.js} +3 -3
  54. package/dist/organization/index.js +1 -2
  55. package/dist/provider/index.d.ts +24 -31
  56. package/dist/provider/index.js +6 -11
  57. package/dist/provider/published.d.ts +24 -31
  58. package/dist/provider/published.js +5 -9
  59. package/dist/test-utils/index.d.ts +2 -0
  60. package/dist/test-utils/index.js +14 -2
  61. package/dist/test-utils/setup.js +38 -0
  62. package/dist/types/index.d.ts +20 -27
  63. package/dist/utils/index.d.ts +0 -23
  64. package/dist/zustand/index.d.ts +15 -2
  65. package/dist/zustand/index.js +35 -1
  66. package/package.json +4 -4
  67. package/dist/chunk-HUJCU55S.js +0 -159
  68. package/dist/chunk-IOXOPMYS.js +0 -145
  69. package/dist/chunk-J2UD7BOH.js +0 -347
  70. package/dist/chunk-QDFJSUG3.js +0 -13
  71. package/dist/chunk-SZHARWKU.js +0 -15
  72. package/dist/chunk-WKW6B5ID.js +0 -29
  73. package/dist/chunk-XCYKC6OZ.js +0 -1
@@ -1,145 +0,0 @@
1
- import { IconMail, IconSend, IconFileText, IconClock, IconArrowUp, IconMessageCircle, IconRocket, IconEye, IconEdit, IconAlertTriangle, IconRefresh, IconX, IconCheck, IconShieldLock, IconActivity, IconTopologyStar3, IconApps, IconBriefcase, IconBuilding, IconBolt, IconSearch, IconChartBar, IconUsers, IconInfoCircle, IconDatabase, IconGitBranch, IconDashboard, IconBuildingStore, IconUser, IconPlug, IconBrain, IconTargetArrow, IconBook, IconLayoutGrid, IconArchive, IconSettings, IconTool, IconCalendar } from '@tabler/icons-react';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- // src/icons/registry.tsx
5
- var DEFAULT_SEMANTIC_ICON_REGISTRY = {
6
- // Navigation / app areas
7
- dashboard: IconDashboard,
8
- calendar: IconCalendar,
9
- sales: IconChartBar,
10
- crm: IconBuildingStore,
11
- "lead-gen": IconTargetArrow,
12
- projects: IconBriefcase,
13
- operations: IconTool,
14
- monitoring: IconChartBar,
15
- knowledge: IconBrain,
16
- settings: IconSettings,
17
- admin: IconShieldLock,
18
- archive: IconArchive,
19
- business: IconBriefcase,
20
- finance: IconChartBar,
21
- platform: IconLayoutGrid,
22
- seo: IconSearch,
23
- // Knowledge kinds
24
- playbook: IconBook,
25
- strategy: IconTargetArrow,
26
- reference: IconFileText,
27
- // Resource kinds
28
- agent: IconBrain,
29
- workflow: IconGitBranch,
30
- integration: IconPlug,
31
- database: IconDatabase,
32
- user: IconUser,
33
- team: IconUsers,
34
- // Integration specifics
35
- gmail: IconMail,
36
- "google-sheets": IconDatabase,
37
- attio: IconBuildingStore,
38
- // Surface / UI views
39
- overview: IconDashboard,
40
- "command-view": IconTopologyStar3,
41
- "command-queue": IconSend,
42
- pipeline: IconGitBranch,
43
- lists: IconFileText,
44
- resources: IconDatabase,
45
- // Actions
46
- approve: IconCheck,
47
- reject: IconX,
48
- retry: IconRefresh,
49
- edit: IconEdit,
50
- view: IconEye,
51
- launch: IconRocket,
52
- message: IconMessageCircle,
53
- escalate: IconAlertTriangle,
54
- promote: IconArrowUp,
55
- submit: IconSend,
56
- email: IconMail,
57
- // Status
58
- success: IconCheck,
59
- error: IconX,
60
- warning: IconAlertTriangle,
61
- info: IconInfoCircle,
62
- pending: IconClock,
63
- // OM / UI group icons
64
- bolt: IconBolt,
65
- building: IconBuilding,
66
- briefcase: IconBriefcase,
67
- apps: IconApps,
68
- graph: IconTopologyStar3,
69
- shield: IconShieldLock,
70
- users: IconUsers,
71
- "chart-bar": IconChartBar,
72
- search: IconSearch,
73
- // UI-only om.* group tokens (not in the core enum — kept for registry lookup
74
- // by components that reference them directly via extendSemanticIconRegistry)
75
- "om.quick-access": IconBolt,
76
- "om.profile": IconBuilding,
77
- "om.business-model": IconBriefcase,
78
- "om.systems": IconApps,
79
- "om.graph": IconTopologyStar3,
80
- "om.governance-wiring": IconShieldLock,
81
- // Graph node-kind fallback tokens (used internally by knowledge-tree helpers)
82
- "entity.record": IconActivity,
83
- "event.lifecycle": IconActivity,
84
- "policy.governance": IconShieldLock,
85
- // Compatibility aliases for existing command queue payloads.
86
- IconCheck,
87
- IconX,
88
- IconRefresh,
89
- IconAlertTriangle,
90
- IconEdit,
91
- IconEye,
92
- IconRocket,
93
- IconMessageCircle,
94
- IconArrowUp,
95
- IconClock,
96
- IconFileText,
97
- IconSend,
98
- IconMail
99
- };
100
- var semanticIconRegistry = { ...DEFAULT_SEMANTIC_ICON_REGISTRY };
101
- function extendSemanticIconRegistry(overrides) {
102
- semanticIconRegistry = { ...semanticIconRegistry, ...overrides };
103
- }
104
- function getSemanticIconComponent(token, fallbackToken) {
105
- const icon = resolveSemanticIconComponent(token);
106
- if (icon) return icon;
107
- if (fallbackToken && semanticIconRegistry[fallbackToken]) return semanticIconRegistry[fallbackToken];
108
- return IconInfoCircle;
109
- }
110
- function resolveSemanticIconComponent(token) {
111
- if (!token) return null;
112
- return semanticIconRegistry[token] ?? null;
113
- }
114
- function SemanticIcon({
115
- token,
116
- fallbackToken,
117
- size = 16,
118
- stroke = 1.8,
119
- className,
120
- style,
121
- "aria-hidden": ariaHidden = true
122
- }) {
123
- const Icon = getSemanticIconComponent(token, fallbackToken);
124
- return /* @__PURE__ */ jsx(
125
- "span",
126
- {
127
- className,
128
- "aria-hidden": ariaHidden,
129
- style: {
130
- display: "inline-flex",
131
- alignItems: "center",
132
- justifyContent: "center",
133
- width: size,
134
- height: size,
135
- minWidth: size,
136
- color: "currentColor",
137
- flexShrink: 0,
138
- ...style
139
- },
140
- children: /* @__PURE__ */ jsx(Icon, { size, stroke })
141
- }
142
- );
143
- }
144
-
145
- export { SemanticIcon, extendSemanticIconRegistry, getSemanticIconComponent, resolveSemanticIconComponent };
@@ -1,347 +0,0 @@
1
- import { SubshellNavItem } from './chunk-X4WBGKJQ.js';
2
- import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
3
- import { useDealsLookup, useCreateDealTask, useDealTasksDue } from './chunk-ZMK5Z6KE.js';
4
- import { useRouterContext } from './chunk-Q7DJKLEN.js';
5
- import { Box, Stack, Text, UnstyledButton, Group, Button, Modal, Title, Select, TextInput, Textarea, Badge, Center, Loader } from '@mantine/core';
6
- import { IconLayoutGrid, IconColumns, IconFileInvoice, IconList, IconBuilding, IconAddressBook, IconTrophy, IconClockExclamation, IconUser, IconPlus, IconChecklist, IconTarget, IconCheckbox, IconCalendar, IconMail, IconPhone } from '@tabler/icons-react';
7
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
- import { useState } from 'react';
9
-
10
- // src/features/crm/workbench/constants.ts
11
- var SAVED_VIEW_PRESETS = [
12
- {
13
- id: "my-deals",
14
- label: "My Deals",
15
- iconName: "IconUser",
16
- target: "/crm/deals"
17
- },
18
- {
19
- id: "overdue",
20
- label: "Overdue",
21
- iconName: "IconClockExclamation",
22
- target: "/crm/deals"
23
- },
24
- {
25
- id: "won-this-month",
26
- label: "Won this month",
27
- iconName: "IconTrophy",
28
- target: "/crm/deals",
29
- urlFilters: { stage: "closed_won" }
30
- }
31
- ];
32
- var ICON_MAP = {
33
- IconUser,
34
- IconClockExclamation,
35
- IconTrophy
36
- };
37
- function SavedViewsPanel({ onViewClick, showSectionLabel = true }) {
38
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
39
- showSectionLabel && /* @__PURE__ */ jsx(Text, { fz: "xs", tt: "uppercase", c: "dimmed", fw: 600, mb: 4, children: "Saved Views" }),
40
- SAVED_VIEW_PRESETS.map((preset) => {
41
- const Icon = ICON_MAP[preset.iconName];
42
- return /* @__PURE__ */ jsx(
43
- UnstyledButton,
44
- {
45
- onClick: () => onViewClick(preset),
46
- style: {
47
- display: "block",
48
- width: "100%",
49
- padding: "4px 6px",
50
- borderRadius: "var(--mantine-radius-sm)",
51
- transition: `background-color var(--duration-fast) var(--easing)`
52
- },
53
- onMouseEnter: (e) => {
54
- e.currentTarget.style.backgroundColor = "var(--color-surface-hover)";
55
- },
56
- onMouseLeave: (e) => {
57
- e.currentTarget.style.backgroundColor = "transparent";
58
- },
59
- children: /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
60
- /* @__PURE__ */ jsx(Icon, { size: 14, style: { color: "var(--color-text-dimmed)", flexShrink: 0 } }),
61
- /* @__PURE__ */ jsx(Text, { size: "xs", children: preset.label })
62
- ] })
63
- },
64
- preset.id
65
- );
66
- })
67
- ] }) });
68
- }
69
- var KIND_OPTIONS = [
70
- { value: "call", label: "Call" },
71
- { value: "email", label: "Email" },
72
- { value: "meeting", label: "Meeting" },
73
- { value: "other", label: "Other" }
74
- ];
75
- function QuickCreateActions({ showSectionLabel = true }) {
76
- const [open, setOpen] = useState(false);
77
- const [dealId, setDealId] = useState(null);
78
- const [dealSearch, setDealSearch] = useState("");
79
- const [title, setTitle] = useState("");
80
- const [description, setDescription] = useState("");
81
- const [kind, setKind] = useState("other");
82
- const [dueAt, setDueAt] = useState("");
83
- const { data: deals, isLoading: isLoadingDeals } = useDealsLookup(
84
- {
85
- search: dealSearch || void 0,
86
- limit: 25
87
- },
88
- { enabled: open }
89
- );
90
- const createTask = useCreateDealTask();
91
- const dealOptions = (deals ?? []).map((deal) => ({
92
- value: deal.id,
93
- label: deal.displayLabel
94
- }));
95
- function resetForm() {
96
- setDealId(null);
97
- setDealSearch("");
98
- setTitle("");
99
- setDescription("");
100
- setKind("other");
101
- setDueAt("");
102
- }
103
- function handleClose() {
104
- setOpen(false);
105
- resetForm();
106
- }
107
- async function handleSubmit() {
108
- if (!dealId || !title) return;
109
- await createTask.mutateAsync({
110
- dealId,
111
- title,
112
- description: description || null,
113
- kind,
114
- dueAt: dueAt ? new Date(dueAt).toISOString() : null
115
- });
116
- handleClose();
117
- }
118
- const isSubmitDisabled = !dealId || !title || createTask.isPending;
119
- return /* @__PURE__ */ jsxs(Fragment, { children: [
120
- /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
121
- showSectionLabel && /* @__PURE__ */ jsx(Text, { fz: "xs", tt: "uppercase", c: "dimmed", fw: 600, children: "TASKS" }),
122
- /* @__PURE__ */ jsx(Button, { variant: "light", size: "xs", leftSection: /* @__PURE__ */ jsx(IconPlus, { size: 14 }), fullWidth: true, onClick: () => setOpen(true), children: "New Task" })
123
- ] }),
124
- /* @__PURE__ */ jsxs(Modal, { opened: open, onClose: handleClose, size: "md", children: [
125
- /* @__PURE__ */ jsxs(Stack, { gap: "sm", children: [
126
- /* @__PURE__ */ jsx(Title, { order: 3, children: "New Task" }),
127
- /* @__PURE__ */ jsx(
128
- Select,
129
- {
130
- label: "Deal",
131
- placeholder: "Search deals",
132
- data: dealOptions,
133
- value: dealId,
134
- onChange: setDealId,
135
- searchValue: dealSearch,
136
- onSearchChange: setDealSearch,
137
- searchable: true,
138
- nothingFoundMessage: dealSearch ? "No matching deals" : "No deals available",
139
- disabled: isLoadingDeals,
140
- required: true
141
- }
142
- ),
143
- /* @__PURE__ */ jsx(
144
- TextInput,
145
- {
146
- label: "Title",
147
- placeholder: "Task title",
148
- value: title,
149
- onChange: (e) => setTitle(e.currentTarget.value),
150
- required: true
151
- }
152
- ),
153
- /* @__PURE__ */ jsx(
154
- Textarea,
155
- {
156
- label: "Description",
157
- placeholder: "Optional description",
158
- value: description,
159
- onChange: (e) => setDescription(e.currentTarget.value),
160
- autosize: true,
161
- minRows: 2,
162
- maxRows: 5
163
- }
164
- ),
165
- /* @__PURE__ */ jsx(
166
- Select,
167
- {
168
- label: "Kind",
169
- data: KIND_OPTIONS,
170
- value: kind,
171
- onChange: (v) => setKind(v ?? "other")
172
- }
173
- ),
174
- /* @__PURE__ */ jsx(
175
- TextInput,
176
- {
177
- type: "datetime-local",
178
- label: "Due At",
179
- value: dueAt,
180
- onChange: (e) => setDueAt(e.currentTarget.value)
181
- }
182
- )
183
- ] }),
184
- /* @__PURE__ */ jsxs(Group, { justify: "flex-end", mt: "md", children: [
185
- /* @__PURE__ */ jsx(Button, { variant: "default", onClick: handleClose, children: "Cancel" }),
186
- /* @__PURE__ */ jsx(Button, { onClick: handleSubmit, loading: createTask.isPending, disabled: isSubmitDisabled, children: "Create" })
187
- ] })
188
- ] })
189
- ] });
190
- }
191
- var CRM_ITEMS = [
192
- { label: "Overview", to: "/crm", icon: IconLayoutGrid, exact: true },
193
- { label: "Pipeline", to: "/crm/pipeline", icon: IconColumns, exact: false },
194
- { label: "Deals", to: "/crm/deals", icon: IconFileInvoice, exact: false }
195
- ];
196
- var CrmSidebarMiddle = ({ items = CRM_ITEMS } = {}) => {
197
- const { currentPath, navigate } = useRouterContext();
198
- return /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { flex: 1, overflowY: "auto" }, children: [
199
- /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: items.map((item) => {
200
- const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
201
- return /* @__PURE__ */ jsx(
202
- SubshellNavItem,
203
- {
204
- icon: item.icon,
205
- label: item.label,
206
- isActive,
207
- href: item.to,
208
- onClick: () => navigate(item.to)
209
- },
210
- item.to
211
- );
212
- }) }),
213
- /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconChecklist, label: "My Tasks", withTopBorder: true }),
214
- /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: /* @__PURE__ */ jsx(
215
- MyTasksPanel,
216
- {
217
- onTaskClick: (dealId) => navigate(`/crm/deals/${dealId}`),
218
- onSeeAll: () => navigate("/crm/deals"),
219
- showSectionLabel: false,
220
- footer: /* @__PURE__ */ jsx(QuickCreateActions, { showSectionLabel: false })
221
- }
222
- ) })
223
- ] });
224
- };
225
- var LEAD_GEN_ITEMS = [
226
- { label: "Overview", to: "/lead-gen", icon: IconLayoutGrid, exact: true },
227
- { label: "Lists", to: "/lead-gen/lists", icon: IconList, exact: false },
228
- { label: "Companies", to: "/lead-gen/companies", icon: IconBuilding, exact: false },
229
- { label: "Contacts", to: "/lead-gen/contacts", icon: IconAddressBook, exact: false }
230
- ];
231
- var LeadGenSidebarMiddle = ({ items = LEAD_GEN_ITEMS } = {}) => {
232
- const { currentPath, navigate } = useRouterContext();
233
- return /* @__PURE__ */ jsx(Stack, { gap: 0, style: { flex: 1, overflowY: "auto" }, children: /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: items.map((item) => {
234
- const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
235
- return /* @__PURE__ */ jsx(
236
- SubshellNavItem,
237
- {
238
- icon: item.icon,
239
- label: item.label,
240
- isActive,
241
- href: item.to,
242
- onClick: () => navigate(item.to)
243
- },
244
- item.to
245
- );
246
- }) }) });
247
- };
248
- var renderItems = (items, currentPath, navigate) => items.map((item) => {
249
- const isActive = item.exact ? currentPath === item.to || currentPath === `${item.to}/` : currentPath.startsWith(item.to);
250
- return /* @__PURE__ */ jsx(
251
- SubshellNavItem,
252
- {
253
- icon: item.icon,
254
- label: item.label,
255
- isActive,
256
- href: item.to,
257
- onClick: () => navigate(item.to)
258
- },
259
- item.to
260
- );
261
- });
262
- var SalesSidebar = () => {
263
- const { currentPath, navigate } = useRouterContext();
264
- return /* @__PURE__ */ jsx(Stack, { gap: 0, style: { height: "100%", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsxs(Stack, { gap: 0, style: { flex: 1, overflowY: "auto" }, children: [
265
- /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconTarget, label: "Lead Gen" }),
266
- /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(LEAD_GEN_ITEMS, currentPath, navigate) }),
267
- /* @__PURE__ */ jsx(SubshellSidebarSection, { icon: IconAddressBook, label: "CRM", withTopBorder: true }),
268
- /* @__PURE__ */ jsx(Stack, { gap: 0, p: "sm", children: renderItems(CRM_ITEMS, currentPath, navigate) })
269
- ] }) });
270
- };
271
- var KIND_ICONS = {
272
- call: IconPhone,
273
- email: IconMail,
274
- meeting: IconCalendar,
275
- other: IconCheckbox
276
- };
277
- function formatDueLabel(dueAt) {
278
- if (!dueAt) return "";
279
- const date = new Date(dueAt);
280
- const now = /* @__PURE__ */ new Date();
281
- const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
282
- const dueDay = new Date(date.getFullYear(), date.getMonth(), date.getDate());
283
- const diffDays = Math.round((dueDay.getTime() - today.getTime()) / 864e5);
284
- if (diffDays < 0) return `${Math.abs(diffDays)}d overdue`;
285
- if (diffDays === 0) {
286
- return date.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
287
- }
288
- return `in ${diffDays}d`;
289
- }
290
- function TaskRow({ task, onClick }) {
291
- const KindIcon = KIND_ICONS[task.kind];
292
- const dueLabel = formatDueLabel(task.dueAt);
293
- const isOverdue = task.dueAt !== null && new Date(task.dueAt) < /* @__PURE__ */ new Date();
294
- return /* @__PURE__ */ jsx(
295
- UnstyledButton,
296
- {
297
- onClick,
298
- style: {
299
- display: "block",
300
- width: "100%",
301
- padding: "4px 6px",
302
- borderRadius: "var(--mantine-radius-sm)",
303
- transition: `background-color var(--duration-fast) var(--easing)`
304
- },
305
- onMouseEnter: (e) => {
306
- e.currentTarget.style.backgroundColor = "var(--color-surface-hover)";
307
- },
308
- onMouseLeave: (e) => {
309
- e.currentTarget.style.backgroundColor = "transparent";
310
- },
311
- children: /* @__PURE__ */ jsxs(Group, { gap: "xs", wrap: "nowrap", children: [
312
- /* @__PURE__ */ jsx(KindIcon, { size: 14, style: { color: "var(--color-text-dimmed)", flexShrink: 0 } }),
313
- /* @__PURE__ */ jsx(Text, { size: "xs", truncate: true, style: { flex: 1, minWidth: 0 }, children: task.title }),
314
- dueLabel && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", color: isOverdue ? "red" : "gray", style: { flexShrink: 0 }, children: dueLabel })
315
- ] })
316
- }
317
- );
318
- }
319
- function MyTasksPanel({
320
- onTaskClick,
321
- onSeeAll,
322
- footer,
323
- showSectionLabel = true
324
- }) {
325
- const { data, isLoading, isError } = useDealTasksDue({ window: "today_and_overdue" });
326
- const tasks = data ?? [];
327
- const total = tasks.length;
328
- const visible = tasks.slice(0, 5);
329
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
330
- showSectionLabel && /* @__PURE__ */ jsxs(Group, { justify: "space-between", mb: 4, children: [
331
- /* @__PURE__ */ jsx(Text, { fz: "xs", tt: "uppercase", c: "dimmed", fw: 600, children: "My Tasks" }),
332
- total > 0 && /* @__PURE__ */ jsx(Badge, { size: "xs", variant: "light", children: total })
333
- ] }),
334
- isLoading && /* @__PURE__ */ jsx(Center, { py: 4, children: /* @__PURE__ */ jsx(Loader, { size: "xs" }) }),
335
- isError && /* @__PURE__ */ jsx(Text, { size: "xs", c: "red", children: "Failed to load tasks" }),
336
- !isLoading && !isError && visible.length === 0 && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", children: "No tasks due - you're caught up." }),
337
- !isLoading && !isError && visible.map((task) => /* @__PURE__ */ jsx(TaskRow, { task, onClick: () => onTaskClick(task.dealId) }, task.id)),
338
- onSeeAll && total > 5 && /* @__PURE__ */ jsx(UnstyledButton, { onClick: onSeeAll, mt: 2, style: { display: "inline-block" }, children: /* @__PURE__ */ jsxs(Text, { size: "xs", c: "dimmed", style: { textDecoration: "underline" }, children: [
339
- "See all (",
340
- total,
341
- ")"
342
- ] }) }),
343
- footer
344
- ] }) });
345
- }
346
-
347
- export { CRM_ITEMS, CrmSidebarMiddle, LEAD_GEN_ITEMS, LeadGenSidebarMiddle, MyTasksPanel, QuickCreateActions, SAVED_VIEW_PRESETS, SalesSidebar, SavedViewsPanel };
@@ -1,13 +0,0 @@
1
- import { ElevasisSystemsProvider } from './chunk-IBWMR4TI.js';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- function createTestSystemsProvider({
5
- organizationModel,
6
- systems = []
7
- } = {}) {
8
- return function TestSystemsProvider({ children }) {
9
- return /* @__PURE__ */ jsx(ElevasisSystemsProvider, { systems, organizationModel, children });
10
- };
11
- }
12
-
13
- export { createTestSystemsProvider };
@@ -1,15 +0,0 @@
1
- import { forwardRef } from 'react';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
3
-
4
- // src/components/display/ElevasisLoader.tsx
5
-
6
- // src/components/display/ElevasisLoader.module.css.js
7
- var ElevasisLoader_module_css_default = { "wrapper": "wrapper", "loader": "loader", "chevron": "chevron", "c1": "c1", "c2": "c2", "c3": "c3" };
8
- var ElevasisLoader = forwardRef(({ style, className, ...others }, ref) => /* @__PURE__ */ jsx("div", { ref, style, className: `${ElevasisLoader_module_css_default.wrapper} ${className ?? ""}`, ...others, children: /* @__PURE__ */ jsxs("svg", { className: ElevasisLoader_module_css_default.loader, viewBox: "-10 -5 60 50", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
9
- /* @__PURE__ */ jsx("polyline", { className: `${ElevasisLoader_module_css_default.chevron} ${ElevasisLoader_module_css_default.c1}`, points: "5,36 20,25 35,36" }),
10
- /* @__PURE__ */ jsx("polyline", { className: `${ElevasisLoader_module_css_default.chevron} ${ElevasisLoader_module_css_default.c2}`, points: "9,23 20,14 31,23" }),
11
- /* @__PURE__ */ jsx("polyline", { className: `${ElevasisLoader_module_css_default.chevron} ${ElevasisLoader_module_css_default.c3}`, points: "13,11 20,5 27,11" })
12
- ] }) }));
13
- ElevasisLoader.displayName = "ElevasisLoader";
14
-
15
- export { ElevasisLoader };
@@ -1,29 +0,0 @@
1
- import { FeatureUnavailableState } from './chunk-EPTHX4VZ.js';
2
- import { useElevasisSystems } from './chunk-IBWMR4TI.js';
3
- import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer } from './chunk-TKAYX2SP.js';
4
- import { useRouterContext } from './chunk-Q7DJKLEN.js';
5
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
6
-
7
- var defaultSystemSidebarWidth = 250;
8
- function SystemShell({ children }) {
9
- const { shellRuntime } = useElevasisSystems();
10
- const { currentPath } = useRouterContext();
11
- const routeMatch = shellRuntime.resolveRoute(currentPath);
12
- if (routeMatch.status === "hidden") {
13
- return /* @__PURE__ */ jsx(FeatureUnavailableState, { path: currentPath });
14
- }
15
- if (routeMatch.status !== "matched" || !routeMatch.system?.sidebar) {
16
- return /* @__PURE__ */ jsx(Fragment, { children });
17
- }
18
- const SidebarComponent = routeMatch.system.sidebar;
19
- const sidebarWidth = typeof routeMatch.system.sidebarWidth === "function" ? routeMatch.system.sidebarWidth({ currentPath }) : routeMatch.system.sidebarWidth ?? defaultSystemSidebarWidth;
20
- if (sidebarWidth === 0) {
21
- return /* @__PURE__ */ jsx(Fragment, { children });
22
- }
23
- return /* @__PURE__ */ jsxs(SubshellContainer, { children: [
24
- /* @__PURE__ */ jsx(SubshellSidebar, { width: sidebarWidth, children: /* @__PURE__ */ jsx(SidebarComponent, {}) }),
25
- /* @__PURE__ */ jsx(SubshellRightSideContainer, { children })
26
- ] });
27
- }
28
-
29
- export { SystemShell };
@@ -1 +0,0 @@
1
-