@elevasis/ui 2.34.0 → 2.36.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 (116) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/app/index.d.ts +37 -30
  3. package/dist/app/index.js +25 -23
  4. package/dist/charts/index.js +3 -5
  5. package/dist/{chunk-ND5TDV2J.js → chunk-57OZ3AEG.js} +1 -1
  6. package/dist/{chunk-E4WQGJNS.js → chunk-7FPLLSHN.js} +14 -1
  7. package/dist/{chunk-RQA2EVN3.js → chunk-AKW7KISS.js} +39 -3
  8. package/dist/chunk-AUDNF2Q7.js +2050 -0
  9. package/dist/chunk-F6EFC2MJ.js +41101 -0
  10. package/dist/{chunk-TYRUKGGD.js → chunk-GX6XBRRF.js} +1 -2
  11. package/dist/{chunk-RIAXZ6AH.js → chunk-K4UZU3TU.js} +2 -2
  12. package/dist/{chunk-V6SZ4ECN.js → chunk-LUYVRATI.js} +257 -6
  13. package/dist/{chunk-DTFKWZ7A.js → chunk-O2Q4VMRN.js} +589 -932
  14. package/dist/{chunk-X4WBGKJQ.js → chunk-R3VCBZDC.js} +50 -3
  15. package/dist/chunk-SIQ3P4OR.js +1764 -0
  16. package/dist/{chunk-3FV6HBXS.js → chunk-WF7CONXF.js} +23 -23
  17. package/dist/{chunk-3QXJK5IY.js → chunk-YYX7OPZQ.js} +1 -1
  18. package/dist/components/index.d.ts +74 -71
  19. package/dist/components/index.js +20 -2795
  20. package/dist/components/navigation/index.js +25 -5
  21. package/dist/execution/index.d.ts +11 -11
  22. package/dist/execution/index.js +1 -2
  23. package/dist/features/auth/index.d.ts +3 -0
  24. package/dist/features/auth/index.js +23 -2
  25. package/dist/features/clients/index.js +20 -26
  26. package/dist/features/crm/index.d.ts +3 -0
  27. package/dist/features/crm/index.js +20 -30
  28. package/dist/features/dashboard/index.d.ts +69 -69
  29. package/dist/features/dashboard/index.js +20 -28
  30. package/dist/features/delivery/index.d.ts +3 -0
  31. package/dist/features/delivery/index.js +20 -30
  32. package/dist/features/knowledge/index.js +25 -9
  33. package/dist/features/lead-gen/index.d.ts +295 -57
  34. package/dist/features/lead-gen/index.js +20 -31
  35. package/dist/features/monitoring/index.js +20 -30
  36. package/dist/features/monitoring/requests/index.js +20 -25
  37. package/dist/features/operations/index.d.ts +183 -183
  38. package/dist/features/operations/index.js +18 -37
  39. package/dist/features/seo/index.js +3 -4
  40. package/dist/features/settings/index.d.ts +3 -0
  41. package/dist/features/settings/index.js +20 -27
  42. package/dist/graph/index.js +1 -1
  43. package/dist/hooks/delivery/index.d.ts +3 -0
  44. package/dist/hooks/delivery/index.js +30 -2
  45. package/dist/hooks/index.d.ts +112 -99
  46. package/dist/hooks/index.js +20 -21
  47. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +46 -46
  48. package/dist/hooks/published.d.ts +112 -99
  49. package/dist/hooks/published.js +20 -20
  50. package/dist/index.css +532 -532
  51. package/dist/index.d.ts +9385 -5915
  52. package/dist/index.js +22 -26
  53. package/dist/initialization/index.d.ts +3 -0
  54. package/dist/knowledge/index.d.ts +42 -42
  55. package/dist/knowledge/index.js +10 -17
  56. package/dist/{knowledge-search-index-ORIJCEZX.js → knowledge-search-index-NBCTFIOH.js} +2 -2
  57. package/dist/layout/index.js +4 -10
  58. package/dist/organization/index.js +27 -1
  59. package/dist/profile/index.d.ts +3 -0
  60. package/dist/provider/index.d.ts +72 -39
  61. package/dist/provider/index.js +20 -15
  62. package/dist/provider/published.d.ts +40 -34
  63. package/dist/provider/published.js +20 -11
  64. package/dist/sse/index.js +26 -5
  65. package/dist/supabase/index.d.ts +6 -0
  66. package/dist/test-utils/index.js +3 -3
  67. package/dist/theme/index.js +2 -3
  68. package/dist/theme/presets/index.d.ts +28 -3
  69. package/dist/theme/presets/index.js +1 -1
  70. package/dist/typeform/index.js +1 -2049
  71. package/dist/types/index.d.ts +82 -79
  72. package/dist/utils/index.d.ts +47 -47
  73. package/dist/utils/index.js +1 -1
  74. package/dist/zustand/index.d.ts +6 -6
  75. package/dist/zustand/index.js +0 -3
  76. package/package.json +5 -5
  77. package/dist/chunk-3AJVNMY5.js +0 -4769
  78. package/dist/chunk-3MEXPLWT.js +0 -265
  79. package/dist/chunk-3ZMAGTWF.js +0 -18
  80. package/dist/chunk-4O4MII5S.js +0 -4716
  81. package/dist/chunk-5EYJ2GIN.js +0 -122
  82. package/dist/chunk-7M2VOCYN.js +0 -1
  83. package/dist/chunk-BPQVTIUP.js +0 -105
  84. package/dist/chunk-BZZCNLT6.js +0 -12
  85. package/dist/chunk-CLDCYJQT.js +0 -1
  86. package/dist/chunk-E565XMTQ.js +0 -17
  87. package/dist/chunk-HRWLKKWM.js +0 -758
  88. package/dist/chunk-IGDYWFNE.js +0 -5198
  89. package/dist/chunk-IIMU5YAJ.js +0 -53
  90. package/dist/chunk-IVGI4GDL.js +0 -1593
  91. package/dist/chunk-JFL3GRD4.js +0 -39
  92. package/dist/chunk-LAWLB6CT.js +0 -951
  93. package/dist/chunk-LGKLC5MG.js +0 -44
  94. package/dist/chunk-LRWTWOGP.js +0 -1778
  95. package/dist/chunk-MP3GPBPX.js +0 -1874
  96. package/dist/chunk-N55DVMAG.js +0 -14
  97. package/dist/chunk-NLBQTDOW.js +0 -12051
  98. package/dist/chunk-O6JXQ6UQ.js +0 -468
  99. package/dist/chunk-OBBQ2JCM.js +0 -68
  100. package/dist/chunk-PDHTXPSF.js +0 -12
  101. package/dist/chunk-PLP3NYPL.js +0 -356
  102. package/dist/chunk-R2XR4FCV.js +0 -48
  103. package/dist/chunk-R66W5UDG.js +0 -26
  104. package/dist/chunk-RYTEQBAO.js +0 -37
  105. package/dist/chunk-SDXSB3HN.js +0 -425
  106. package/dist/chunk-TKAYX2SP.js +0 -204
  107. package/dist/chunk-TUMSNGTX.js +0 -35
  108. package/dist/chunk-VNAZTCHA.js +0 -65
  109. package/dist/chunk-VNFR57DF.js +0 -87
  110. package/dist/chunk-VTXTZXAU.js +0 -539
  111. package/dist/chunk-W73ZABT6.js +0 -85
  112. package/dist/chunk-WU4FNWCW.js +0 -2281
  113. package/dist/chunk-XZGSCABI.js +0 -383
  114. package/dist/chunk-YNWZIWJL.js +0 -1863
  115. /package/dist/{chunk-2RJMVWFJ.js → chunk-GEFWMU26.js} +0 -0
  116. /package/dist/{chunk-22UVE3RA.js → chunk-HENXLGVD.js} +0 -0
