@elevasis/ui 2.31.0 → 2.33.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-JKSUN5GN.js → chunk-2GMF5IRF.js} +81 -746
- 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-52NLZN6Z.js} +118 -141
- package/dist/chunk-AHCKOU2M.js +13 -0
- package/dist/chunk-CLDCYJQT.js +1 -0
- package/dist/chunk-DWXDNT7P.js +145 -0
- package/dist/chunk-E4T2N7P7.js +124 -0
- package/dist/{chunk-HYNYEBHM.js → chunk-E7C4XEWH.js} +3 -3
- package/dist/{chunk-L3BVJWML.js → chunk-EPTHX4VZ.js} +1 -1
- package/dist/{chunk-QDEETKYT.js → chunk-FFPHJBJC.js} +9 -9
- package/dist/chunk-GNRMB6DC.js +5126 -0
- package/dist/{chunk-DZTG5IAC.js → chunk-I2KLQ2HA.js} +1 -7
- package/dist/{chunk-Q6OYNEGR.js → chunk-IUKFNASA.js} +5 -6
- package/dist/{chunk-QHEWXU7I.js → chunk-JFL3GRD4.js} +1 -1
- package/dist/{chunk-T3IPHEYJ.js → chunk-JHT5JIJ3.js} +4410 -566
- package/dist/{chunk-L2NVFLXU.js → chunk-MHLZ4F4N.js} +4 -4
- package/dist/{chunk-XQQEKWTL.js → chunk-N55DVMAG.js} +6 -2
- package/dist/{chunk-TOIXUWR6.js → chunk-ND5TDV2J.js} +1 -1
- package/dist/{chunk-5LJAEZMA.js → chunk-NOIRGGW2.js} +5 -6
- package/dist/{chunk-7KC4P3AU.js → chunk-QNOVUCSV.js} +2 -12
- package/dist/{chunk-3BAPR3KA.js → chunk-RQA2EVN3.js} +5 -15
- package/dist/{chunk-ND42LPY4.js → chunk-TKF5S4XP.js} +6 -6
- package/dist/{chunk-DWK2QIAK.js → chunk-TYRUKGGD.js} +1 -1
- package/dist/{chunk-Y4FWCG7Y.js → chunk-UVFOURXR.js} +8 -7
- package/dist/chunk-UW7IV2Y3.js +447 -0
- package/dist/{chunk-P55BJZZW.js → chunk-V6SZ4ECN.js} +20 -5
- package/dist/{chunk-6YT4IKJ7.js → chunk-VNAZTCHA.js} +15 -0
- package/dist/chunk-XG57WXOL.js +85 -0
- package/dist/{chunk-SHQXMW4F.js → chunk-XOFSMJLF.js} +46 -28
- package/dist/{chunk-7HMCB26R.js → chunk-XZGSCABI.js} +1 -1
- package/dist/chunk-YAQ25UNM.js +2126 -0
- package/dist/chunk-ZGTDKH3P.js +467 -0
- package/dist/components/chat/index.js +1 -1
- package/dist/components/index.css +38 -0
- package/dist/components/index.d.ts +262 -51
- package/dist/components/index.js +37 -39
- package/dist/components/navigation/index.css +38 -0
- package/dist/components/navigation/index.js +5 -3
- package/dist/execution/index.d.ts +11 -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 +17 -15
- package/dist/features/crm/index.css +38 -0
- package/dist/features/crm/index.d.ts +80 -18
- package/dist/features/crm/index.js +17 -15
- package/dist/features/dashboard/index.css +38 -0
- package/dist/features/dashboard/index.d.ts +174 -25
- package/dist/features/dashboard/index.js +17 -16
- package/dist/features/delivery/index.css +38 -0
- package/dist/features/delivery/index.d.ts +80 -18
- package/dist/features/delivery/index.js +16 -15
- package/dist/features/knowledge/index.css +38 -0
- package/dist/features/knowledge/index.d.ts +20 -18
- package/dist/features/knowledge/index.js +114 -609
- 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 +17 -16
- package/dist/features/monitoring/index.css +38 -0
- package/dist/features/monitoring/index.d.ts +20 -18
- package/dist/features/monitoring/index.js +18 -17
- package/dist/features/monitoring/requests/index.css +38 -0
- package/dist/features/monitoring/requests/index.d.ts +23 -21
- package/dist/features/monitoring/requests/index.js +16 -14
- package/dist/features/operations/index.css +38 -0
- package/dist/features/operations/index.d.ts +1299 -66
- package/dist/features/operations/index.js +22 -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 +17 -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 +492 -89
- package/dist/hooks/index.js +15 -13
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +332 -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 +492 -89
- package/dist/hooks/published.js +15 -13
- package/dist/index.css +38 -0
- package/dist/index.d.ts +1353 -1349
- package/dist/index.js +16 -14
- package/dist/initialization/index.d.ts +60 -0
- package/dist/initialization/index.js +1 -1
- package/dist/knowledge/index.d.ts +1217 -1292
- package/dist/knowledge/index.js +6538 -2198
- package/dist/knowledge-search-index-P7PR626V.js +1514 -0
- 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 +1068 -1246
- package/dist/provider/index.js +12 -10
- package/dist/provider/published.css +38 -0
- package/dist/provider/published.d.ts +1065 -1243
- package/dist/provider/published.js +9 -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 +394 -35
- package/dist/utils/index.d.ts +174 -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 +10 -9
- package/src/README.md +29 -29
- package/src/api/README.md +18 -18
- package/src/app/README.md +24 -24
- package/src/auth/README.md +18 -18
- package/src/components/README.md +24 -24
- package/src/execution/README.md +16 -16
- package/src/features/README.md +28 -28
- package/src/graph/README.md +16 -16
- package/src/hooks/README.md +23 -23
- package/src/initialization/README.md +19 -19
- package/src/knowledge/README.md +31 -31
- package/src/organization/README.md +18 -18
- package/src/profile/README.md +19 -19
- package/src/provider/README.md +32 -32
- package/src/router/README.md +18 -18
- package/src/sse/README.md +13 -13
- package/src/test-utils/README.md +7 -7
- package/src/theme/README.md +23 -23
- package/src/theme/presets/README.md +19 -19
- package/src/types/README.md +16 -16
- package/src/utils/README.md +18 -18
- package/src/zustand/README.md +18 -18
- 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-GRDLB6LM.js +0 -160
- package/dist/chunk-JDNEWB5F.js +0 -10
- package/dist/chunk-MVFCLZSK.js +0 -4337
- package/dist/chunk-O2QOPJI5.js +0 -2235
- package/dist/chunk-OAVTMITG.js +0 -13
- package/dist/chunk-TVRQ6AQI.js +0 -476
- package/dist/chunk-WF227UBV.js +0 -48
|
@@ -450,13 +450,22 @@ type ResourceStatus = 'dev' | 'prod';
|
|
|
450
450
|
declare const LinkSchema: z.ZodObject<{
|
|
451
451
|
nodeId: z.ZodString;
|
|
452
452
|
kind: z.ZodEnum<{
|
|
453
|
+
links: "links";
|
|
454
|
+
affects: "affects";
|
|
455
|
+
effects: "effects";
|
|
456
|
+
implements: "implements";
|
|
457
|
+
reads: "reads";
|
|
458
|
+
writes: "writes";
|
|
459
|
+
emits: "emits";
|
|
453
460
|
contains: "contains";
|
|
454
461
|
references: "references";
|
|
455
|
-
exposes: "exposes";
|
|
456
462
|
maps_to: "maps_to";
|
|
457
|
-
"operates-on": "operates-on";
|
|
458
463
|
uses: "uses";
|
|
459
464
|
governs: "governs";
|
|
465
|
+
originates_from: "originates_from";
|
|
466
|
+
triggers: "triggers";
|
|
467
|
+
applies_to: "applies_to";
|
|
468
|
+
uses_catalog: "uses_catalog";
|
|
460
469
|
}>;
|
|
461
470
|
}, z.core.$strip>;
|
|
462
471
|
type Link = z.infer<typeof LinkSchema>;
|
package/dist/execution/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { AGENT_CONSTANTS, CONTAINER_CONSTANTS, SHARED_VIZ_CONSTANTS, STATUS_COLORS, TIMELINE_CONSTANTS, WORKFLOW_CONSTANTS, calculateBarPosition, formatDuration, getEdgeColor, getEdgeOpacity, getResourceStatusColor, getStatusColors, getStatusIcon, shouldAnimateEdge, useAgentIterationData, useExecutionPath, useReactFlowAgent, useTimelineData, useUnifiedWorkflowLayout, useWorkflowStepsLayout } from '../chunk-E4WQGJNS.js';
|
|
2
2
|
export { useMergedExecution } from '../chunk-3ZMAGTWF.js';
|
|
3
3
|
import '../chunk-KRWALB24.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-I2KLQ2HA.js';
|
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
.mantine-Accordion-control:hover {
|
|
151
151
|
background-color: var(--color-surface-hover);
|
|
152
152
|
}
|
|
153
|
+
[data-mantine-color-scheme] .mantine-Accordion-root .mantine-Accordion-item {
|
|
154
|
+
--item-filled-color: var(--color-surface);
|
|
155
|
+
--item-border-color: var(--color-border);
|
|
156
|
+
}
|
|
157
|
+
[data-mantine-color-scheme] .mantine-Accordion-root[data-variant=separated] .mantine-Accordion-item[data-active] {
|
|
158
|
+
background-color: var(--color-surface);
|
|
159
|
+
border-color: var(--color-border);
|
|
160
|
+
}
|
|
153
161
|
.mantine-Menu-item:hover:not([data-disabled]) {
|
|
154
162
|
background-color: var(--color-surface-hover);
|
|
155
163
|
}
|
|
@@ -215,6 +223,36 @@
|
|
|
215
223
|
background-color: var(--color-primary);
|
|
216
224
|
border-color: var(--color-primary);
|
|
217
225
|
}
|
|
226
|
+
.mantine-Tree-node:focus-visible > [data-value] {
|
|
227
|
+
outline: 2px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
|
|
228
|
+
outline-offset: 2px;
|
|
229
|
+
}
|
|
230
|
+
.mantine-Tree-label[data-hovered] {
|
|
231
|
+
background-color: var(--color-surface-hover);
|
|
232
|
+
border-color: var(--color-border);
|
|
233
|
+
}
|
|
234
|
+
.mantine-Tree-label[data-selected] {
|
|
235
|
+
background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
|
236
|
+
border-color: color-mix(in srgb, var(--color-primary) 38%, var(--color-border));
|
|
237
|
+
color: var(--color-primary);
|
|
238
|
+
}
|
|
239
|
+
[data-knowledge-article] pre {
|
|
240
|
+
white-space: pre-wrap;
|
|
241
|
+
word-break: break-word;
|
|
242
|
+
overflow-x: auto;
|
|
243
|
+
max-width: 100%;
|
|
244
|
+
padding: var(--mantine-spacing-sm);
|
|
245
|
+
background-color: var(--color-surface);
|
|
246
|
+
border: 1px solid var(--color-border);
|
|
247
|
+
border-radius: var(--mantine-radius-sm);
|
|
248
|
+
}
|
|
249
|
+
[data-knowledge-article] pre code {
|
|
250
|
+
background: transparent;
|
|
251
|
+
border: none;
|
|
252
|
+
padding: 0;
|
|
253
|
+
white-space: inherit;
|
|
254
|
+
word-break: inherit;
|
|
255
|
+
}
|
|
218
256
|
.recharts-surface:focus {
|
|
219
257
|
outline: none;
|
|
220
258
|
}
|
|
@@ -2766,6 +2766,66 @@ type Database = {
|
|
|
2766
2766
|
}
|
|
2767
2767
|
];
|
|
2768
2768
|
};
|
|
2769
|
+
user_notes: {
|
|
2770
|
+
Row: {
|
|
2771
|
+
content: string;
|
|
2772
|
+
created_at: string;
|
|
2773
|
+
created_by: string;
|
|
2774
|
+
id: string;
|
|
2775
|
+
metadata: Json;
|
|
2776
|
+
organization_id: string | null;
|
|
2777
|
+
pinned: boolean;
|
|
2778
|
+
priority: string;
|
|
2779
|
+
source: string | null;
|
|
2780
|
+
title: string | null;
|
|
2781
|
+
updated_at: string;
|
|
2782
|
+
user_id: string;
|
|
2783
|
+
};
|
|
2784
|
+
Insert: {
|
|
2785
|
+
content: string;
|
|
2786
|
+
created_at?: string;
|
|
2787
|
+
created_by?: string;
|
|
2788
|
+
id?: string;
|
|
2789
|
+
metadata?: Json;
|
|
2790
|
+
organization_id?: string | null;
|
|
2791
|
+
pinned?: boolean;
|
|
2792
|
+
priority?: string;
|
|
2793
|
+
source?: string | null;
|
|
2794
|
+
title?: string | null;
|
|
2795
|
+
updated_at?: string;
|
|
2796
|
+
user_id: string;
|
|
2797
|
+
};
|
|
2798
|
+
Update: {
|
|
2799
|
+
content?: string;
|
|
2800
|
+
created_at?: string;
|
|
2801
|
+
created_by?: string;
|
|
2802
|
+
id?: string;
|
|
2803
|
+
metadata?: Json;
|
|
2804
|
+
organization_id?: string | null;
|
|
2805
|
+
pinned?: boolean;
|
|
2806
|
+
priority?: string;
|
|
2807
|
+
source?: string | null;
|
|
2808
|
+
title?: string | null;
|
|
2809
|
+
updated_at?: string;
|
|
2810
|
+
user_id?: string;
|
|
2811
|
+
};
|
|
2812
|
+
Relationships: [
|
|
2813
|
+
{
|
|
2814
|
+
foreignKeyName: "user_notes_organization_id_fkey";
|
|
2815
|
+
columns: ["organization_id"];
|
|
2816
|
+
isOneToOne: false;
|
|
2817
|
+
referencedRelation: "organizations";
|
|
2818
|
+
referencedColumns: ["id"];
|
|
2819
|
+
},
|
|
2820
|
+
{
|
|
2821
|
+
foreignKeyName: "user_notes_user_id_fkey";
|
|
2822
|
+
columns: ["user_id"];
|
|
2823
|
+
isOneToOne: false;
|
|
2824
|
+
referencedRelation: "users";
|
|
2825
|
+
referencedColumns: ["id"];
|
|
2826
|
+
}
|
|
2827
|
+
];
|
|
2828
|
+
};
|
|
2769
2829
|
users: {
|
|
2770
2830
|
Row: {
|
|
2771
2831
|
config: Json;
|
|
@@ -3128,26 +3188,36 @@ interface FeatureAccessResult {
|
|
|
3128
3188
|
restrictedBy: RestrictionSource;
|
|
3129
3189
|
}
|
|
3130
3190
|
|
|
3131
|
-
type
|
|
3132
|
-
checkFeature: (
|
|
3191
|
+
type UseSystemAccessHook = () => {
|
|
3192
|
+
checkFeature: (systemKey: string) => FeatureAccessResult;
|
|
3133
3193
|
isReady: boolean;
|
|
3134
3194
|
};
|
|
3135
|
-
interface
|
|
3136
|
-
|
|
3195
|
+
interface SystemGuardProps {
|
|
3196
|
+
systemKey: string;
|
|
3197
|
+
children: React.ReactNode;
|
|
3198
|
+
deniedMessage?: string;
|
|
3199
|
+
/**
|
|
3200
|
+
* The `useFeatureAccess` hook instance to use for access resolution.
|
|
3201
|
+
* Must be created via `createFeatureAccessHook` from `@repo/ui/hooks`.
|
|
3202
|
+
*/
|
|
3203
|
+
useFeatureAccess: UseSystemAccessHook;
|
|
3204
|
+
}
|
|
3205
|
+
interface SurfaceGuardProps {
|
|
3206
|
+
surfaceKey: string;
|
|
3137
3207
|
children: React.ReactNode;
|
|
3138
3208
|
deniedMessage?: string;
|
|
3139
3209
|
/**
|
|
3140
|
-
* The `useFeatureAccess` hook instance to use for
|
|
3210
|
+
* The `useFeatureAccess` hook instance to use for access resolution.
|
|
3141
3211
|
* Must be created via `createFeatureAccessHook` from `@repo/ui/hooks`.
|
|
3142
3212
|
*/
|
|
3143
|
-
useFeatureAccess:
|
|
3213
|
+
useFeatureAccess: UseSystemAccessHook;
|
|
3144
3214
|
}
|
|
3145
3215
|
/**
|
|
3146
|
-
* Route guard that restricts access to a named
|
|
3216
|
+
* Route guard that restricts access to a named system.
|
|
3147
3217
|
*
|
|
3148
|
-
* Reads
|
|
3218
|
+
* Reads system access from the provided `useFeatureAccess` hook instance
|
|
3149
3219
|
* (created via `createFeatureAccessHook` from `@repo/ui/hooks`). When the
|
|
3150
|
-
*
|
|
3220
|
+
* system is not allowed, shows a Mantine notification and redirects to '/'.
|
|
3151
3221
|
*
|
|
3152
3222
|
* The `restrictedBy === 'membership'` branch surfaces a personal access
|
|
3153
3223
|
* denial message, while other restriction sources surface an org-level message.
|
|
@@ -3161,15 +3231,22 @@ interface FeatureGuardProps {
|
|
|
3161
3231
|
* function MonitoringLayout() {
|
|
3162
3232
|
* return (
|
|
3163
3233
|
* <ProtectedRoute>
|
|
3164
|
-
* <
|
|
3234
|
+
* <SystemGuard systemKey="monitoring" useFeatureAccess={useFeatureAccess}>
|
|
3165
3235
|
* <Outlet />
|
|
3166
|
-
* </
|
|
3236
|
+
* </SystemGuard>
|
|
3167
3237
|
* </ProtectedRoute>
|
|
3168
3238
|
* )
|
|
3169
3239
|
* }
|
|
3170
3240
|
* ```
|
|
3171
3241
|
*/
|
|
3172
|
-
declare function
|
|
3242
|
+
declare function SystemGuard({ systemKey, children, deniedMessage, useFeatureAccess }: SystemGuardProps): react_jsx_runtime.JSX.Element | null;
|
|
3243
|
+
/**
|
|
3244
|
+
* Route guard for navigation-only app surfaces.
|
|
3245
|
+
*
|
|
3246
|
+
* Use this for shell areas such as Operations, Monitoring, Knowledge, Settings, and Admin
|
|
3247
|
+
* when they are not semantic Organization Model systems.
|
|
3248
|
+
*/
|
|
3249
|
+
declare function SurfaceGuard({ surfaceKey, children, deniedMessage, useFeatureAccess }: SurfaceGuardProps): react_jsx_runtime.JSX.Element | null;
|
|
3173
3250
|
|
|
3174
3251
|
type ApiRequestFn = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
|
|
3175
3252
|
interface UseUserProfileOptions {
|
|
@@ -3207,5 +3284,5 @@ interface UseUserProfileReturn {
|
|
|
3207
3284
|
*/
|
|
3208
3285
|
declare const useUserProfile: (options?: UseUserProfileOptions) => UseUserProfileReturn;
|
|
3209
3286
|
|
|
3210
|
-
export { AdminGuard,
|
|
3211
|
-
export type { AdminGuardProps,
|
|
3287
|
+
export { AdminGuard, ProtectedRoute, SurfaceGuard, SystemGuard, useUserProfile };
|
|
3288
|
+
export type { AdminGuardProps, ProtectedRouteProps, SurfaceGuardProps, SystemGuardProps, UseUserProfileReturn };
|
|
@@ -9,7 +9,7 @@ import '../../chunk-DD3CCMCZ.js';
|
|
|
9
9
|
export { useUserProfile } from '../../chunk-2Q2JQSQO.js';
|
|
10
10
|
import '../../chunk-KJ3QUBNU.js';
|
|
11
11
|
import '../../chunk-BRJ3QZ4E.js';
|
|
12
|
-
import '../../chunk-
|
|
12
|
+
import '../../chunk-I2KLQ2HA.js';
|
|
13
13
|
import { useRef, useEffect, useState, useCallback } from 'react';
|
|
14
14
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
15
15
|
import { useNavigate } from '@tanstack/react-router';
|
|
@@ -88,7 +88,7 @@ function ProtectedRoute2({
|
|
|
88
88
|
function AdminGuard2({ children, redirectTo, fallback = /* @__PURE__ */ jsx(AppShellLoader, {}) }) {
|
|
89
89
|
return /* @__PURE__ */ jsx(AdminGuard, { redirectTo, fallback, children });
|
|
90
90
|
}
|
|
91
|
-
var
|
|
91
|
+
var SYSTEM_LABELS = {
|
|
92
92
|
crm: "CRM",
|
|
93
93
|
"lead-gen": "Lead Gen",
|
|
94
94
|
projects: "Projects",
|
|
@@ -98,19 +98,51 @@ var FEATURE_LABELS = {
|
|
|
98
98
|
settings: "Settings",
|
|
99
99
|
seo: "SEO"
|
|
100
100
|
};
|
|
101
|
-
function
|
|
102
|
-
return
|
|
101
|
+
function getSystemLabel(systemKey) {
|
|
102
|
+
return SYSTEM_LABELS[systemKey] ?? systemKey;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function getSurfaceLabel(surfaceKey) {
|
|
105
|
+
return SYSTEM_LABELS[surfaceKey] ?? surfaceKey;
|
|
106
|
+
}
|
|
107
|
+
function SystemGuard({ systemKey, children, deniedMessage, useFeatureAccess }) {
|
|
108
|
+
const { checkFeature, isReady } = useFeatureAccess();
|
|
109
|
+
const navigate = useNavigate();
|
|
110
|
+
const hasRedirected = useRef(false);
|
|
111
|
+
const resolvedSystemKey = systemKey;
|
|
112
|
+
const { allowed, restrictedBy } = checkFeature(resolvedSystemKey);
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
if (isReady && !allowed && !hasRedirected.current) {
|
|
115
|
+
hasRedirected.current = true;
|
|
116
|
+
const systemLabel = getSystemLabel(resolvedSystemKey);
|
|
117
|
+
const message = deniedMessage ?? (restrictedBy === "membership" ? `You do not have access to ${systemLabel}.` : `${systemLabel} is not available for your organization.`);
|
|
118
|
+
notifications.show({
|
|
119
|
+
title: "Access Restricted",
|
|
120
|
+
message,
|
|
121
|
+
autoClose: 5e3,
|
|
122
|
+
color: "red",
|
|
123
|
+
position: "top-right"
|
|
124
|
+
});
|
|
125
|
+
navigate({ to: "/" });
|
|
126
|
+
}
|
|
127
|
+
}, [isReady, allowed, restrictedBy, resolvedSystemKey, deniedMessage, navigate]);
|
|
128
|
+
if (!isReady) {
|
|
129
|
+
return /* @__PURE__ */ jsx(AppShellLoader, {});
|
|
130
|
+
}
|
|
131
|
+
if (!allowed) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
135
|
+
}
|
|
136
|
+
function SurfaceGuard({ surfaceKey, children, deniedMessage, useFeatureAccess }) {
|
|
105
137
|
const { checkFeature, isReady } = useFeatureAccess();
|
|
106
138
|
const navigate = useNavigate();
|
|
107
139
|
const hasRedirected = useRef(false);
|
|
108
|
-
const { allowed, restrictedBy } = checkFeature(
|
|
140
|
+
const { allowed, restrictedBy } = checkFeature(surfaceKey);
|
|
109
141
|
useEffect(() => {
|
|
110
142
|
if (isReady && !allowed && !hasRedirected.current) {
|
|
111
143
|
hasRedirected.current = true;
|
|
112
|
-
const
|
|
113
|
-
const message = deniedMessage ?? (restrictedBy === "membership" ? `You do not have access to ${
|
|
144
|
+
const surfaceLabel = getSurfaceLabel(surfaceKey);
|
|
145
|
+
const message = deniedMessage ?? (restrictedBy === "membership" ? `You do not have access to ${surfaceLabel}.` : `${surfaceLabel} is not available for your organization.`);
|
|
114
146
|
notifications.show({
|
|
115
147
|
title: "Access Restricted",
|
|
116
148
|
message,
|
|
@@ -120,7 +152,7 @@ function FeatureGuard({ featureKey, children, deniedMessage, useFeatureAccess })
|
|
|
120
152
|
});
|
|
121
153
|
navigate({ to: "/" });
|
|
122
154
|
}
|
|
123
|
-
}, [isReady, allowed, restrictedBy,
|
|
155
|
+
}, [isReady, allowed, restrictedBy, surfaceKey, deniedMessage, navigate]);
|
|
124
156
|
if (!isReady) {
|
|
125
157
|
return /* @__PURE__ */ jsx(AppShellLoader, {});
|
|
126
158
|
}
|
|
@@ -130,4 +162,4 @@ function FeatureGuard({ featureKey, children, deniedMessage, useFeatureAccess })
|
|
|
130
162
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
131
163
|
}
|
|
132
164
|
|
|
133
|
-
export { AdminGuard2 as AdminGuard,
|
|
165
|
+
export { AdminGuard2 as AdminGuard, ProtectedRoute2 as ProtectedRoute, SurfaceGuard, SystemGuard };
|
|
@@ -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
|
}
|
|
@@ -4,25 +4,27 @@ import '../../chunk-TUMSNGTX.js';
|
|
|
4
4
|
import { FilterBar } from '../../chunk-PDHTXPSF.js';
|
|
5
5
|
import { CustomModal } from '../../chunk-R66W5UDG.js';
|
|
6
6
|
import '../../chunk-7M2VOCYN.js';
|
|
7
|
-
import { useClientStatus, useCreateClient, useUpdateClient, useDeleteClient, usePaginationState, useClients, useClient } from '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import { showApiErrorNotification } from '../../chunk-
|
|
7
|
+
import { useClientStatus, useCreateClient, useUpdateClient, useDeleteClient, usePaginationState, useClients, useClient } from '../../chunk-2GMF5IRF.js';
|
|
8
|
+
import '../../chunk-VNAZTCHA.js';
|
|
9
|
+
import { showApiErrorNotification } from '../../chunk-XZGSCABI.js';
|
|
10
10
|
import '../../chunk-BRXELOHC.js';
|
|
11
11
|
import '../../chunk-3ZMAGTWF.js';
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
12
|
+
import '../../chunk-AHCKOU2M.js';
|
|
13
|
+
import '../../chunk-E7C4XEWH.js';
|
|
14
|
+
import '../../chunk-RQA2EVN3.js';
|
|
15
15
|
import '../../chunk-3FV6HBXS.js';
|
|
16
16
|
import '../../chunk-WLOQ4IBG.js';
|
|
17
|
-
import '../../chunk-
|
|
18
|
-
import '../../chunk-
|
|
19
|
-
import { StatCard, CardHeader, EmptyState, PageTitleCaption, CenteredErrorState } from '../../chunk-L3BVJWML.js';
|
|
17
|
+
import '../../chunk-FFPHJBJC.js';
|
|
18
|
+
import { StatCard, CardHeader, EmptyState, PageTitleCaption, CenteredErrorState } from '../../chunk-EPTHX4VZ.js';
|
|
20
19
|
import '../../chunk-3KMDHCAR.js';
|
|
21
|
-
import '../../chunk-
|
|
20
|
+
import '../../chunk-UW7IV2Y3.js';
|
|
22
21
|
import '../../chunk-SZHARWKU.js';
|
|
22
|
+
import '../../chunk-ZGTDKH3P.js';
|
|
23
23
|
import { SubshellContentContainer } from '../../chunk-TKAYX2SP.js';
|
|
24
24
|
import '../../chunk-NYBEU5TE.js';
|
|
25
|
-
import '../../chunk-
|
|
25
|
+
import '../../chunk-DWXDNT7P.js';
|
|
26
|
+
import '../../chunk-GNRMB6DC.js';
|
|
27
|
+
import '../../chunk-ND5TDV2J.js';
|
|
26
28
|
import '../../chunk-2IFYDILW.js';
|
|
27
29
|
import '../../chunk-Q7DJKLEN.js';
|
|
28
30
|
import '../../chunk-JA5ECJJB.js';
|
|
@@ -31,7 +33,7 @@ import '../../chunk-E565XMTQ.js';
|
|
|
31
33
|
import '../../chunk-JBWJ6WHZ.js';
|
|
32
34
|
import '../../chunk-DT3QYZVU.js';
|
|
33
35
|
import '../../chunk-RNP5R5I3.js';
|
|
34
|
-
import { UuidSchema, PAGE_SIZE_DEFAULT, formatTimeAgo } from '../../chunk-
|
|
36
|
+
import { UuidSchema, PAGE_SIZE_DEFAULT, formatTimeAgo } from '../../chunk-2RJMVWFJ.js';
|
|
35
37
|
import '../../chunk-KRWALB24.js';
|
|
36
38
|
import '../../chunk-VKIZUUPM.js';
|
|
37
39
|
import '../../chunk-533DUEQY.js';
|
|
@@ -39,7 +41,7 @@ import '../../chunk-DD3CCMCZ.js';
|
|
|
39
41
|
import '../../chunk-2Q2JQSQO.js';
|
|
40
42
|
import '../../chunk-KJ3QUBNU.js';
|
|
41
43
|
import '../../chunk-BRJ3QZ4E.js';
|
|
42
|
-
import '../../chunk-
|
|
44
|
+
import '../../chunk-I2KLQ2HA.js';
|
|
43
45
|
import { Badge, SimpleGrid, Paper, Stack, Table, Title, TextInput, Select, Group, Button, Text, Alert, Center, Loader, Pagination } from '@mantine/core';
|
|
44
46
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
45
47
|
import { IconUsers, IconCircleCheck, IconRocket, IconBriefcase, IconAlertTriangle, IconPlus, IconSearch, IconInbox, IconCash, IconUser, IconBuilding, IconArrowLeft, IconEdit, IconRefresh, IconTrash } from '@tabler/icons-react';
|
|
@@ -539,7 +541,7 @@ function ClientDetailPage({ clientId }) {
|
|
|
539
541
|
variant: "light",
|
|
540
542
|
size: "sm",
|
|
541
543
|
leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }),
|
|
542
|
-
onClick: () => navigate({ to: "/
|
|
544
|
+
onClick: () => navigate({ to: "/clients" }),
|
|
543
545
|
children: "Clients"
|
|
544
546
|
}
|
|
545
547
|
);
|
|
@@ -710,7 +712,7 @@ function ClientDetailPage({ clientId }) {
|
|
|
710
712
|
onClose: closeDelete,
|
|
711
713
|
clientId,
|
|
712
714
|
clientName: client.name,
|
|
713
|
-
onDeleted: () => navigate({ to: "/
|
|
715
|
+
onDeleted: () => navigate({ to: "/clients" })
|
|
714
716
|
}
|
|
715
717
|
)
|
|
716
718
|
] });
|
|
@@ -150,6 +150,14 @@
|
|
|
150
150
|
.mantine-Accordion-control:hover {
|
|
151
151
|
background-color: var(--color-surface-hover);
|
|
152
152
|
}
|
|
153
|
+
[data-mantine-color-scheme] .mantine-Accordion-root .mantine-Accordion-item {
|
|
154
|
+
--item-filled-color: var(--color-surface);
|
|
155
|
+
--item-border-color: var(--color-border);
|
|
156
|
+
}
|
|
157
|
+
[data-mantine-color-scheme] .mantine-Accordion-root[data-variant=separated] .mantine-Accordion-item[data-active] {
|
|
158
|
+
background-color: var(--color-surface);
|
|
159
|
+
border-color: var(--color-border);
|
|
160
|
+
}
|
|
153
161
|
.mantine-Menu-item:hover:not([data-disabled]) {
|
|
154
162
|
background-color: var(--color-surface-hover);
|
|
155
163
|
}
|
|
@@ -215,6 +223,36 @@
|
|
|
215
223
|
background-color: var(--color-primary);
|
|
216
224
|
border-color: var(--color-primary);
|
|
217
225
|
}
|
|
226
|
+
.mantine-Tree-node:focus-visible > [data-value] {
|
|
227
|
+
outline: 2px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
|
|
228
|
+
outline-offset: 2px;
|
|
229
|
+
}
|
|
230
|
+
.mantine-Tree-label[data-hovered] {
|
|
231
|
+
background-color: var(--color-surface-hover);
|
|
232
|
+
border-color: var(--color-border);
|
|
233
|
+
}
|
|
234
|
+
.mantine-Tree-label[data-selected] {
|
|
235
|
+
background-color: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
|
236
|
+
border-color: color-mix(in srgb, var(--color-primary) 38%, var(--color-border));
|
|
237
|
+
color: var(--color-primary);
|
|
238
|
+
}
|
|
239
|
+
[data-knowledge-article] pre {
|
|
240
|
+
white-space: pre-wrap;
|
|
241
|
+
word-break: break-word;
|
|
242
|
+
overflow-x: auto;
|
|
243
|
+
max-width: 100%;
|
|
244
|
+
padding: var(--mantine-spacing-sm);
|
|
245
|
+
background-color: var(--color-surface);
|
|
246
|
+
border: 1px solid var(--color-border);
|
|
247
|
+
border-radius: var(--mantine-radius-sm);
|
|
248
|
+
}
|
|
249
|
+
[data-knowledge-article] pre code {
|
|
250
|
+
background: transparent;
|
|
251
|
+
border: none;
|
|
252
|
+
padding: 0;
|
|
253
|
+
white-space: inherit;
|
|
254
|
+
word-break: inherit;
|
|
255
|
+
}
|
|
218
256
|
.recharts-surface:focus {
|
|
219
257
|
outline: none;
|
|
220
258
|
}
|
|
@@ -2815,6 +2815,66 @@ type Database = {
|
|
|
2815
2815
|
}
|
|
2816
2816
|
];
|
|
2817
2817
|
};
|
|
2818
|
+
user_notes: {
|
|
2819
|
+
Row: {
|
|
2820
|
+
content: string;
|
|
2821
|
+
created_at: string;
|
|
2822
|
+
created_by: string;
|
|
2823
|
+
id: string;
|
|
2824
|
+
metadata: Json;
|
|
2825
|
+
organization_id: string | null;
|
|
2826
|
+
pinned: boolean;
|
|
2827
|
+
priority: string;
|
|
2828
|
+
source: string | null;
|
|
2829
|
+
title: string | null;
|
|
2830
|
+
updated_at: string;
|
|
2831
|
+
user_id: string;
|
|
2832
|
+
};
|
|
2833
|
+
Insert: {
|
|
2834
|
+
content: string;
|
|
2835
|
+
created_at?: string;
|
|
2836
|
+
created_by?: string;
|
|
2837
|
+
id?: string;
|
|
2838
|
+
metadata?: Json;
|
|
2839
|
+
organization_id?: string | null;
|
|
2840
|
+
pinned?: boolean;
|
|
2841
|
+
priority?: string;
|
|
2842
|
+
source?: string | null;
|
|
2843
|
+
title?: string | null;
|
|
2844
|
+
updated_at?: string;
|
|
2845
|
+
user_id: string;
|
|
2846
|
+
};
|
|
2847
|
+
Update: {
|
|
2848
|
+
content?: string;
|
|
2849
|
+
created_at?: string;
|
|
2850
|
+
created_by?: string;
|
|
2851
|
+
id?: string;
|
|
2852
|
+
metadata?: Json;
|
|
2853
|
+
organization_id?: string | null;
|
|
2854
|
+
pinned?: boolean;
|
|
2855
|
+
priority?: string;
|
|
2856
|
+
source?: string | null;
|
|
2857
|
+
title?: string | null;
|
|
2858
|
+
updated_at?: string;
|
|
2859
|
+
user_id?: string;
|
|
2860
|
+
};
|
|
2861
|
+
Relationships: [
|
|
2862
|
+
{
|
|
2863
|
+
foreignKeyName: "user_notes_organization_id_fkey";
|
|
2864
|
+
columns: ["organization_id"];
|
|
2865
|
+
isOneToOne: false;
|
|
2866
|
+
referencedRelation: "organizations";
|
|
2867
|
+
referencedColumns: ["id"];
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
foreignKeyName: "user_notes_user_id_fkey";
|
|
2871
|
+
columns: ["user_id"];
|
|
2872
|
+
isOneToOne: false;
|
|
2873
|
+
referencedRelation: "users";
|
|
2874
|
+
referencedColumns: ["id"];
|
|
2875
|
+
}
|
|
2876
|
+
];
|
|
2877
|
+
};
|
|
2818
2878
|
users: {
|
|
2819
2879
|
Row: {
|
|
2820
2880
|
config: Json;
|
|
@@ -3429,35 +3489,37 @@ interface QuickCreateActionsProps {
|
|
|
3429
3489
|
}
|
|
3430
3490
|
declare function QuickCreateActions({ showSectionLabel }: QuickCreateActionsProps): react_jsx_runtime.JSX.Element;
|
|
3431
3491
|
|
|
3432
|
-
type
|
|
3433
|
-
type
|
|
3492
|
+
type SystemSidebarComponent = ComponentType;
|
|
3493
|
+
type SystemIconComponent = ComponentType<{
|
|
3434
3494
|
size?: number;
|
|
3435
3495
|
stroke?: number;
|
|
3436
3496
|
}>;
|
|
3437
|
-
type
|
|
3497
|
+
type SystemSidebarWidthResolver = number | ((context: {
|
|
3438
3498
|
currentPath: string;
|
|
3439
3499
|
}) => number);
|
|
3440
|
-
interface
|
|
3441
|
-
/** Unique stable identifier for this
|
|
3500
|
+
interface SystemModule {
|
|
3501
|
+
/** Unique stable identifier for this UI system module. */
|
|
3442
3502
|
key: string;
|
|
3443
|
-
/** Organization Model
|
|
3444
|
-
|
|
3445
|
-
/**
|
|
3503
|
+
/** Organization Model system id this module presents. Omit for navigation-only app surfaces. */
|
|
3504
|
+
systemId?: string;
|
|
3505
|
+
/** Route prefixes owned by navigation-only app surfaces. */
|
|
3506
|
+
routePrefixes?: string[];
|
|
3507
|
+
/** Capability identifiers contributed by this system module. */
|
|
3446
3508
|
capabilityIds?: string[];
|
|
3447
|
-
/** Icon used when this
|
|
3448
|
-
icon?:
|
|
3449
|
-
/** Sidebar component rendered when this
|
|
3450
|
-
sidebar?:
|
|
3509
|
+
/** Icon used when this system node appears in shell navigation. */
|
|
3510
|
+
icon?: SystemIconComponent;
|
|
3511
|
+
/** Sidebar component rendered when this system's subtree route is active. */
|
|
3512
|
+
sidebar?: SystemSidebarComponent;
|
|
3451
3513
|
/** Optional shell sidebar width override. Defaults to 250px. */
|
|
3452
|
-
sidebarWidth?:
|
|
3453
|
-
/** Operations-only bridge connecting this
|
|
3454
|
-
organizationGraph?:
|
|
3514
|
+
sidebarWidth?: SystemSidebarWidthResolver;
|
|
3515
|
+
/** Operations-only bridge connecting this system to the organization graph node. */
|
|
3516
|
+
organizationGraph?: OrganizationGraphSystemBridge;
|
|
3455
3517
|
}
|
|
3456
|
-
interface
|
|
3457
|
-
|
|
3518
|
+
interface OrganizationGraphSystemBridge {
|
|
3519
|
+
systemId?: string;
|
|
3458
3520
|
}
|
|
3459
3521
|
|
|
3460
|
-
declare const crmManifest:
|
|
3522
|
+
declare const crmManifest: SystemModule;
|
|
3461
3523
|
|
|
3462
3524
|
declare const DEAL_STAGE_COLORS: Record<string, string>;
|
|
3463
3525
|
declare const DEAL_STAGE_OPTIONS: {
|