@eintrek/erp-shell 0.1.61 → 0.1.63
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/README.md +32 -0
- package/dist/guide/dom.d.ts +37 -0
- package/dist/guide/events.d.ts +24 -0
- package/dist/guide/guide-host.d.ts +7 -0
- package/dist/guide/guide-store.d.ts +16 -0
- package/dist/guide/guide-styles.d.ts +7 -0
- package/dist/guide/guide-ui.d.ts +158 -0
- package/dist/guide/machine.d.ts +237 -0
- package/dist/guide/patterns.d.ts +28 -0
- package/dist/guide/progress-client.d.ts +11 -0
- package/dist/guide/progress.d.ts +74 -0
- package/dist/guide/types.d.ts +288 -0
- package/dist/help/help-button.d.ts +4 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.js +3103 -154
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3109 -149
- package/dist/index.js.map +1 -1
- package/dist/navigation/app-layout-shell.d.ts +8 -1
- package/dist/navigation/nav-user.d.ts +4 -1
- package/dist/navigation/platform-url.d.ts +23 -0
- package/dist/version.d.ts +1 -1
- package/package.json +4 -1
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type ShellChrome, type WorkspaceHeaderTone } from "./chrome";
|
|
3
3
|
import { type HelpAppId } from "../help/help-store";
|
|
4
4
|
import { type OrganizationsStatus } from "./url-org-gate";
|
|
5
|
+
import type { GuideConfig } from "../guide/types";
|
|
5
6
|
/**
|
|
6
7
|
* Shape the shell needs from an organization to wire the URL `[code]` segment
|
|
7
8
|
* back to the active org id. Hosts already keep richer types around — this is
|
|
@@ -86,6 +87,12 @@ export interface AppLayoutShellProps {
|
|
|
86
87
|
/** Which app the help dialog says a message came from; detected when
|
|
87
88
|
* omitted (the app's buildSystemLinks call, then the host name). */
|
|
88
89
|
helpApp?: HelpAppId;
|
|
90
|
+
/**
|
|
91
|
+
* The app's guided tour (ไกด์เริ่มต้น). The engine runs only once the URL's
|
|
92
|
+
* organisation is active and never over the not-member refusal; who sees
|
|
93
|
+
* it (forced, optional, none) comes from platform-api. Omit for no tour.
|
|
94
|
+
*/
|
|
95
|
+
guides?: GuideConfig;
|
|
89
96
|
}
|
|
90
97
|
/**
|
|
91
98
|
* Top-level app chrome: sticky header, sidebar slot, content gutter and the
|
|
@@ -99,4 +106,4 @@ export interface AppLayoutShellProps {
|
|
|
99
106
|
* an erp-shell bump — domain components must NOT add their own root padding
|
|
100
107
|
* or content gets indented twice.
|
|
101
108
|
*/
|
|
102
|
-
export declare function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permissionProvider, organizationId, setOrganizationId, organizations, organizationsStatus, notMemberComponent, signInUrl, selectOrganizationUrl, chrome, workspaceHeader, headerEnd, mobileBrand, showHelp, helpApp, }: AppLayoutShellProps): import("react/jsx-runtime").JSX.Element;
|
|
109
|
+
export declare function AppLayoutShell({ children, sidebar, loadingComponent, breadcrumb, permissionProvider, organizationId, setOrganizationId, organizations, organizationsStatus, notMemberComponent, signInUrl, selectOrganizationUrl, chrome, workspaceHeader, headerEnd, mobileBrand, showHelp, helpApp, guides, }: AppLayoutShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -30,7 +30,10 @@ export interface NavUserProps {
|
|
|
30
30
|
* when the image sits behind an authenticated endpoint.
|
|
31
31
|
*/
|
|
32
32
|
avatarSrc?: string | null;
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Where "ตั้งค่าบัญชี" goes — `accountSettingsHref(orgCode)`, Platform's
|
|
35
|
+
* page. An absolute URL is opened with a full page load. Hidden if omitted.
|
|
36
|
+
*/
|
|
34
37
|
profileHref?: string;
|
|
35
38
|
/** Where to navigate on "เลือกธุรกิจ". Default: "/select-organization". */
|
|
36
39
|
selectOrganizationHref?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where Platform lives, and the pages every app sends people to on it.
|
|
3
|
+
*
|
|
4
|
+
* Personal settings — profile, password, signature, LINE — exist once, on
|
|
5
|
+
* Platform. Every other app links there instead of keeping its own copy.
|
|
6
|
+
*
|
|
7
|
+
* Plain .ts (no JSX) so node --test can import it; app-registry.tsx reads the
|
|
8
|
+
* base from here too, so the app switcher and the account link never disagree.
|
|
9
|
+
*/
|
|
10
|
+
/** Read per call: Next inlines NEXT_PUBLIC_* at the consuming app's build. */
|
|
11
|
+
export declare function platformBaseUrl(): string;
|
|
12
|
+
export interface AccountSettingsHrefOptions {
|
|
13
|
+
/**
|
|
14
|
+
* The app asking. Platform keeps the link relative so it stays a
|
|
15
|
+
* client-side navigation; every other app gets Platform's absolute URL.
|
|
16
|
+
*/
|
|
17
|
+
activeApp?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* ตั้งค่าบัญชี for an organisation: `/{code}/account/settings` on Platform.
|
|
21
|
+
* Undefined without an organisation code — there is no page to open then.
|
|
22
|
+
*/
|
|
23
|
+
export declare function accountSettingsHref(orgCode: string | null | undefined, { activeApp }?: AccountSettingsHrefOptions): string | undefined;
|
package/dist/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eintrek/erp-shell",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.63",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Shared frontend platform for ERP apps — HTTP client, providers, navigation, hooks.",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"react",
|
|
25
25
|
"next"
|
|
26
26
|
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@floating-ui/dom": "^1.7.6"
|
|
29
|
+
},
|
|
27
30
|
"peerDependencies": {
|
|
28
31
|
"@tanstack/react-query": "^5.0.0",
|
|
29
32
|
"@tanstack/react-query-devtools": "^5.0.0",
|