@@ -1,356 +0,0 @@
1
- import { FeatureUnavailableState } from './chunk-HRWLKKWM.js';
2
- import { useElevasisSystems } from './chunk-O6JXQ6UQ.js';
3
- import { SubshellContainer, SubshellSidebar, SubshellRightSideContainer } from './chunk-TKAYX2SP.js';
4
- import { CRM_DISCOVERY_NUDGING_STATE, CRM_DISCOVERY_REPLIED_STATE, CRM_DISCOVERY_LINK_SENT_STATE, CRM_DISCOVERY_BOOKING_CANCELLED_STATE } from './chunk-DTFKWZ7A.js';
5
- import { ApiClientProvider, useApiClient } from './chunk-ND5TDV2J.js';
6
- import { useRouterContext } from './chunk-Q7DJKLEN.js';
7
- import { OrganizationProvider } from './chunk-VTXTZXAU.js';
8
- import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-2RJMVWFJ.js';
9
- import { InitializationProvider } from './chunk-533DUEQY.js';
10
- import { useOrganization } from './chunk-DD3CCMCZ.js';
11
- import { ProfileProvider } from './chunk-2Q2JQSQO.js';
12
- import { ElevasisServiceProvider } from './chunk-KJ3QUBNU.js';
13
- import { useAuthContext } from './chunk-BRJ3QZ4E.js';
14
- import { createContext, lazy, useContext, Suspense, useRef } from 'react';
15
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
16
- import { z } from 'zod';
17
- import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
18
-
19
- var consoleAdapter = {
20
- success(title, message) {
21
- console.log(`[Notification][Success] ${title}: ${message}`);
22
- },
23
- error(title, message) {
24
- console.warn(`[Notification][Error] ${title}: ${message}`);
25
- },
26
- info(title, message) {
27
- console.log(`[Notification][Info] ${title}: ${message}`);
28
- },
29
- warning(title, message) {
30
- console.warn(`[Notification][Warning] ${title}: ${message}`);
31
- },
32
- apiError(error) {
33
- const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
34
- const title = getErrorTitle(code);
35
- const formatted = formatErrorMessage(message, requestId, fields, retryAfter);
36
- console.warn(`[Notification][API Error] ${title}: ${formatted}`);
37
- }
38
- };
39
- var NotificationContext = createContext(consoleAdapter);
40
- function NotificationProvider({ adapter, children }) {
41
- return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: adapter, children });
42
- }
43
- function useNotificationAdapter() {
44
- return useContext(NotificationContext);
45
- }
46
-
47
- // ../core/src/business/acquisition/deal-ownership.ts
48
- var INBOUND_EVENT_TYPES = ["reply_received"];
49
- var OUTBOUND_EVENT_TYPES = [
50
- "reply_sent_to_lead",
51
- "booking_nudge_sent",
52
- "reminder_sent",
53
- "rebook_sent",
54
- "followup_email_sent",
55
- "reply_followup_sent",
56
- "lead_deferred_next_step"
57
- ];
58
- var INBOUND_SET = new Set(INBOUND_EVENT_TYPES);
59
- var OUTBOUND_SET = new Set(OUTBOUND_EVENT_TYPES);
60
- function getDealOwnership(deal) {
61
- if (deal.state_key === "closed_won" || deal.state_key === "closed_lost") {
62
- return null;
63
- }
64
- if (!Array.isArray(deal.activity_log)) return null;
65
- let latestInboundMs = null;
66
- let latestOutboundMs = null;
67
- for (const entry of deal.activity_log) {
68
- if (!entry || typeof entry !== "object" || Array.isArray(entry)) continue;
69
- const record = entry;
70
- const type = typeof record.type === "string" ? record.type : null;
71
- if (!type) continue;
72
- const isInbound = INBOUND_SET.has(type);
73
- const isOutbound = OUTBOUND_SET.has(type);
74
- if (!isInbound && !isOutbound) continue;
75
- const occurredAt = resolveTimestamp(record);
76
- if (occurredAt === null) continue;
77
- if (isInbound && (latestInboundMs === null || occurredAt > latestInboundMs)) {
78
- latestInboundMs = occurredAt;
79
- }
80
- if (isOutbound && (latestOutboundMs === null || occurredAt > latestOutboundMs)) {
81
- latestOutboundMs = occurredAt;
82
- }
83
- }
84
- if (latestInboundMs === null && latestOutboundMs === null) return null;
85
- if (latestOutboundMs !== null && (latestInboundMs === null || latestOutboundMs >= latestInboundMs)) {
86
- return "them";
87
- }
88
- return "us";
89
- }
90
- function resolveTimestamp(record) {
91
- return parseMs(record.timestamp) ?? parseMs(record.occurredAt) ?? parseMs(record.createdAt) ?? parseMs(record.updatedAt) ?? parseMs(record.sentAt) ?? null;
92
- }
93
- function parseMs(value) {
94
- if (value instanceof Date) {
95
- const ms2 = value.getTime();
96
- return Number.isNaN(ms2) ? null : ms2;
97
- }
98
- if (typeof value !== "string") return null;
99
- const ms = new Date(value).getTime();
100
- return Number.isNaN(ms) ? null : ms;
101
- }
102
- var SendReplyActionPayloadSchema = z.object({
103
- replyBody: z.string().trim().min(1).max(1e4)
104
- }).strict();
105
- var CRM_RUNTIME_ACTION_METADATA = {
106
- move_to_proposal: {
107
- key: "move_to_proposal",
108
- label: "Move to Proposal",
109
- workflowId: "move_to_proposal-workflow"
110
- },
111
- move_to_closing: {
112
- key: "move_to_closing",
113
- label: "Move to Closing",
114
- workflowId: "move_to_closing-workflow"
115
- },
116
- move_to_closed_won: {
117
- key: "move_to_closed_won",
118
- label: "Close Won",
119
- workflowId: "move_to_closed_won-workflow"
120
- },
121
- move_to_closed_lost: {
122
- key: "move_to_closed_lost",
123
- label: "Close Lost",
124
- workflowId: "move_to_closed_lost-workflow"
125
- },
126
- move_to_nurturing: {
127
- key: "move_to_nurturing",
128
- label: "Move to Nurturing",
129
- workflowId: "move_to_nurturing-workflow"
130
- },
131
- send_reply: {
132
- key: "send_reply",
133
- label: "Send Reply",
134
- workflowId: "crm-send-reply-workflow"
135
- },
136
- send_link: {
137
- key: "send_link",
138
- label: "Send Booking Link",
139
- workflowId: "crm-send-booking-link-workflow"
140
- },
141
- send_nudge: {
142
- key: "send_nudge",
143
- label: "Send Nudge",
144
- workflowId: "crm-send-nudge-workflow"
145
- },
146
- rebook: {
147
- key: "rebook",
148
- label: "Rebook",
149
- workflowId: "crm-rebook-workflow"
150
- }
151
- };
152
- function crmAction(actionId, runtime) {
153
- const metadata = CRM_RUNTIME_ACTION_METADATA[actionId];
154
- if (!metadata?.workflowId) {
155
- throw new Error(`CRM action metadata for "${actionId}" must define resourceId`);
156
- }
157
- return {
158
- key: metadata.key,
159
- label: metadata.label,
160
- workflowId: metadata.workflowId,
161
- ...runtime
162
- };
163
- }
164
- var DEFAULT_CRM_ACTIONS = [
165
- crmAction("move_to_proposal", {
166
- isAvailableFor: (deal) => deal.stage_key === "interested"
167
- }),
168
- crmAction("move_to_closing", {
169
- isAvailableFor: (deal) => deal.stage_key === "proposal"
170
- }),
171
- crmAction("move_to_closed_won", {
172
- isAvailableFor: (deal) => deal.stage_key === "closing"
173
- }),
174
- crmAction("move_to_closed_lost", {
175
- isAvailableFor: (deal) => deal.stage_key === "interested" || deal.stage_key === "proposal" || deal.stage_key === "closing"
176
- }),
177
- crmAction("move_to_nurturing", {
178
- isAvailableFor: (deal) => deal.stage_key === "interested" || deal.stage_key === "proposal" || deal.stage_key === "closing"
179
- }),
180
- crmAction("send_reply", {
181
- 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),
182
- payloadSchema: SendReplyActionPayloadSchema
183
- }),
184
- crmAction("send_link", {
185
- isAvailableFor: (deal) => deal.stage_key === "interested" && deal.state_key === CRM_DISCOVERY_REPLIED_STATE.stateKey
186
- }),
187
- crmAction("send_nudge", {
188
- isAvailableFor: (deal) => deal.stage_key === "interested" && (deal.state_key === CRM_DISCOVERY_LINK_SENT_STATE.stateKey || deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey)
189
- }),
190
- {
191
- key: "mark_no_show",
192
- label: "Mark No-Show",
193
- isAvailableFor: (deal) => deal.stage_key === "interested" && deal.state_key === CRM_DISCOVERY_NUDGING_STATE.stateKey,
194
- // Mirrors the auto-timeout precedent in operations/sales/crm/pipeline/timeout-actions.ts:
195
- // both manual-click and timeout move the deal to closed_lost. The action_taken activity
196
- // event captures operator intent and distinguishes the manual variant from the timed one.
197
- workflowId: "mark_no_show-workflow"
198
- },
199
- crmAction("rebook", {
200
- isAvailableFor: (deal) => deal.stage_key === "interested" && deal.state_key === CRM_DISCOVERY_BOOKING_CANCELLED_STATE.stateKey
201
- })
202
- ];
203
- function deriveActions(deal, actions = DEFAULT_CRM_ACTIONS) {
204
- return actions.filter((a) => a.isAvailableFor(deal)).map(({ key, label, payloadSchema }) => ({ key, label, payloadSchema }));
205
- }
206
- function isOurReplyAction(deal) {
207
- if (Object.prototype.hasOwnProperty.call(deal, "nextAction")) {
208
- return deal.nextAction === "send_reply";
209
- }
210
- return (deal.ownership ?? getDealOwnership(deal)) === "us";
211
- }
212
- var CrmActionsContext = createContext(DEFAULT_CRM_ACTIONS);
213
- function CrmActionsProvider({ actions, children }) {
214
- return /* @__PURE__ */ jsx(CrmActionsContext.Provider, { value: actions, children });
215
- }
216
- function useCrmActions() {
217
- return useContext(CrmActionsContext);
218
- }
219
- var EMPTY_LIST_ACTIONS = Object.freeze([]);
220
- var ListActionsContext = createContext(EMPTY_LIST_ACTIONS);
221
- function ListActionsProvider({
222
- registry = EMPTY_LIST_ACTIONS,
223
- children
224
- }) {
225
- return /* @__PURE__ */ jsx(ListActionsContext.Provider, { value: registry, children });
226
- }
227
- function useListActions() {
228
- return useContext(ListActionsContext);
229
- }
230
- function findListActionByAction(registry, actionKey) {
231
- return registry.find((action) => action.actionKey === actionKey);
232
- }
233
- function getListActionWorkflowId(action) {
234
- return action.workflowId ?? action.resourceId;
235
- }
236
- var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-QC62UHTZ.js').then((m) => ({ default: m.CoreAuthKitInner })));
237
- var defaultQueryClient = null;
238
- function getDefaultQueryClient() {
239
- if (!defaultQueryClient) {
240
- defaultQueryClient = new QueryClient({
241
- defaultOptions: { queries: { retry: 1 } }
242
- });
243
- }
244
- return defaultQueryClient;
245
- }
246
- var consoleNotificationAdapter = {
247
- success(title, message) {
248
- console.log(`[Notification][Success] ${title}: ${message}`);
249
- },
250
- error(title, message) {
251
- console.warn(`[Notification][Error] ${title}: ${message}`);
252
- },
253
- info(title, message) {
254
- console.log(`[Notification][Info] ${title}: ${message}`);
255
- },
256
- warning(title, message) {
257
- console.warn(`[Notification][Warning] ${title}: ${message}`);
258
- },
259
- apiError(error) {
260
- console.warn(`[Notification][API Error]`, error);
261
- }
262
- };
263
- function ElevasisCoreProvider({
264
- auth,
265
- queryClient,
266
- apiUrl,
267
- onError,
268
- notifications,
269
- crmActions,
270
- listActions,
271
- children
272
- }) {
273
- if (auth.mode === "apiKey") {
274
- throw new Error(
275
- `ElevasisCoreProvider: auth mode 'apiKey' is not yet implemented. Only 'authkit' mode is supported.`
276
- );
277
- }
278
- const resolvedQueryClient = queryClient ?? getDefaultQueryClient();
279
- const resolvedCrmActions = crmActions ?? DEFAULT_CRM_ACTIONS;
280
- const resolvedListActions = listActions ?? EMPTY_LIST_ACTIONS;
281
- const content = apiUrl ? /* @__PURE__ */ jsx(ServiceStack, { apiUrl, onError, notifications, children }) : children;
282
- const AuthInner = /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCoreAuthKitInner, { auth, children: content }) });
283
- return /* @__PURE__ */ jsx(QueryClientProvider, { client: resolvedQueryClient, children: /* @__PURE__ */ jsx(CrmActionsProvider, { actions: resolvedCrmActions, children: /* @__PURE__ */ jsx(ListActionsProvider, { registry: resolvedListActions, children: AuthInner }) }) });
284
- }
285
- function ServiceStack({
286
- apiUrl,
287
- onError,
288
- notifications,
289
- children
290
- }) {
291
- const { getAccessToken } = useAuthContext();
292
- const orgIdRef = useRef(null);
293
- const getOrganizationId = useRef(() => orgIdRef.current).current;
294
- return /* @__PURE__ */ jsx(
295
- ApiClientProvider,
296
- {
297
- getAccessToken,
298
- getOrganizationId,
299
- isOrganizationReady: false,
300
- onError,
301
- children: /* @__PURE__ */ jsx(ServiceStackInner, { apiUrl, orgIdRef, notifications, children })
302
- }
303
- );
304
- }
305
- function ServiceStackInner({
306
- apiUrl,
307
- orgIdRef,
308
- notifications,
309
- children
310
- }) {
311
- const { apiRequest } = useApiClient(apiUrl);
312
- const resolvedNotifications = notifications ?? consoleNotificationAdapter;
313
- return /* @__PURE__ */ jsx(ProfileProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrganizationProvider, { apiRequest, children: /* @__PURE__ */ jsx(OrgServiceBridge, { orgIdRef, apiRequest, notifications: resolvedNotifications, children }) }) });
314
- }
315
- function OrgServiceBridge({
316
- orgIdRef,
317
- apiRequest,
318
- notifications,
319
- children
320
- }) {
321
- const { currentWorkOSOrganizationId, isInitializing, isOrgRefreshing } = useOrganization();
322
- orgIdRef.current = currentWorkOSOrganizationId;
323
- const isReady = !!currentWorkOSOrganizationId && !isInitializing && !isOrgRefreshing;
324
- return /* @__PURE__ */ jsx(
325
- ElevasisServiceProvider,
326
- {
327
- apiRequest,
328
- workOSOrganizationId: currentWorkOSOrganizationId,
329
- isReady,
330
- children: /* @__PURE__ */ jsx(NotificationProvider, { adapter: notifications, children: /* @__PURE__ */ jsx(InitializationProvider, { children }) })
331
- }
332
- );
333
- }
334
- var defaultSystemSidebarWidth = 250;
335
- function SystemShell({ children }) {
336
- const { shellRuntime } = useElevasisSystems();
337
- const { currentPath } = useRouterContext();
338
- const routeMatch = shellRuntime.resolveRoute(currentPath);
339
- if (routeMatch.status === "hidden") {
340
- return /* @__PURE__ */ jsx(FeatureUnavailableState, { path: currentPath });
341
- }
342
- if (routeMatch.status !== "matched" || !routeMatch.system?.sidebar) {
343
- return /* @__PURE__ */ jsx(Fragment, { children });
344
- }
345
- const SidebarComponent = routeMatch.system.sidebar;
346
- const sidebarWidth = typeof routeMatch.system.sidebarWidth === "function" ? routeMatch.system.sidebarWidth({ currentPath }) : routeMatch.system.sidebarWidth ?? defaultSystemSidebarWidth;
347
- if (sidebarWidth === 0) {
348
- return /* @__PURE__ */ jsx(Fragment, { children });
349
- }
350
- return /* @__PURE__ */ jsxs(SubshellContainer, { children: [
351
- /* @__PURE__ */ jsx(SubshellSidebar, { width: sidebarWidth, children: /* @__PURE__ */ jsx(SidebarComponent, {}) }),
352
- /* @__PURE__ */ jsx(SubshellRightSideContainer, { children })
353
- ] });
354
- }
355
-
356
- export { CrmActionsProvider, EMPTY_LIST_ACTIONS, ElevasisCoreProvider, ListActionsProvider, NotificationProvider, SystemShell, deriveActions, findListActionByAction, getListActionWorkflowId, useCrmActions, useListActions, useNotificationAdapter };
@@ -1,48 +0,0 @@
1
- // src/features/delivery/_shared.ts
2
- var projectStatusColors = {
3
- active: "blue",
4
- on_track: "green",
5
- at_risk: "yellow",
6
- blocked: "red",
7
- completed: "teal",
8
- paused: "gray"
9
- };
10
- var milestoneStatusColors = {
11
- upcoming: "gray",
12
- in_progress: "blue",
13
- completed: "green",
14
- overdue: "red",
15
- blocked: "orange"
16
- };
17
- var taskStatusColors = {
18
- pending: "gray",
19
- planned: "gray",
20
- in_progress: "blue",
21
- submitted: "yellow",
22
- approved: "green",
23
- rejected: "red",
24
- revision_requested: "orange"
25
- };
26
- var taskTypeColors = {
27
- documentation: "blue",
28
- code: "violet",
29
- report: "cyan",
30
- design: "pink",
31
- other: "gray"
32
- };
33
- var noteTypeColors = {
34
- call_note: "blue",
35
- status_update: "green",
36
- issue: "yellow",
37
- blocker: "red",
38
- agent_learning: "grape"
39
- };
40
- function formatStatusLabel(status) {
41
- return status.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
42
- }
43
- function calculateProgress(completed, total) {
44
- if (total === 0) return 0;
45
- return Math.round(completed / total * 100);
46
- }
47
-
48
- export { calculateProgress, formatStatusLabel, milestoneStatusColors, noteTypeColors, projectStatusColors, taskStatusColors, taskTypeColors };
@@ -1,26 +0,0 @@
1
- import { Modal } from '@mantine/core';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- // src/components/modal/CustomModal.tsx
5
- var FULL_SIZE = "80%";
6
- var CustomModal = ({ children, opened, onClose, loading, style, size }) => {
7
- const canClose = loading === true ? false : true;
8
- const resolvedSize = size === "full" ? FULL_SIZE : size;
9
- return /* @__PURE__ */ jsx(
10
- Modal,
11
- {
12
- opened,
13
- onClose,
14
- padding: "xs",
15
- withCloseButton: false,
16
- closeOnClickOutside: canClose,
17
- closeOnEscape: canClose,
18
- centered: true,
19
- style,
20
- size: resolvedSize,
21
- children
22
- }
23
- );
24
- };
25
-
26
- export { CustomModal };
@@ -1,37 +0,0 @@
1
- import { useAppearance } from './chunk-E565XMTQ.js';
2
- import { topbarHeight } from './chunk-DT3QYZVU.js';
3
- import { Stack, Title, Button } from '@mantine/core';
4
- import { IconAlertCircle } from '@tabler/icons-react';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
-
7
- var standardMdSpacing = 16;
8
- var topAndBottomSpacing = standardMdSpacing * 2;
9
- var AppShellCenteredContainer = ({ children }) => {
10
- return /* @__PURE__ */ jsx(
11
- "div",
12
- {
13
- style: {
14
- display: "flex",
15
- alignItems: "center",
16
- justifyContent: "center",
17
- margin: "auto auto",
18
- height: `calc(100vh - ${topbarHeight + topAndBottomSpacing}px)`,
19
- textAlign: "center"
20
- },
21
- children
22
- }
23
- );
24
- };
25
- var AppShellLoader = () => {
26
- const { loader } = useAppearance();
27
- return /* @__PURE__ */ jsx(AppShellCenteredContainer, { children: loader });
28
- };
29
- var AppShellError = ({ message, retry }) => {
30
- return /* @__PURE__ */ jsx(AppShellCenteredContainer, { children: /* @__PURE__ */ jsxs(Stack, { align: "center", gap: "md", children: [
31
- /* @__PURE__ */ jsx(IconAlertCircle, { size: 48, color: "var(--color-error)" }),
32
- /* @__PURE__ */ jsx(Title, { order: 3, c: "dimmed", children: message }),
33
- retry && /* @__PURE__ */ jsx(Button, { onClick: retry, children: "Retry" })
34
- ] }) });
35
- };
36
-
37
- export { AppShellCenteredContainer, AppShellError, AppShellLoader };