@elevasis/ui 2.31.0 → 2.32.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/{CoreAuthKitInner-KSEGSB67.js → CoreAuthKitInner-QC62UHTZ.js} +1 -1
- package/dist/api/index.js +3 -3
- package/dist/app/index.css +38 -0
- package/dist/app/index.d.ts +69 -9
- package/dist/app/index.js +7 -6
- package/dist/auth/context.js +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/charts/index.js +5 -6
- package/dist/{chunk-XQHZBA65.js → chunk-2RJMVWFJ.js} +1 -6
- package/dist/{chunk-CW3UNAF2.js → chunk-4DYOXEH6.js} +410 -5
- package/dist/{chunk-HQGF4ATG.js → chunk-4MFNGNHF.js} +118 -141
- package/dist/{chunk-ND42LPY4.js → chunk-4QK76KIF.js} +6 -6
- package/dist/chunk-5FJJ72HU.js +13 -0
- package/dist/chunk-5J4PDX26.js +112 -0
- package/dist/{chunk-QDEETKYT.js → chunk-6DWD423K.js} +9 -9
- package/dist/{chunk-SHQXMW4F.js → chunk-7KZINJLP.js} +46 -28
- package/dist/{chunk-L3BVJWML.js → chunk-EPTHX4VZ.js} +1 -1
- package/dist/{chunk-JKSUN5GN.js → chunk-GCOQ3TBG.js} +81 -746
- package/dist/{chunk-DZTG5IAC.js → chunk-I2KLQ2HA.js} +1 -7
- package/dist/{chunk-L2NVFLXU.js → chunk-IQHU7O5Y.js} +4 -4
- package/dist/{chunk-P55BJZZW.js → chunk-IZWTVFJ2.js} +16 -4
- package/dist/{chunk-QHEWXU7I.js → chunk-JFL3GRD4.js} +1 -1
- package/dist/{chunk-Q6OYNEGR.js → chunk-LLRXA7D7.js} +5 -6
- package/dist/{chunk-7KC4P3AU.js → chunk-MOY4VOHF.js} +2 -12
- package/dist/{chunk-XQQEKWTL.js → chunk-N55DVMAG.js} +6 -2
- package/dist/{chunk-TOIXUWR6.js → chunk-ND5TDV2J.js} +1 -1
- package/dist/{chunk-WF227UBV.js → chunk-QQHOKTJA.js} +4 -4
- package/dist/{chunk-T3IPHEYJ.js → chunk-QTI3KC7D.js} +4335 -554
- package/dist/chunk-QXCDKE2O.js +486 -0
- package/dist/{chunk-3BAPR3KA.js → chunk-RQA2EVN3.js} +5 -15
- package/dist/{chunk-HYNYEBHM.js → chunk-RQTWIXJ5.js} +3 -3
- package/dist/chunk-T35FWDAB.js +4342 -0
- package/dist/{chunk-DWK2QIAK.js → chunk-TYRUKGGD.js} +1 -1
- package/dist/{chunk-GRDLB6LM.js → chunk-UROTM5OR.js} +13 -1
- package/dist/{chunk-6YT4IKJ7.js → chunk-VNAZTCHA.js} +15 -0
- package/dist/{chunk-5LJAEZMA.js → chunk-VRNMNB3O.js} +5 -6
- package/dist/chunk-WQPX44YM.js +1626 -0
- package/dist/{chunk-7HMCB26R.js → chunk-XZGSCABI.js} +1 -1
- package/dist/chunk-YLQEVSOR.js +299 -0
- package/dist/{chunk-Y4FWCG7Y.js → chunk-ZQOKIGZP.js} +8 -7
- package/dist/components/chat/index.js +1 -1
- package/dist/components/index.css +38 -0
- package/dist/components/index.d.ts +152 -50
- package/dist/components/index.js +36 -39
- package/dist/components/navigation/index.css +38 -0
- package/dist/components/navigation/index.js +4 -3
- package/dist/execution/index.d.ts +7 -2
- package/dist/execution/index.js +1 -1
- package/dist/features/auth/index.css +38 -0
- package/dist/features/auth/index.d.ts +91 -14
- package/dist/features/auth/index.js +42 -10
- package/dist/features/clients/index.css +38 -0
- package/dist/features/clients/index.d.ts +1 -1
- package/dist/features/clients/index.js +16 -15
- package/dist/features/crm/index.css +38 -0
- package/dist/features/crm/index.d.ts +80 -18
- package/dist/features/crm/index.js +16 -15
- package/dist/features/dashboard/index.css +38 -0
- package/dist/features/dashboard/index.d.ts +65 -25
- package/dist/features/dashboard/index.js +16 -16
- package/dist/features/delivery/index.css +38 -0
- package/dist/features/delivery/index.d.ts +80 -18
- package/dist/features/delivery/index.js +15 -15
- package/dist/features/knowledge/index.css +38 -0
- package/dist/features/knowledge/index.d.ts +20 -18
- package/dist/features/knowledge/index.js +112 -597
- package/dist/features/lead-gen/index.css +38 -0
- package/dist/features/lead-gen/index.d.ts +45 -43
- package/dist/features/lead-gen/index.js +16 -16
- package/dist/features/monitoring/index.css +38 -0
- package/dist/features/monitoring/index.d.ts +20 -18
- package/dist/features/monitoring/index.js +17 -17
- package/dist/features/monitoring/requests/index.css +38 -0
- package/dist/features/monitoring/requests/index.d.ts +21 -19
- package/dist/features/monitoring/requests/index.js +15 -14
- package/dist/features/operations/index.css +38 -0
- package/dist/features/operations/index.d.ts +930 -66
- package/dist/features/operations/index.js +21 -24
- package/dist/features/seo/index.d.ts +20 -18
- package/dist/features/seo/index.js +2 -2
- package/dist/features/settings/index.css +38 -0
- package/dist/features/settings/index.d.ts +80 -18
- package/dist/features/settings/index.js +16 -15
- package/dist/graph/index.js +1 -1
- package/dist/hooks/delivery/index.css +38 -0
- package/dist/hooks/delivery/index.d.ts +60 -0
- package/dist/hooks/delivery/index.js +3 -3
- package/dist/hooks/index.css +38 -0
- package/dist/hooks/index.d.ts +301 -87
- package/dist/hooks/index.js +14 -13
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +143 -33
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -1
- package/dist/hooks/published.css +38 -0
- package/dist/hooks/published.d.ts +301 -87
- package/dist/hooks/published.js +14 -13
- package/dist/index.css +38 -0
- package/dist/index.d.ts +976 -1341
- package/dist/index.js +15 -14
- package/dist/initialization/index.d.ts +60 -0
- package/dist/initialization/index.js +1 -1
- package/dist/knowledge/index.d.ts +809 -1160
- package/dist/knowledge/index.js +5988 -2140
- package/dist/{chunk-O2QOPJI5.js → knowledge-search-index-5KYPO746.js} +96 -852
- package/dist/layout/index.js +3 -4
- package/dist/organization/index.css +38 -0
- package/dist/organization/index.js +1 -1
- package/dist/profile/index.d.ts +60 -0
- package/dist/profile/index.js +1 -1
- package/dist/provider/ElevasisServiceContext.js +1 -1
- package/dist/provider/index.css +38 -0
- package/dist/provider/index.d.ts +786 -1249
- package/dist/provider/index.js +11 -10
- package/dist/provider/published.css +38 -0
- package/dist/provider/published.d.ts +783 -1246
- package/dist/provider/published.js +8 -7
- package/dist/router/context.js +1 -1
- package/dist/router/index.js +1 -1
- package/dist/sse/index.js +1 -1
- package/dist/supabase/index.d.ts +117 -0
- package/dist/supabase/index.js +1 -1
- package/dist/test-utils/index.d.ts +16 -9
- package/dist/test-utils/index.js +40 -33
- package/dist/test-utils/setup-integration.js +1 -1
- package/dist/test-utils/setup.js +1 -1
- package/dist/theme/index.js +3 -3
- package/dist/theme/presets/index.js +1 -1
- package/dist/typeform/index.js +1 -1
- package/dist/typeform/schemas.js +1 -1
- package/dist/types/index.d.ts +205 -35
- package/dist/utils/index.d.ts +65 -25
- package/dist/utils/index.js +2 -2
- package/dist/vite/index.js +1 -1
- package/dist/vite-plugin-knowledge/index.js +1 -1
- package/dist/zustand/index.js +1 -1
- package/package.json +39 -38
- package/src/provider/README.md +5 -5
- package/dist/chunk-542WPQU2.js +0 -413
- package/dist/chunk-6IXOKUBC.js +0 -347
- package/dist/chunk-CQZ3DNQY.js +0 -740
- package/dist/chunk-ECNNI3NT.js +0 -6
- package/dist/chunk-JDNEWB5F.js +0 -10
- package/dist/chunk-MVFCLZSK.js +0 -4337
- package/dist/chunk-OAVTMITG.js +0 -13
- package/dist/chunk-TVRQ6AQI.js +0 -476
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-
|
|
1
|
+
import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-2RJMVWFJ.js';
|
|
2
2
|
import { useElevasisServices } from './chunk-KJ3QUBNU.js';
|
|
3
3
|
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
|
|
4
4
|
import { notifications } from '@mantine/notifications';
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { CRM_DISCOVERY_REPLIED_STATE, CRM_DISCOVERY_LINK_SENT_STATE, CRM_DISCOVERY_NUDGING_STATE, CRM_DISCOVERY_BOOKING_CANCELLED_STATE } from './chunk-T35FWDAB.js';
|
|
2
|
+
import { ApiClientProvider, useApiClient } from './chunk-ND5TDV2J.js';
|
|
3
|
+
import { OrganizationProvider } from './chunk-HUJCU55S.js';
|
|
4
|
+
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-2RJMVWFJ.js';
|
|
5
|
+
import { InitializationProvider } from './chunk-533DUEQY.js';
|
|
6
|
+
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
7
|
+
import { ProfileProvider } from './chunk-2Q2JQSQO.js';
|
|
8
|
+
import { ElevasisServiceProvider } from './chunk-KJ3QUBNU.js';
|
|
9
|
+
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
10
|
+
import { createContext, lazy, useContext, Suspense, useRef } from 'react';
|
|
11
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
14
|
+
|
|
15
|
+
var consoleAdapter = {
|
|
16
|
+
success(title, message) {
|
|
17
|
+
console.log(`[Notification][Success] ${title}: ${message}`);
|
|
18
|
+
},
|
|
19
|
+
error(title, message) {
|
|
20
|
+
console.warn(`[Notification][Error] ${title}: ${message}`);
|
|
21
|
+
},
|
|
22
|
+
info(title, message) {
|
|
23
|
+
console.log(`[Notification][Info] ${title}: ${message}`);
|
|
24
|
+
},
|
|
25
|
+
warning(title, message) {
|
|
26
|
+
console.warn(`[Notification][Warning] ${title}: ${message}`);
|
|
27
|
+
},
|
|
28
|
+
apiError(error) {
|
|
29
|
+
const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
|
|
30
|
+
const title = getErrorTitle(code);
|
|
31
|
+
const formatted = formatErrorMessage(message, requestId, fields, retryAfter);
|
|
32
|
+
console.warn(`[Notification][API Error] ${title}: ${formatted}`);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var NotificationContext = createContext(consoleAdapter);
|
|
36
|
+
function NotificationProvider({ adapter, children }) {
|
|
37
|
+
return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: adapter, children });
|
|
38
|
+
}
|
|
39
|
+
function useNotificationAdapter() {
|
|
40
|
+
return useContext(NotificationContext);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ../core/src/business/acquisition/deal-ownership.ts
|
|
44
|
+
var INBOUND_EVENT_TYPES = ["reply_received"];
|
|
45
|
+
var OUTBOUND_EVENT_TYPES = [
|
|
46
|
+
"reply_sent_to_lead",
|
|
47
|
+
"booking_nudge_sent",
|
|
48
|
+
"reminder_sent",
|
|
49
|
+
"rebook_sent",
|
|
50
|
+
"followup_email_sent",
|
|
51
|
+
"reply_followup_sent",
|
|
52
|
+
"lead_deferred_next_step"
|
|
53
|
+
];
|
|
54
|
+
var INBOUND_SET = new Set(INBOUND_EVENT_TYPES);
|
|
55
|
+
var OUTBOUND_SET = new Set(OUTBOUND_EVENT_TYPES);
|
|
56
|
+
function getDealOwnership(deal) {
|
|
57
|
+
if (deal.state_key === "closed_won" || deal.state_key === "closed_lost") {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
if (!Array.isArray(deal.activity_log)) return null;
|
|
61
|
+
let latestInboundMs = null;
|
|
62
|
+
let latestOutboundMs = null;
|
|
63
|
+
for (const entry of deal.activity_log) {
|
|
64
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry)) continue;
|
|
65
|
+
const record = entry;
|
|
66
|
+
const type = typeof record.type === "string" ? record.type : null;
|
|
67
|
+
if (!type) continue;
|
|
68
|
+
const isInbound = INBOUND_SET.has(type);
|
|
69
|
+
const isOutbound = OUTBOUND_SET.has(type);
|
|
70
|
+
if (!isInbound && !isOutbound) continue;
|
|
71
|
+
const occurredAt = resolveTimestamp(record);
|
|
72
|
+
if (occurredAt === null) continue;
|
|
73
|
+
if (isInbound && (latestInboundMs === null || occurredAt > latestInboundMs)) {
|
|
74
|
+
latestInboundMs = occurredAt;
|
|
75
|
+
}
|
|
76
|
+
if (isOutbound && (latestOutboundMs === null || occurredAt > latestOutboundMs)) {
|
|
77
|
+
latestOutboundMs = occurredAt;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (latestInboundMs === null && latestOutboundMs === null) return null;
|
|
81
|
+
if (latestOutboundMs !== null && (latestInboundMs === null || latestOutboundMs >= latestInboundMs)) {
|
|
82
|
+
return "them";
|
|
83
|
+
}
|
|
84
|
+
return "us";
|
|
85
|
+
}
|
|
86
|
+
function resolveTimestamp(record) {
|
|
87
|
+
return parseMs(record.timestamp) ?? parseMs(record.occurredAt) ?? parseMs(record.createdAt) ?? parseMs(record.updatedAt) ?? parseMs(record.sentAt) ?? null;
|
|
88
|
+
}
|
|
89
|
+
function parseMs(value) {
|
|
90
|
+
if (value instanceof Date) {
|
|
91
|
+
const ms2 = value.getTime();
|
|
92
|
+
return Number.isNaN(ms2) ? null : ms2;
|
|
93
|
+
}
|
|
94
|
+
if (typeof value !== "string") return null;
|
|
95
|
+
const ms = new Date(value).getTime();
|
|
96
|
+
return Number.isNaN(ms) ? null : ms;
|
|
97
|
+
}
|
|
98
|
+
var SendReplyActionPayloadSchema = z.object({
|
|
99
|
+
replyBody: z.string().trim().min(1).max(1e4)
|
|
100
|
+
}).strict();
|
|
101
|
+
var DEFAULT_CRM_ACTIONS = [
|
|
102
|
+
{
|
|
103
|
+
key: "move_to_proposal",
|
|
104
|
+
label: "Move to Proposal",
|
|
105
|
+
isAvailableFor: (deal) => deal.stage_key === "interested",
|
|
106
|
+
workflowId: "move_to_proposal-workflow"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
key: "move_to_closing",
|
|
110
|
+
label: "Move to Closing",
|
|
111
|
+
isAvailableFor: (deal) => deal.stage_key === "proposal",
|
|
112
|
+
workflowId: "move_to_closing-workflow"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
key: "move_to_closed_won",
|
|
116
|
+
label: "Close Won",
|
|
117
|
+
isAvailableFor: (deal) => deal.stage_key === "closing",
|
|
118
|
+
workflowId: "move_to_closed_won-workflow"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
key: "move_to_closed_lost",
|
|
122
|
+
label: "Close Lost",
|
|
123
|
+
isAvailableFor: (deal) => deal.stage_key === "interested" || deal.stage_key === "proposal" || deal.stage_key === "closing",
|
|
124
|
+
workflowId: "move_to_closed_lost-workflow"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
key: "move_to_nurturing",
|
|
128
|
+
label: "Move to Nurturing",
|
|
129
|
+
isAvailableFor: (deal) => deal.stage_key === "interested" || deal.stage_key === "proposal" || deal.stage_key === "closing",
|
|
130
|
+
workflowId: "move_to_nurturing-workflow"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
key: "send_reply",
|
|
134
|
+
label: "Send Reply",
|
|
135
|
+
isAvailableFor: (deal) => deal.stage_key === "interested" && isOurReplyAction(deal) && (deal.state_key === CRM_DISCOVERY_REPLIED_STATE.stateKey || deal.state_key === CRM_DISCOVERY_LINK_SENT_STATE.stateKey || deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey),
|
|
136
|
+
workflowId: "crm-send-reply-workflow",
|
|
137
|
+
payloadSchema: SendReplyActionPayloadSchema
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
key: "send_link",
|
|
141
|
+
label: "Send Booking Link",
|
|
142
|
+
isAvailableFor: (deal) => deal.stage_key === "interested" && deal.state_key === CRM_DISCOVERY_REPLIED_STATE.stateKey,
|
|
143
|
+
workflowId: "crm-send-booking-link-workflow"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
key: "send_nudge",
|
|
147
|
+
label: "Send Nudge",
|
|
148
|
+
isAvailableFor: (deal) => deal.stage_key === "interested" && (deal.state_key === CRM_DISCOVERY_LINK_SENT_STATE.stateKey || deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey),
|
|
149
|
+
workflowId: "crm-send-nudge-workflow"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: "mark_no_show",
|
|
153
|
+
label: "Mark No-Show",
|
|
154
|
+
isAvailableFor: (deal) => deal.stage_key === "interested" && deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey,
|
|
155
|
+
// Mirrors the auto-timeout precedent in operations/sales/crm/pipeline/timeout-actions.ts:
|
|
156
|
+
// both manual-click and timeout move the deal to closed_lost. The action_taken activity
|
|
157
|
+
// event captures operator intent and distinguishes the manual variant from the timed one.
|
|
158
|
+
workflowId: "mark_no_show-workflow"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
key: "rebook",
|
|
162
|
+
label: "Rebook",
|
|
163
|
+
isAvailableFor: (deal) => deal.stage_key === "interested" && deal.state_key === CRM_DISCOVERY_BOOKING_CANCELLED_STATE.stateKey,
|
|
164
|
+
workflowId: "crm-rebook-workflow"
|
|
165
|
+
}
|
|
166
|
+
];
|
|
167
|
+
function deriveActions(deal, actions = DEFAULT_CRM_ACTIONS) {
|
|
168
|
+
return actions.filter((a) => a.isAvailableFor(deal)).map(({ key, label, payloadSchema }) => ({ key, label, payloadSchema }));
|
|
169
|
+
}
|
|
170
|
+
function isOurReplyAction(deal) {
|
|
171
|
+
if (Object.prototype.hasOwnProperty.call(deal, "nextAction")) {
|
|
172
|
+
return deal.nextAction === "send_reply";
|
|
173
|
+
}
|
|
174
|
+
return (deal.ownership ?? getDealOwnership(deal)) === "us";
|
|
175
|
+
}
|
|
176
|
+
var CrmActionsContext = createContext(DEFAULT_CRM_ACTIONS);
|
|
177
|
+
function CrmActionsProvider({ actions, children }) {
|
|
178
|
+
return /* @__PURE__ */ jsx(CrmActionsContext.Provider, { value: actions, children });
|
|
179
|
+
}
|
|
180
|
+
function useCrmActions() {
|
|
181
|
+
return useContext(CrmActionsContext);
|
|
182
|
+
}
|
|
183
|
+
var EMPTY_LIST_ACTIONS = Object.freeze([]);
|
|
184
|
+
var ListActionsContext = createContext(EMPTY_LIST_ACTIONS);
|
|
185
|
+
function ListActionsProvider({
|
|
186
|
+
registry = EMPTY_LIST_ACTIONS,
|
|
187
|
+
children
|
|
188
|
+
}) {
|
|
189
|
+
return /* @__PURE__ */ jsx(ListActionsContext.Provider, { value: registry, children });
|
|
190
|
+
}
|
|
191
|
+
function useListActions() {
|
|
192
|
+
return useContext(ListActionsContext);
|
|
193
|
+
}
|
|
194
|
+
function findListActionByAction(registry, actionKey) {
|
|
195
|
+
return registry.find((action) => action.actionKey === actionKey);
|
|
196
|
+
}
|
|
197
|
+
function getListActionWorkflowId(action) {
|
|
198
|
+
return action.workflowId ?? action.resourceId;
|
|
199
|
+
}
|
|
200
|
+
var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-QC62UHTZ.js').then((m) => ({ default: m.CoreAuthKitInner })));
|
|
201
|
+
var defaultQueryClient = null;
|
|
202
|
+
function getDefaultQueryClient() {
|
|
203
|
+
if (!defaultQueryClient) {
|
|
204
|
+
defaultQueryClient = new QueryClient({
|
|
205
|
+
defaultOptions: { queries: { retry: 1 } }
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
return defaultQueryClient;
|
|
209
|
+
}
|
|
210
|
+
var consoleNotificationAdapter = {
|
|
211
|
+
success(title, message) {
|
|
212
|
+
console.log(`[Notification][Success] ${title}: ${message}`);
|
|
213
|
+
},
|
|
214
|
+
error(title, message) {
|
|
215
|
+
console.warn(`[Notification][Error] ${title}: ${message}`);
|
|
216
|
+
},
|
|
217
|
+
info(title, message) {
|
|
218
|
+
console.log(`[Notification][Info] ${title}: ${message}`);
|
|
219
|
+
},
|
|
220
|
+
warning(title, message) {
|
|
221
|
+
console.warn(`[Notification][Warning] ${title}: ${message}`);
|
|
222
|
+
},
|
|
223
|
+
apiError(error) {
|
|
224
|
+
console.warn(`[Notification][API Error]`, error);
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
function ElevasisCoreProvider({
|
|
228
|
+
auth,
|
|
229
|
+
queryClient,
|
|
230
|
+
apiUrl,
|
|
231
|
+
onError,
|
|
232
|
+
notifications,
|
|
233
|
+
crmActions,
|
|
234
|
+
listActions,
|
|
235
|
+
children
|
|
236
|
+
}) {
|
|
237
|
+
if (auth.mode === "apiKey") {
|
|
238
|
+
throw new Error(
|
|
239
|
+
`ElevasisCoreProvider: auth mode 'apiKey' is not yet implemented. Only 'authkit' mode is supported.`
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
const resolvedQueryClient = queryClient ?? getDefaultQueryClient();
|
|
243
|
+
const resolvedCrmActions = crmActions ?? DEFAULT_CRM_ACTIONS;
|
|
244
|
+
const resolvedListActions = listActions ?? EMPTY_LIST_ACTIONS;
|
|
245
|
+
const content = apiUrl ? /* @__PURE__ */ jsx(ServiceStack, { apiUrl, onError, notifications, children }) : children;
|
|
246
|
+
const AuthInner = /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCoreAuthKitInner, { auth, children: content }) });
|
|
247
|
+
return /* @__PURE__ */ jsx(QueryClientProvider, { client: resolvedQueryClient, children: /* @__PURE__ */ jsx(CrmActionsProvider, { actions: resolvedCrmActions, children: /* @__PURE__ */ jsx(ListActionsProvider, { registry: resolvedListActions, children: AuthInner }) }) });
|
|
248
|
+
}
|
|
249
|
+
function ServiceStack({
|
|
250
|
+
apiUrl,
|
|
251
|
+
onError,
|
|
252
|
+
notifications,
|
|
253
|
+
children
|
|
254
|
+
}) {
|
|
255
|
+
const { getAccessToken } = useAuthContext();
|
|
256
|
+
const orgIdRef = useRef(null);
|
|
257
|
+
const getOrganizationId = useRef(() => orgIdRef.current).current;
|
|
258
|
+
return /* @__PURE__ */ jsx(
|
|
259
|
+
ApiClientProvider,
|
|
260
|
+
{
|
|
261
|
+
getAccessToken,
|
|
262
|
+
getOrganizationId,
|
|
263
|
+
isOrganizationReady: false,
|
|
264
|
+
onError,
|
|
265
|
+
children: /* @__PURE__ */ jsx(ServiceStackInner, { apiUrl, orgIdRef, notifications, children })
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
function ServiceStackInner({
|
|
270
|
+
apiUrl,
|
|
271
|
+
orgIdRef,
|
|
272
|
+
notifications,
|
|
273
|
+
children
|
|
274
|
+
}) {
|
|
275
|
+
const { apiRequest } = useApiClient(apiUrl);
|
|
276
|
+
const resolvedNotifications = notifications ?? consoleNotificationAdapter;
|
|
277
|
+
return /* @__PURE__ */ jsx(ProfileProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrganizationProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrgServiceBridge, { orgIdRef, apiRequest, notifications: resolvedNotifications, children }) }) });
|
|
278
|
+
}
|
|
279
|
+
function OrgServiceBridge({
|
|
280
|
+
orgIdRef,
|
|
281
|
+
apiRequest,
|
|
282
|
+
notifications,
|
|
283
|
+
children
|
|
284
|
+
}) {
|
|
285
|
+
const { currentWorkOSOrganizationId, isInitializing, isOrgRefreshing } = useOrganization();
|
|
286
|
+
orgIdRef.current = currentWorkOSOrganizationId;
|
|
287
|
+
const isReady = !!currentWorkOSOrganizationId && !isInitializing && !isOrgRefreshing;
|
|
288
|
+
return /* @__PURE__ */ jsx(
|
|
289
|
+
ElevasisServiceProvider,
|
|
290
|
+
{
|
|
291
|
+
apiRequest,
|
|
292
|
+
workOSOrganizationId: currentWorkOSOrganizationId,
|
|
293
|
+
isReady,
|
|
294
|
+
children: /* @__PURE__ */ jsx(NotificationProvider, { adapter: notifications, children: /* @__PURE__ */ jsx(InitializationProvider, { children }) })
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export { CrmActionsProvider, EMPTY_LIST_ACTIONS, ElevasisCoreProvider, ListActionsProvider, NotificationProvider, deriveActions, findListActionByAction, getListActionWorkflowId, useCrmActions, useListActions, useNotificationAdapter };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { SalesSidebar, CrmSidebarMiddle } from './chunk-
|
|
1
|
+
import { SalesSidebar, CrmSidebarMiddle } from './chunk-MOY4VOHF.js';
|
|
2
2
|
import { SubshellSidebarSection } from './chunk-IIMU5YAJ.js';
|
|
3
3
|
import { PageContainer } from './chunk-BZZCNLT6.js';
|
|
4
4
|
import { TableSelectionToolbar, SortableHeader } from './chunk-TUMSNGTX.js';
|
|
5
5
|
import { FilterBar } from './chunk-PDHTXPSF.js';
|
|
6
6
|
import { CustomModal } from './chunk-R66W5UDG.js';
|
|
7
|
-
import { useDealsSummary, useDeleteDeal, usePaginationState, useDeals, useTableSort, sortData, useTableSelection, useDealDetail, useCompany, dealKeys, useContact, useExecuteAction } from './chunk-
|
|
8
|
-
import { showApiErrorNotification, showSuccessNotification } from './chunk-
|
|
9
|
-
import { CenteredErrorState, CardHeader, StatCard, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-
|
|
10
|
-
import {
|
|
7
|
+
import { useDealsSummary, useDeleteDeal, usePaginationState, useDeals, useTableSort, sortData, useTableSelection, useDealDetail, useCompany, dealKeys, useContact, useExecuteAction } from './chunk-GCOQ3TBG.js';
|
|
8
|
+
import { showApiErrorNotification, showSuccessNotification } from './chunk-XZGSCABI.js';
|
|
9
|
+
import { CenteredErrorState, CardHeader, StatCard, PageTitleCaption, EmptyState, ActivityTimeline } from './chunk-EPTHX4VZ.js';
|
|
10
|
+
import { useCrmActions, deriveActions } from './chunk-YLQEVSOR.js';
|
|
11
11
|
import { SubshellContentContainer } from './chunk-TKAYX2SP.js';
|
|
12
|
-
import {
|
|
12
|
+
import { CRM_PIPELINE_DEFINITION, DEFAULT_CRM_PRIORITY_RULE_CONFIG, CRM_PRIORITY_BUCKETS } from './chunk-T35FWDAB.js';
|
|
13
|
+
import { PAGE_SIZE_DEFAULT, formatTimeAgo } from './chunk-2RJMVWFJ.js';
|
|
13
14
|
import { useElevasisServices } from './chunk-KJ3QUBNU.js';
|
|
14
15
|
import { Stack, Paper, Center, Loader, Group, Box, Text, Alert, Table, SimpleGrid, Button, Select, TextInput, Tabs, Checkbox, Badge, Tooltip, Pagination, Title, Code, Card, Switch, NumberInput, ColorSwatch, Popover, ActionIcon, Anchor, CopyButton, Divider, Textarea } from '@mantine/core';
|
|
15
16
|
import { IconAddressBook, IconColumns, IconHistory, IconAlertCircle, IconCurrencyDollar, IconChartBar, IconBriefcase, IconTrophy, IconSearch, IconTargetArrow, IconAlertTriangle, IconMessages, IconArrowLeft, IconFileText, IconInbox, IconUser, IconBolt, IconBuilding, IconSettings, IconRestore, IconInfoCircle, IconMailForward, IconPlus, IconArrowRight, IconNote, IconCheck, IconCopy } from '@tabler/icons-react';
|
|
@@ -400,7 +401,7 @@ function CrmOverview({
|
|
|
400
401
|
}
|
|
401
402
|
var crmManifest = {
|
|
402
403
|
key: "crm",
|
|
403
|
-
|
|
404
|
+
systemId: "sales.crm",
|
|
404
405
|
capabilityIds: ["crm.pipeline.manage"],
|
|
405
406
|
icon: IconAddressBook,
|
|
406
407
|
sidebar: SalesSidebar
|
|
@@ -534,6 +534,14 @@
|
|
|
534
534
|
.mantine-Accordion-control:hover {
|
|
535
535
|
background-color: var(--color-surface-hover);
|
|
536
536
|
}
|
|
537
|
+
[data-mantine-color-scheme] .mantine-Accordion-root .mantine-Accordion-item {
|
|
538
|
+
--item-filled-color: var(--color-surface);
|
|
539
|
+
--item-border-color: var(--color-border);
|
|
540
|
+
}
|
|
541
|
+
[data-mantine-color-scheme] .mantine-Accordion-root[data-variant=separated] .mantine-Accordion-item[data-active] {
|
|
542
|
+
background-color: var(--color-surface);
|
|
543
|
+
border-color: var(--color-border);
|
|
544
|
+
}
|
|
537
545
|
.mantine-Menu-item:hover:not([data-disabled]) {
|
|
538
546
|
background-color: var(--color-surface-hover);
|
|
539
547
|
}
|
|
@@ -599,6 +607,36 @@
|
|
|
599
607
|
background-color: var(--color-primary);
|
|
600
608
|
border-color: var(--color-primary);
|
|
601
609
|
}
|
|
610
|
+
.mantine-Tree-node:focus-visible > [data-value] {
|
|
611
|
+
outline: 2px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
|
|
612
|
+
outline-offset: 2px;
|
|
613
|
+
}
|
|
614
|
+
.mantine-Tree-label[data-hovered] {
|
|
615
|
+
background-color: var(--color-surface-hover);
|
|
616
|
+
border-color: var(--color-border);
|
|
617
|
+
}
|
|
618
|
+
.mantine-Tree-label[data-selected] {
|
|
619
|
+
background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
|
620
|
+
border-color: color-mix(in srgb, var(--color-primary) 38%, var(--color-border));
|
|
621
|
+
color: var(--color-primary);
|
|
622
|
+
}
|
|
623
|
+
[data-knowledge-article] pre {
|
|
624
|
+
white-space: pre-wrap;
|
|
625
|
+
word-break: break-word;
|
|
626
|
+
overflow-x: auto;
|
|
627
|
+
max-width: 100%;
|
|
628
|
+
padding: var(--mantine-spacing-sm);
|
|
629
|
+
background-color: var(--color-surface);
|
|
630
|
+
border: 1px solid var(--color-border);
|
|
631
|
+
border-radius: var(--mantine-radius-sm);
|
|
632
|
+
}
|
|
633
|
+
[data-knowledge-article] pre code {
|
|
634
|
+
background: transparent;
|
|
635
|
+
border: none;
|
|
636
|
+
padding: 0;
|
|
637
|
+
white-space: inherit;
|
|
638
|
+
word-break: inherit;
|
|
639
|
+
}
|
|
602
640
|
.recharts-surface:focus {
|
|
603
641
|
outline: none;
|
|
604
642
|
}
|