@elevasis/ui 2.33.1 → 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.
- package/dist/api/index.d.ts +9 -2
- package/dist/api/index.js +1 -1
- package/dist/app/index.css +452 -0
- package/dist/app/index.d.ts +1250 -3
- package/dist/app/index.js +144 -8
- package/dist/charts/index.js +2 -3
- package/dist/{chunk-3YZRKADM.js → chunk-3AJVNMY5.js} +45 -28
- package/dist/chunk-3QXJK5IY.js +25 -0
- package/dist/chunk-4O4MII5S.js +4716 -0
- package/dist/{chunk-KW7ZNQD7.js → chunk-5EYJ2GIN.js} +4 -8
- package/dist/{chunk-53436UTQ.js → chunk-BPQVTIUP.js} +12 -3
- package/dist/{chunk-DYIDXUJS.js → chunk-DTFKWZ7A.js} +1098 -2280
- package/dist/{chunk-EPTHX4VZ.js → chunk-HRWLKKWM.js} +11 -2
- package/dist/{chunk-SWMQTF2H.js → chunk-IGDYWFNE.js} +2 -2
- package/dist/{chunk-QVTIOT73.js → chunk-IVGI4GDL.js} +3 -3
- package/dist/{chunk-4DYOXEH6.js → chunk-LAWLB6CT.js} +1 -1
- package/dist/{chunk-UYRT7SPM.js → chunk-LRWTWOGP.js} +3 -3
- package/dist/{chunk-2VYMDNJ3.js → chunk-MP3GPBPX.js} +3 -3
- package/dist/{chunk-YENKDBUU.js → chunk-NLBQTDOW.js} +12 -17
- package/dist/{chunk-WJOE76FI.js → chunk-O6JXQ6UQ.js} +5 -4
- package/dist/{chunk-F3MXFE72.js → chunk-OBBQ2JCM.js} +3 -3
- package/dist/{chunk-WGUEIGPC.js → chunk-PLP3NYPL.js} +80 -171
- package/dist/{chunk-AV2TKVVV.js → chunk-RIAXZ6AH.js} +5 -6
- package/dist/chunk-SDXSB3HN.js +425 -0
- package/dist/{chunk-JA5ECJJB.js → chunk-VTXTZXAU.js} +156 -4
- package/dist/{chunk-H6EFQP2P.js → chunk-W73ZABT6.js} +1 -1
- package/dist/{chunk-UNVRVCXZ.js → chunk-WU4FNWCW.js} +3 -3
- package/dist/{chunk-NCEQGEW5.js → chunk-YNWZIWJL.js} +4 -5
- package/dist/components/index.d.ts +0 -23
- package/dist/components/index.js +27 -448
- package/dist/components/navigation/index.js +4 -6
- package/dist/features/clients/index.js +7 -12
- package/dist/features/crm/index.js +9 -14
- package/dist/features/dashboard/index.d.ts +0 -23
- package/dist/features/dashboard/index.js +9 -14
- package/dist/features/delivery/index.js +8 -13
- package/dist/features/knowledge/index.js +5 -7
- package/dist/features/lead-gen/index.js +9 -14
- package/dist/features/monitoring/index.js +10 -15
- package/dist/features/monitoring/requests/index.js +7 -12
- package/dist/features/operations/index.d.ts +44 -35
- package/dist/features/operations/index.js +12 -17
- package/dist/features/settings/index.js +8 -13
- package/dist/hooks/index.d.ts +20 -27
- package/dist/hooks/index.js +7 -12
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +20 -27
- package/dist/hooks/published.d.ts +20 -27
- package/dist/hooks/published.js +7 -12
- package/dist/index.d.ts +54 -39
- package/dist/index.js +8 -13
- package/dist/knowledge/index.d.ts +30 -38
- package/dist/knowledge/index.js +37 -201
- package/dist/{knowledge-search-index-P7PR626V.js → knowledge-search-index-ORIJCEZX.js} +142 -150
- package/dist/organization/index.js +1 -2
- package/dist/provider/index.d.ts +25 -32
- package/dist/provider/index.js +6 -11
- package/dist/provider/published.d.ts +25 -32
- package/dist/provider/published.js +5 -9
- package/dist/test-utils/index.d.ts +2 -0
- package/dist/test-utils/index.js +14 -2
- package/dist/test-utils/setup.js +38 -0
- package/dist/types/index.d.ts +20 -27
- package/dist/utils/index.d.ts +0 -23
- package/dist/zustand/index.d.ts +15 -2
- package/dist/zustand/index.js +35 -1
- package/package.json +5 -5
- package/dist/chunk-4AAZXKLL.js +0 -347
- package/dist/chunk-DWXDNT7P.js +0 -145
- package/dist/chunk-FOUYP4JX.js +0 -13
- package/dist/chunk-HUJCU55S.js +0 -159
- package/dist/chunk-PIS24NIV.js +0 -29
- package/dist/chunk-SZHARWKU.js +0 -15
- package/dist/chunk-XCYKC6OZ.js +0 -1
package/dist/zustand/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import '../chunk-I2KLQ2HA.js';
|
|
2
|
+
import { create } from 'zustand';
|
|
3
|
+
import { devtools } from 'zustand/middleware';
|
|
4
|
+
import { immer } from 'zustand/middleware/immer';
|
|
2
5
|
|
|
3
6
|
// src/zustand/slices/sse.ts
|
|
4
7
|
function resetSSEState(state) {
|
|
@@ -94,4 +97,35 @@ function createTimeRangeSlice(set) {
|
|
|
94
97
|
};
|
|
95
98
|
}
|
|
96
99
|
|
|
97
|
-
|
|
100
|
+
// src/zustand/appStore.ts
|
|
101
|
+
function createElevasisAppStore(options = {}) {
|
|
102
|
+
const defaultPreset = options.defaultPreset ?? "tactical";
|
|
103
|
+
const defaultColorScheme = options.defaultColorScheme ?? "dark";
|
|
104
|
+
return create()(
|
|
105
|
+
devtools(
|
|
106
|
+
immer((set) => ({
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
108
|
+
...createSSESlice(set),
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
110
|
+
...createThemeSlice(set, { defaultPreset, defaultColorScheme }),
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
112
|
+
...createTimeRangeSlice(set),
|
|
113
|
+
resetStore: () => set(
|
|
114
|
+
(state) => {
|
|
115
|
+
resetSSEState(state);
|
|
116
|
+
resetThemeState(state, { defaultPreset, defaultColorScheme });
|
|
117
|
+
resetTimeRangeState(state);
|
|
118
|
+
},
|
|
119
|
+
void 0,
|
|
120
|
+
"app/resetStore"
|
|
121
|
+
)
|
|
122
|
+
})),
|
|
123
|
+
{
|
|
124
|
+
name: options.devtoolsName ?? "ElevasisAppStore",
|
|
125
|
+
enabled: options.devtoolsEnabled ?? import.meta.env?.DEV ?? false
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export { createElevasisAppStore, createSSESlice, createThemeSlice, createTimeRangeSlice, resetSSEState, resetThemeState, resetTimeRangeState };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.34.0",
|
|
4
4
|
"description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -253,11 +253,11 @@
|
|
|
253
253
|
"typescript": "5.9.2",
|
|
254
254
|
"vite": "^7.0.0",
|
|
255
255
|
"vitest": "^3.2.4",
|
|
256
|
-
"@elevasis/sdk": "1.
|
|
257
|
-
"@repo/core": "0.24.1",
|
|
256
|
+
"@elevasis/sdk": "1.23.0",
|
|
258
257
|
"@repo/elevasis-core": "1.0.0",
|
|
259
|
-
"@repo/
|
|
260
|
-
"@repo/
|
|
258
|
+
"@repo/eslint-config": "0.0.0",
|
|
259
|
+
"@repo/core": "0.26.0",
|
|
260
|
+
"@repo/typescript-config": "0.0.0"
|
|
261
261
|
},
|
|
262
262
|
"dependencies": {
|
|
263
263
|
"@dagrejs/dagre": "^1.1.4",
|
package/dist/chunk-4AAZXKLL.js
DELETED
|
@@ -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-SWMQTF2H.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 };
|
package/dist/chunk-DWXDNT7P.js
DELETED
|
@@ -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: IconBuildingStore,
|
|
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 };
|
package/dist/chunk-FOUYP4JX.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ElevasisSystemsProvider } from './chunk-WJOE76FI.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 };
|