@elevasis/ui 2.30.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/api/index.js +2 -2
- package/dist/app/index.css +38 -0
- package/dist/app/index.d.ts +190 -9
- package/dist/app/index.js +7 -6
- package/dist/charts/index.js +4 -5
- package/dist/{chunk-HXZQWMKE.js → chunk-2RJMVWFJ.js} +1 -6
- package/dist/{chunk-4VQ2PXMI.js → chunk-3FV6HBXS.js} +4 -4
- package/dist/{chunk-CW3UNAF2.js → chunk-4DYOXEH6.js} +410 -5
- package/dist/{chunk-JKTPRYGV.js → chunk-4MFNGNHF.js} +123 -192
- package/dist/{chunk-HYLERWRO.js → chunk-4QK76KIF.js} +7 -7
- package/dist/chunk-5FJJ72HU.js +13 -0
- package/dist/chunk-5J4PDX26.js +112 -0
- package/dist/{chunk-4SY6BTVZ.js → chunk-6DWD423K.js} +12 -9
- package/dist/{chunk-3GV5NHSS.js → chunk-7KZINJLP.js} +78 -232
- package/dist/{chunk-6WXDE5LZ.js → chunk-EPTHX4VZ.js} +1 -1
- package/dist/{chunk-6EFVZV6X.js → chunk-GCOQ3TBG.js} +243 -254
- package/dist/{chunk-LRZFLK2F.js → chunk-IQHU7O5Y.js} +4 -4
- package/dist/{chunk-X2SUMO3P.js → chunk-IZWTVFJ2.js} +16 -3
- package/dist/{chunk-IKQ42WHU.js → chunk-JFL3GRD4.js} +1 -1
- package/dist/{chunk-4FZYEEPK.js → chunk-LLRXA7D7.js} +5 -6
- package/dist/chunk-MOY4VOHF.js +347 -0
- package/dist/{chunk-XQQEKWTL.js → chunk-N55DVMAG.js} +6 -2
- package/dist/{chunk-7E3FUTND.js → chunk-ND5TDV2J.js} +1 -1
- package/dist/{chunk-WF227UBV.js → chunk-QQHOKTJA.js} +4 -4
- package/dist/{chunk-A7B7HLDF.js → chunk-QTI3KC7D.js} +5884 -515
- package/dist/chunk-QXCDKE2O.js +486 -0
- package/dist/chunk-R2XR4FCV.js +48 -0
- package/dist/chunk-R66W5UDG.js +26 -0
- package/dist/{chunk-T5Z7G2J2.js → chunk-RQA2EVN3.js} +6 -16
- package/dist/{chunk-SKXXT3E2.js → chunk-RQTWIXJ5.js} +4 -4
- package/dist/chunk-T35FWDAB.js +4342 -0
- package/dist/{chunk-DWK2QIAK.js → chunk-TYRUKGGD.js} +1 -1
- package/dist/{chunk-CN2HC4D4.js → chunk-UFTM5SZZ.js} +2 -2
- package/dist/{chunk-JCGD4GM6.js → chunk-UROTM5OR.js} +14 -1
- package/dist/{chunk-6YT4IKJ7.js → chunk-VNAZTCHA.js} +15 -0
- package/dist/{chunk-KVJ3LFH2.js → chunk-VNFR57DF.js} +4 -24
- package/dist/{chunk-SBCIB5TZ.js → chunk-VRNMNB3O.js} +6 -7
- package/dist/chunk-WQPX44YM.js +1626 -0
- package/dist/{chunk-T2PAD63Y.js → chunk-XZGSCABI.js} +1 -1
- package/dist/chunk-YLQEVSOR.js +299 -0
- package/dist/{chunk-P5WYW2GI.js → chunk-ZQOKIGZP.js} +152 -306
- package/dist/components/index.css +38 -0
- package/dist/components/index.d.ts +334 -38
- package/dist/components/index.js +42 -42
- package/dist/components/navigation/index.css +38 -0
- package/dist/components/navigation/index.js +3 -2
- package/dist/execution/index.d.ts +9 -3
- package/dist/features/auth/index.css +38 -0
- package/dist/features/auth/index.d.ts +212 -14
- package/dist/features/auth/index.js +41 -9
- package/dist/features/clients/index.css +649 -0
- package/dist/features/clients/index.d.ts +86 -0
- package/dist/features/clients/index.js +720 -0
- package/dist/features/crm/index.css +38 -0
- package/dist/features/crm/index.d.ts +228 -20
- package/dist/features/crm/index.js +20 -17
- package/dist/features/dashboard/index.css +38 -0
- package/dist/features/dashboard/index.d.ts +78 -3
- package/dist/features/dashboard/index.js +16 -16
- package/dist/features/delivery/index.css +38 -0
- package/dist/features/delivery/index.d.ts +201 -18
- package/dist/features/delivery/index.js +20 -18
- package/dist/features/knowledge/index.css +38 -0
- package/dist/features/knowledge/index.d.ts +20 -18
- package/dist/features/knowledge/index.js +116 -578
- package/dist/features/lead-gen/index.css +38 -0
- package/dist/features/lead-gen/index.d.ts +59 -51
- package/dist/features/lead-gen/index.js +20 -18
- package/dist/features/monitoring/index.css +38 -0
- package/dist/features/monitoring/index.d.ts +20 -18
- package/dist/features/monitoring/index.js +19 -18
- 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 +17 -15
- package/dist/features/operations/index.css +38 -0
- package/dist/features/operations/index.d.ts +945 -45
- package/dist/features/operations/index.js +24 -26
- package/dist/features/seo/index.d.ts +20 -18
- package/dist/features/seo/index.js +1 -1
- package/dist/features/settings/index.css +38 -0
- package/dist/features/settings/index.d.ts +201 -18
- package/dist/features/settings/index.js +18 -16
- package/dist/hooks/delivery/index.css +38 -0
- package/dist/hooks/delivery/index.d.ts +200 -0
- package/dist/hooks/delivery/index.js +2 -2
- package/dist/hooks/index.css +38 -0
- package/dist/hooks/index.d.ts +825 -47
- package/dist/hooks/index.js +14 -13
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +194 -3
- package/dist/hooks/published.css +38 -0
- package/dist/hooks/published.d.ts +825 -47
- package/dist/hooks/published.js +14 -13
- package/dist/index.css +38 -0
- package/dist/index.d.ts +1506 -1212
- package/dist/index.js +15 -14
- package/dist/initialization/index.d.ts +181 -0
- package/dist/knowledge/index.d.ts +813 -1068
- package/dist/knowledge/index.js +7370 -2869
- package/dist/{chunk-CLUP5H3C.js → knowledge-search-index-5KYPO746.js} +441 -963
- package/dist/layout/index.d.ts +6 -0
- package/dist/layout/index.js +4 -5
- package/dist/organization/index.css +38 -0
- package/dist/profile/index.d.ts +181 -0
- package/dist/provider/index.css +38 -0
- package/dist/provider/index.d.ts +909 -1156
- package/dist/provider/index.js +11 -10
- package/dist/provider/published.css +38 -0
- package/dist/provider/published.d.ts +906 -1153
- package/dist/provider/published.js +7 -6
- package/dist/supabase/index.d.ts +349 -0
- package/dist/test-utils/index.d.ts +16 -9
- package/dist/test-utils/index.js +39 -32
- 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/types/index.d.ts +378 -5
- package/dist/utils/index.d.ts +78 -3
- package/dist/utils/index.js +1 -1
- package/dist/vite/index.js +2 -2
- package/dist/vite-plugin-knowledge/index.js +1 -1
- package/package.json +47 -37
- package/src/provider/README.md +5 -5
- package/dist/chunk-2DIYILF7.js +0 -413
- package/dist/chunk-3MDNBHVB.js +0 -3868
- package/dist/chunk-6IXOKUBC.js +0 -347
- package/dist/chunk-AKOD52HS.js +0 -739
- package/dist/chunk-ECNNI3NT.js +0 -6
- package/dist/chunk-JDNEWB5F.js +0 -10
- package/dist/chunk-NITGGYH2.js +0 -476
- package/dist/chunk-OAVTMITG.js +0 -13
|
@@ -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 };
|