@eintrek/erp-shell 0.1.50 → 0.1.52

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.
@@ -19,7 +19,13 @@ export declare const PLAN_FEATURES: {
19
19
  readonly MODULE_INVENTORY: "module.inventory";
20
20
  readonly MODULE_PROJECT: "module.project";
21
21
  readonly MODULE_SECRETARIAT: "module.secretariat";
22
+ /** AI pack (paid or trial): AI calls on AntNiti's key while credits remain. */
23
+ readonly AI: "ai";
22
24
  };
23
25
  export type PlanFeatureKey = (typeof PLAN_FEATURES)[keyof typeof PLAN_FEATURES];
24
- /** True when plan features include key (with legacy basic_accounting_hr alias). */
26
+ /**
27
+ * True when plan features include key. Aliases, mirroring the backend:
28
+ * legacy basic_accounting_hr → module.hr + module.accounting (+ its sub-keys);
29
+ * module.accounting → module.sales, module.purchasing, module.secretariat.
30
+ */
25
31
  export declare function hasPlanFeature(features: string[] | null | undefined, feature: string): boolean;
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { type ShellChrome, type WorkspaceHeaderTone } from "./chrome";
3
+ import { type HelpAppId } from "../help/help-store";
3
4
  /**
4
5
  * Shape the shell needs from an organization to wire the URL `[code]` segment
5
6
  * back to the active org id. Hosts already keep richer types around — this is
@@ -61,6 +62,15 @@ export interface AppLayoutShellProps {
61
62
  * chrome, ≤1024px), so the app is still named with the sidebar closed.
62
63
  */
63
64
  mobileBrand?: React.ReactNode;
65
+ /**
66
+ * The ช่วยเหลือ button in the top bar and its dialog, which sends a help
67
+ * request, a problem report or a suggestion to the back office (through
68
+ * platform-api). On unless false.
69
+ */
70
+ showHelp?: boolean;
71
+ /** Which app the help dialog says a message came from; detected when
72
+ * omitted (the app's buildSystemLinks call, then the host name). */
73
+ helpApp?: HelpAppId;
64
74
  }
65
75
  /**
66
76
  * Top-level app chrome: sticky header, sidebar slot, content gutter and the
@@ -74,4 +84,4 @@ export interface AppLayoutShellProps {
74
84
  * an erp-shell bump — domain components must NOT add their own root padding
75
85
  * or content gets indented twice.
76
86
  */
77
- export declare function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permissionProvider, organizationId, setOrganizationId, organizations, signInUrl, selectOrganizationUrl, chrome, workspaceHeader, headerEnd, mobileBrand, }: AppLayoutShellProps): import("react/jsx-runtime").JSX.Element;
87
+ export declare function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permissionProvider, organizationId, setOrganizationId, organizations, signInUrl, selectOrganizationUrl, chrome, workspaceHeader, headerEnd, mobileBrand, showHelp, helpApp, }: AppLayoutShellProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This package's version, attached to help messages so the back office can
3
+ * tell which shell a report came from. Keep in step with package.json.
4
+ */
5
+ export declare const SHELL_VERSION = "0.1.52";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eintrek/erp-shell",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Shared frontend platform for ERP apps — HTTP client, providers, navigation, hooks.",