@fayz-ai/plugin-reports 0.14.1 → 0.16.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/index.js +5 -46
- package/dist/index.js.map +1 -1
- package/dist/views/AnalyticsModule.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { expandBagColumns, formatValuePlain, reportColumnsToTanstack } from './c
|
|
|
6
6
|
import * as React10 from 'react';
|
|
7
7
|
import React10__default, { useState, useEffect } from 'react';
|
|
8
8
|
import { usePluginRuntime, getAnalyticsCards, useTranslation, exportCSV, registerTranslations, createSafeDataProvider, getSupabaseClientOptional, hashRouterAdapter } from '@fayz-ai/core';
|
|
9
|
-
import { useOrganizationStore,
|
|
9
|
+
import { useOrganizationStore, askAI, useAgentSurface, QuickActionsButton, AssistantInvite, RightRailPage } from '@fayz-ai/admin';
|
|
10
10
|
import { AnalyticsContextProvider, useModuleLayout, ModulePage, collectFilters, AnalyticsControls, AnalyticsGrid, Card, FilterChip, DataTable, Button, SubpageHeader, useToolbarPanelClose, useAnalyticsCard, useAnalyticsCardRows, ToolbarAction, PageHeaderActions, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, useAnalyticsContext, useAnalyticsAllRows, StatementTable, formatBucket, AnalyticsCard, Dropdown, DropdownTrigger, DropdownContent, DropdownItem, Badge, getLucideIcon, Input, Checkbox } from '@fayz-ai/ui';
|
|
11
11
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
12
12
|
import { BarChart3, User, Search, ArrowLeft, Printer, RotateCcw, ChevronUp, ChevronDown, EyeOff, Eye, Trash2, Construction, Download, GripVertical, SlidersHorizontal, Radio, ChevronLeft, ChevronRight } from 'lucide-react';
|
|
@@ -1776,52 +1776,10 @@ function useAnalyticsTree() {
|
|
|
1776
1776
|
function AnalyticsModule({ view, cardId, children }) {
|
|
1777
1777
|
const t = useTranslation();
|
|
1778
1778
|
const { labels } = useAnalyticsConfig();
|
|
1779
|
-
|
|
1779
|
+
useModuleLayout();
|
|
1780
1780
|
const tree = useAnalyticsTree();
|
|
1781
1781
|
const activeId = cardId ? decodeURIComponent(cardId) : void 0;
|
|
1782
|
-
const shellRail = useShellRailAvailable();
|
|
1783
|
-
const claimsRail = shellRail ?? variant !== "rail";
|
|
1784
|
-
const entries = React10__default.useMemo(() => [
|
|
1785
|
-
...tree.fixed.map((f) => ({
|
|
1786
|
-
id: `analytics:${f.id}`,
|
|
1787
|
-
label: f.label,
|
|
1788
|
-
icon: f.icon,
|
|
1789
|
-
route: f.route,
|
|
1790
|
-
section: "main"
|
|
1791
|
-
})),
|
|
1792
|
-
...tree.groups.flatMap(([category, list]) => list.map((card) => ({
|
|
1793
|
-
id: `analytics:${card.id}`,
|
|
1794
|
-
label: card.name,
|
|
1795
|
-
icon: card.icon ?? "FileText",
|
|
1796
|
-
route: reportRoute(card.id),
|
|
1797
|
-
section: "main",
|
|
1798
|
-
// Consecutive items sharing a group render under one heading — the same
|
|
1799
|
-
// mechanism that heads the settings rail's plugin runs.
|
|
1800
|
-
group: category
|
|
1801
|
-
}))),
|
|
1802
|
-
...tree.live ? [{
|
|
1803
|
-
id: "analytics:live",
|
|
1804
|
-
label: tree.live.label,
|
|
1805
|
-
icon: tree.live.icon,
|
|
1806
|
-
route: tree.live.route,
|
|
1807
|
-
section: "main"
|
|
1808
|
-
}] : [],
|
|
1809
|
-
{
|
|
1810
|
-
id: "analytics:settings",
|
|
1811
|
-
label: tree.settings.label,
|
|
1812
|
-
icon: tree.settings.icon,
|
|
1813
|
-
route: tree.settings.route,
|
|
1814
|
-
section: "main"
|
|
1815
|
-
}
|
|
1816
|
-
], [tree]);
|
|
1817
|
-
useContextualNav(claimsRail ? {
|
|
1818
|
-
base: ANALYTICS_BASE,
|
|
1819
|
-
entries,
|
|
1820
|
-
label: tree.title,
|
|
1821
|
-
searchPlaceholder: labels.searchReports ?? t("reports.search")
|
|
1822
|
-
} : null);
|
|
1823
1782
|
const nav = React10__default.useMemo(() => {
|
|
1824
|
-
if (claimsRail) return [];
|
|
1825
1783
|
return [
|
|
1826
1784
|
...tree.fixed.map((f) => ({
|
|
1827
1785
|
id: f.id,
|
|
@@ -1855,13 +1813,14 @@ function AnalyticsModule({ view, cardId, children }) {
|
|
|
1855
1813
|
onClick: () => navigateAnalytics(tree.settings.route)
|
|
1856
1814
|
}
|
|
1857
1815
|
];
|
|
1858
|
-
}, [tree, view, activeId
|
|
1816
|
+
}, [tree, view, activeId]);
|
|
1859
1817
|
return /* @__PURE__ */ jsxs(
|
|
1860
1818
|
ModulePage,
|
|
1861
1819
|
{
|
|
1862
1820
|
title: tree.title,
|
|
1863
1821
|
nav,
|
|
1864
|
-
navVariant:
|
|
1822
|
+
navVariant: "rail",
|
|
1823
|
+
navFilterPlaceholder: labels.searchReports ?? t("reports.search"),
|
|
1865
1824
|
showHeader: false,
|
|
1866
1825
|
viewKey: view === "report" ? `report:${activeId}` : view,
|
|
1867
1826
|
children: [
|