@eintrek/erp-shell 0.1.58 → 0.1.59

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.
@@ -4,7 +4,7 @@
4
4
  * live in different subtrees. A tiny external store rather than a context so
5
5
  * NavUser works the same whether or not it sits under the layout.
6
6
  */
7
- export type HelpAppId = "platform" | "accounx" | "invenx" | "plannex" | "peoplx";
7
+ export type HelpAppId = "platform" | "accounx" | "invenx" | "plannex" | "peoplx" | "sellx" | "carex";
8
8
  /** Opens the dialog — a no-op when no layout has mounted one. */
9
9
  export declare function openHelp(): void;
10
10
  export declare function closeHelp(): void;
package/dist/index.esm.js CHANGED
@@ -5,7 +5,7 @@ import { useSession, signOut } from 'next-auth/react';
5
5
  import { useQueryClient, useQuery, QueryClientContext, QueryClient, MutationCache, QueryCache, QueryClientProvider } from '@tanstack/react-query';
6
6
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
7
7
  import { cn, Button, Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbSeparator, BreadcrumbPage, Avatar, AvatarImage, AvatarFallback, Collapsible, CollapsibleTrigger, CollapsibleContent, Badge, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator, Skeleton, Dialog, DialogContent, DialogHeader, DialogTitle, Label, Textarea, DialogFooter, Card, CardHeader, CardContent } from '@eintrek/erp-theme';
8
- import { PanelLeftClose, Menu, ChevronRight, Building2, Palette, ChevronUp, Sun, Moon, Monitor, Globe, User, LayoutGrid, ExternalLink, CircleHelp, Loader2, LogOut, Calculator, Warehouse, FolderKanban, Users, ChevronDown, Plus, ChevronsUpDown, ImagePlus, X, CircleCheck, ArrowLeft, ArrowRight, Compass, ArrowUpRight, Ban, Home, Headset, ContactRound, UserPlus } from 'lucide-react';
8
+ import { PanelLeftClose, Menu, ChevronRight, Building2, Palette, ChevronUp, Sun, Moon, Monitor, Globe, User, LayoutGrid, ExternalLink, CircleHelp, Loader2, LogOut, Calculator, Warehouse, FolderKanban, Users, Store, Headset, ChevronDown, Plus, ChevronsUpDown, ImagePlus, X, CircleCheck, ArrowLeft, ArrowRight, Compass, ArrowUpRight, Ban, Home, ContactRound, UserPlus } from 'lucide-react';
9
9
  import { create } from 'zustand';
10
10
  import { persist, createJSONStorage } from 'zustand/middleware';
11
11
  import { useRouter, usePathname, useParams } from 'next/navigation';
@@ -1416,7 +1416,7 @@ function platformApiBase(app) {
1416
1416
  * This package's version, attached to help messages so the back office can
1417
1417
  * tell which shell a report came from. Keep in step with package.json.
1418
1418
  */
1419
- const SHELL_VERSION = "0.1.58";
1419
+ const SHELL_VERSION = "0.1.59";
1420
1420
 
1421
1421
  const HELP_APP_LABEL = {
1422
1422
  platform: "แพลตฟอร์ม",
@@ -1424,6 +1424,8 @@ const HELP_APP_LABEL = {
1424
1424
  peoplx: "Peoplx",
1425
1425
  plannex: "Plannex",
1426
1426
  invenx: "Invenx",
1427
+ sellx: "Sellx",
1428
+ carex: "Carex",
1427
1429
  other: "อื่น ๆ",
1428
1430
  };
1429
1431
  function originOf(value) {
@@ -1458,6 +1460,10 @@ function detectHelpApp(explicit) {
1458
1460
  return "plannex";
1459
1461
  if (host.startsWith("invenx."))
1460
1462
  return "invenx";
1463
+ if (host.startsWith("sellx."))
1464
+ return "sellx";
1465
+ if (host.startsWith("carex."))
1466
+ return "carex";
1461
1467
  if (host.startsWith("platform.") || host === "antniti.com" || host === "www.antniti.com") {
1462
1468
  return "platform";
1463
1469
  }
@@ -1468,6 +1474,8 @@ function detectHelpApp(explicit) {
1468
1474
  ["invenx", process.env.NEXT_PUBLIC_INVENX_URL],
1469
1475
  ["plannex", process.env.NEXT_PUBLIC_PLANNEX_URL],
1470
1476
  ["peoplx", process.env.NEXT_PUBLIC_HR_URL],
1477
+ ["sellx", process.env.NEXT_PUBLIC_SELLX_URL],
1478
+ ["carex", process.env.NEXT_PUBLIC_CAREX_URL],
1471
1479
  ];
1472
1480
  for (const [id, url] of configured) {
1473
1481
  if (originOf(url) === here)
@@ -1855,6 +1863,10 @@ const PLAN_FEATURES = {
1855
1863
  MODULE_INVENTORY: "module.inventory",
1856
1864
  MODULE_PROJECT: "module.project",
1857
1865
  MODULE_SECRETARIAT: "module.secretariat",
1866
+ /** Sellx add-on: POS, members and chat commerce. */
1867
+ MODULE_SELLX: "module.sellx",
1868
+ /** Carex add-on: help desk, SLA and knowledge base. */
1869
+ MODULE_CAREX: "module.carex",
1858
1870
  /** AI pack (paid or trial): AI calls on AntNiti's key while credits remain. */
1859
1871
  AI: "ai",
1860
1872
  };
@@ -1939,6 +1951,20 @@ const APPS = [
1939
1951
  features: [PLAN_FEATURES.MODULE_HR],
1940
1952
  baseUrl: () => normaliseBase(process.env.NEXT_PUBLIC_HR_URL, "https://peoplx.antniti.com"),
1941
1953
  },
1954
+ {
1955
+ id: "sellx",
1956
+ label: "Sellx",
1957
+ icon: jsx(Store, { className: "h-4 w-4 shrink-0" }),
1958
+ features: [PLAN_FEATURES.MODULE_SELLX],
1959
+ baseUrl: () => normaliseBase(process.env.NEXT_PUBLIC_SELLX_URL, "https://sellx.antniti.com"),
1960
+ },
1961
+ {
1962
+ id: "carex",
1963
+ label: "Carex",
1964
+ icon: jsx(Headset, { className: "h-4 w-4 shrink-0" }),
1965
+ features: [PLAN_FEATURES.MODULE_CAREX],
1966
+ baseUrl: () => normaliseBase(process.env.NEXT_PUBLIC_CAREX_URL, "https://carex.antniti.com"),
1967
+ },
1942
1968
  ];
1943
1969
  /**
1944
1970
  * Builds the cross-app link list for <NavUser systemLinks>.