@eintrek/erp-shell 0.1.75 → 0.1.77
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 +52 -0
- package/dist/chunks/{format-CVazK0hP.cjs → format-DQLPHq7h.cjs} +728 -63
- package/dist/chunks/format-DQLPHq7h.cjs.map +1 -0
- package/dist/chunks/{format-DCTuLpBU.esm.js → format-ILrTMV4G.esm.js} +727 -64
- package/dist/chunks/format-ILrTMV4G.esm.js.map +1 -0
- package/dist/guide/core.d.ts +2 -2
- package/dist/guide/guide-store.d.ts +18 -3
- package/dist/guide/guide-ui.d.ts +22 -2
- package/dist/guide/machine.d.ts +85 -7
- package/dist/guide/pages.d.ts +29 -1
- package/dist/guide/progress-sync.d.ts +1 -1
- package/dist/guide/progress.d.ts +5 -3
- package/dist/guide/types.d.ts +59 -0
- package/dist/guide-core.cjs +3 -1
- package/dist/guide-core.cjs.map +1 -1
- package/dist/guide-core.esm.js +1 -1
- package/dist/help/help-button.d.ts +4 -2
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +12 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/format-CVazK0hP.cjs.map +0 -1
- package/dist/chunks/format-DCTuLpBU.esm.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ export { HelpDialogHost, type HelpDialogHostProps } from "./help/help-dialog";
|
|
|
33
33
|
export { openHelp, closeHelp, type HelpAppId } from "./help/help-store";
|
|
34
34
|
export { describeBrowser, describeAttached, detectHelpApp, type HelpContext, } from "./help/help-context";
|
|
35
35
|
export { SHELL_VERSION } from "./version";
|
|
36
|
-
export type { GuideAbortAction, GuideAnchorKey, GuideApiFailure, GuideApiMatch, GuideAppId, GuideCaptureEvent, GuideConfig, GuideContext, GuideFacts, GuideGate, GuideMission, GuideNothingToSave, GuideOnMissing, GuidePage, GuideSection, GuideStep, GuideStepKind, GuideSuite, GuideText, GuideTrigger, } from "./guide/types";
|
|
36
|
+
export type { GuideAbortAction, GuideAnchorKey, GuideApiFailure, GuideApiMatch, GuideAppId, GuideCaptureEvent, GuideConfig, GuideContext, GuideFacts, GuideFlow, GuideGate, GuideMission, GuideNothingToSave, GuideOnMissing, GuidePage, GuideSection, GuideStep, GuideStepKind, GuideSuite, GuideText, GuideTrigger, } from "./guide/types";
|
|
37
37
|
export { API_EVENT as GUIDE_API_EVENT, GUIDE_EVENT_PREFIX, GUIDE_LAYER_ATTRIBUTE, emitGuideEvent, guideAnchor, reportApiCall, reportApiEvent, type ApiCallReport, type ApiEventDetail, type GuideAnchorProps, } from "./guide/events";
|
|
38
|
-
export { guideMenuItems, guideMenuShown, openGuidePanel, openPageGuide, openPagesPanel, openSectionGuide, setSectionGuideValues, useGuideEntry, usePageGuideEntry, usePageGuides, useSectionGuideValues, type GuideEntry, type GuideMenuItem, type PageGuidesEntry, } from "./guide/guide-store";
|
|
38
|
+
export { guideMenuItems, guideMenuShown, openGuidePanel, openPageGuide, openPagesPanel, openSectionGuide, openFlow, openFlowsPanel, setSectionGuideValues, useGuideEntry, usePageGuideEntry, usePageGuides, useSectionGuideValues, type GuideEntry, type GuideMenuItem, type PageGuidesEntry, } from "./guide/guide-store";
|
|
39
39
|
export { SectionGuideButton, type SectionGuideButtonProps } from "./guide/section-button";
|
|
40
40
|
export { THAI_MONTHS_SHORT, formatBaht, thaiMonth, thaiMonthYear } from "./guide/format";
|
|
41
41
|
export { GuideHost, type GuideHostProps } from "./guide/guide-host";
|
package/dist/index.esm.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useSession, signOut } from 'next-auth/react';
|
|
|
5
5
|
import { useQueryClient, useQuery, QueryClientContext, QueryClient, hashKey, 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, Tooltip, TooltipTrigger, TooltipContent, 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, UserCog, LayoutGrid, ExternalLink, CircleHelp, Loader2, LogOut, Calculator, Warehouse, FolderKanban, Users, Store, Headset, ChevronDown, Plus, ChevronsUpDown, BookOpen, Info, Flag, Library, MessageCircle, ImagePlus, X, CircleCheck, ArrowLeft, Ban, Home, ContactRound, UserPlus, ArrowRight, Compass, ArrowUpRight } from 'lucide-react';
|
|
8
|
+
import { PanelLeftClose, Menu, ChevronRight, Building2, Palette, ChevronUp, Sun, Moon, Monitor, Globe, UserCog, LayoutGrid, ExternalLink, CircleHelp, Loader2, LogOut, Calculator, Warehouse, FolderKanban, Users, Store, Headset, ChevronDown, Plus, ChevronsUpDown, BookOpen, Info, Route, Flag, Library, MessageCircle, ImagePlus, X, CircleCheck, ArrowLeft, Ban, Home, ContactRound, UserPlus, ArrowRight, Compass, ArrowUpRight } from 'lucide-react';
|
|
9
9
|
import { create } from 'zustand';
|
|
10
10
|
import { persist, createJSONStorage } from 'zustand/middleware';
|
|
11
11
|
import { useRouter, usePathname, useParams, useSearchParams } from 'next/navigation';
|
|
@@ -14,8 +14,8 @@ import { createPortal } from 'react-dom';
|
|
|
14
14
|
import { useTheme, ThemeProvider as ThemeProvider$1 } from 'next-themes';
|
|
15
15
|
import axios, { isAxiosError, AxiosHeaders } from 'axios';
|
|
16
16
|
export { isAxiosError } from 'axios';
|
|
17
|
-
import {
|
|
18
|
-
export { A as GUIDE_API_EVENT, G as GUIDE_EVENT_PREFIX, a as GUIDE_LAYER_ATTRIBUTE, c as GuideProgressConflict, S as SectionGuideButton, T as THAI_MONTHS_SHORT, f as emitGuideEvent, h as formatBaht, k as guideMenuShown,
|
|
17
|
+
import { v as reportApiEvent, i as guideAnchor, B as useGuideEntry, D as usePageGuides, j as guideMenuItems, r as openPageGuide, t as openSectionGuide, o as openFlow, q as openGuidePanel, s as openPagesPanel, p as openFlowsPanel, b as GuideErrorBoundary, d as GuideRuntime } from './chunks/format-ILrTMV4G.esm.js';
|
|
18
|
+
export { A as GUIDE_API_EVENT, G as GUIDE_EVENT_PREFIX, a as GUIDE_LAYER_ATTRIBUTE, c as GuideProgressConflict, S as SectionGuideButton, T as THAI_MONTHS_SHORT, f as emitGuideEvent, h as formatBaht, k as guideMenuShown, u as reportApiCall, w as setSectionGuideValues, y as thaiMonth, z as thaiMonthYear, C as usePageGuideEntry, E as useSectionGuideValues } from './chunks/format-ILrTMV4G.esm.js';
|
|
19
19
|
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
|
|
20
20
|
import '@floating-ui/dom';
|
|
21
21
|
|
|
@@ -1722,7 +1722,7 @@ function platformApiBase(app) {
|
|
|
1722
1722
|
* This package's version, attached to help messages so the back office can
|
|
1723
1723
|
* tell which shell a report came from. Keep in step with package.json.
|
|
1724
1724
|
*/
|
|
1725
|
-
const SHELL_VERSION = "0.1.
|
|
1725
|
+
const SHELL_VERSION = "0.1.77";
|
|
1726
1726
|
|
|
1727
1727
|
const HELP_APP_LABEL = {
|
|
1728
1728
|
platform: "แพลตฟอร์ม",
|
|
@@ -2556,8 +2556,10 @@ const BUTTON_CLASS = "grid size-[34px] shrink-0 place-items-center rounded-lg te
|
|
|
2556
2556
|
*
|
|
2557
2557
|
* When this user has something to open here, it opens a small menu:
|
|
2558
2558
|
* "คู่มือหน้านี้" (this page's guide), "อธิบายส่วนนี้ · <title>" for each
|
|
2559
|
-
* section guide on screen, "
|
|
2560
|
-
*
|
|
2559
|
+
* section guide on screen, "พาทำ · <title>" for each flow starting here,
|
|
2560
|
+
* "ไกด์เริ่มต้น n/N" (the quest
|
|
2561
|
+
* panel), "คู่มือทุกหน้า" (the panel's page guides), "พาทำงาน" (the panel's
|
|
2562
|
+
* flows) and "ติดต่อทีมช่วยเหลือ"
|
|
2561
2563
|
* (the help dialog), each only when it has something. Otherwise one press
|
|
2562
2564
|
* opens the help dialog, as before.
|
|
2563
2565
|
*/
|
|
@@ -2583,7 +2585,9 @@ function HelpButton({ className }) {
|
|
|
2583
2585
|
}
|
|
2584
2586
|
}, children: [items.includes("page") ? (jsxs(DropdownMenuItem, { onSelect: toTour(openPageGuide), className: "gap-2.5", children: [jsx(BookOpen, { className: "size-4" }), jsx("span", { className: "flex-1", children: "\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49" })] })) : null, items.includes("sections")
|
|
2585
2587
|
? (pages.sections ?? []).map(sec => (jsxs(DropdownMenuItem, { onSelect: toTour(() => openSectionGuide(sec.key)), className: "gap-2.5", children: [jsx(Info, { className: "size-4" }), jsxs("span", { className: "flex-1", children: ["\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E2A\u0E48\u0E27\u0E19\u0E19\u0E35\u0E49 \u00B7 ", sec.title] })] }, sec.key)))
|
|
2586
|
-
: null, items.includes("
|
|
2588
|
+
: null, items.includes("flowsHere")
|
|
2589
|
+
? (pages.flows ?? []).map(f => (jsxs(DropdownMenuItem, { onSelect: toTour(() => openFlow(f.key)), className: "gap-2.5", children: [jsx(Route, { className: "size-4" }), jsxs("span", { className: "flex-1", children: ["\u0E1E\u0E32\u0E17\u0E33 \u00B7 ", f.title] })] }, f.key)))
|
|
2590
|
+
: null, items.includes("missions") && guide ? (jsxs(DropdownMenuItem, { onSelect: toTour(openGuidePanel), className: "gap-2.5", children: [jsx(Flag, { className: "size-4" }), jsx("span", { className: "flex-1", children: "\u0E44\u0E01\u0E14\u0E4C\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19" }), jsxs("span", { className: "text-xs font-semibold text-primary tabular-nums", children: [guide.done, "/", guide.total] })] })) : null, items.includes("pages") ? (jsxs(DropdownMenuItem, { onSelect: toTour(openPagesPanel), className: "gap-2.5", children: [jsx(Library, { className: "size-4" }), jsx("span", { className: "flex-1", children: "\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D\u0E17\u0E38\u0E01\u0E2B\u0E19\u0E49\u0E32" })] })) : null, items.includes("flows") ? (jsxs(DropdownMenuItem, { onSelect: toTour(openFlowsPanel), className: "gap-2.5", children: [jsx(Route, { className: "size-4" }), jsx("span", { className: "flex-1", children: "\u0E1E\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19" })] })) : null, jsxs(DropdownMenuItem, { onSelect: () => setTimeout(openHelp, 0), className: "gap-2.5", children: [jsx(MessageCircle, { className: "size-4" }), jsx("span", { className: "flex-1", children: "\u0E15\u0E34\u0E14\u0E15\u0E48\u0E2D\u0E17\u0E35\u0E21\u0E0A\u0E48\u0E27\u0E22\u0E40\u0E2B\u0E25\u0E37\u0E2D" })] })] })] }));
|
|
2587
2591
|
}
|
|
2588
2592
|
|
|
2589
2593
|
const hasPaginationShape = (payload) => {
|
|
@@ -4423,5 +4427,5 @@ const getAxiosErrorMessage = (error) => {
|
|
|
4423
4427
|
return String(error);
|
|
4424
4428
|
};
|
|
4425
4429
|
|
|
4426
|
-
export { AccessDenied, ApiError, AppBreadcrumb, AppLayoutShell, AppSidebar, EMPLOYEE_RECORD_OK_EVENT, EMPLOYEE_RECORD_REQUIRED, EMPLOYEE_RECORD_REQUIRED_EVENT, EmployeeRequiredGate, FOR_ORGANIZATION_FIELD, FeatureFlagsProvider, GuideHost, GuideRuntime, HeaderBackground, HelpButton, HelpDialogHost, NavMain, NavTools, NavUser, OWNER_CHIP, OrganizationSwitcher, PLAN_FEATURES, PermissionGateShell, PermissionProvider, PermissionRulesProvider, ReactQueryProvider, SHELL_VERSION, SessionBackedProfileCacheSeeder, SessionRefreshTrigger, SidebarContent, SidebarFooter, SidebarHeader, SidebarHelpCard, SidebarHelpLink, SidebarProvider, SidebarTrigger, TapMenu, ThemeProvider, WITHOUT_ORGANIZATION_FLAG, WORKSPACE_HEADER_VARS, WORKSPACE_LIGHT_HEADER_VARS, WorkspaceBrand, accountSettingsHref, instance as axiosInstance, buildSystemLinks, buildUrlWithCode, canAccessNavPermissionRoute, clearAccessTokenCache, clearOrganizationId, clearStoredOrganization, closeHelp, decodeJWT, describeAttached, describeBrowser, detectHelpApp, filterNavigationModulesByPermission, filterNavigationToolsByPermission, findOrganizationForCode, getAccessToken, getActiveModule, getActiveSubModule, getAxiosErrorMessage, getOrganizationId, getQueryClientConfig, getRequestOrganizationId, getRequiredChildGroups, getStoredOrganizationIds, getTabOrganizationId, guideAnchor, guideMenuItems, hasPlanFeature, isKnownStaleOrganizationId, isLikelyTransientNetworkError, isPathActive, myRolesQueryKey, normalizePathnameForPermissionRules, openGuidePanel, openHelp, openPageGuide, openPagesPanel, openSectionGuide, organizationScopedQueryHash, parseMyRoles, platformBaseUrl, reportApiEvent, resolveActiveNav, resolveSidebarNav, resolveStaleOrganization, resolveUiRoutePermission, resolveUrlOrgGate, retryWithStoredOrganizations, roleSummary, runGlobalRequestPrecheck, runWithTransientRetry, setKnownOrganizationIds, setOrganizationId, setTabOrganizationId, shouldRetryQuery, toApiError, unwrapApiResponse, updateOrganizationId, useClearOrgOnUserChange, useFeatureFlag, useFeatureFlags, useGuideEntry, useInvalidateQueriesOnOrgChange, useKeycloakRoles, useMyRoles, useOrganizationIdState, usePageGuides, usePermissionRules, useSessionRefresh, useSidebar, useSidebarToggle, withoutOrganization };
|
|
4430
|
+
export { AccessDenied, ApiError, AppBreadcrumb, AppLayoutShell, AppSidebar, EMPLOYEE_RECORD_OK_EVENT, EMPLOYEE_RECORD_REQUIRED, EMPLOYEE_RECORD_REQUIRED_EVENT, EmployeeRequiredGate, FOR_ORGANIZATION_FIELD, FeatureFlagsProvider, GuideHost, GuideRuntime, HeaderBackground, HelpButton, HelpDialogHost, NavMain, NavTools, NavUser, OWNER_CHIP, OrganizationSwitcher, PLAN_FEATURES, PermissionGateShell, PermissionProvider, PermissionRulesProvider, ReactQueryProvider, SHELL_VERSION, SessionBackedProfileCacheSeeder, SessionRefreshTrigger, SidebarContent, SidebarFooter, SidebarHeader, SidebarHelpCard, SidebarHelpLink, SidebarProvider, SidebarTrigger, TapMenu, ThemeProvider, WITHOUT_ORGANIZATION_FLAG, WORKSPACE_HEADER_VARS, WORKSPACE_LIGHT_HEADER_VARS, WorkspaceBrand, accountSettingsHref, instance as axiosInstance, buildSystemLinks, buildUrlWithCode, canAccessNavPermissionRoute, clearAccessTokenCache, clearOrganizationId, clearStoredOrganization, closeHelp, decodeJWT, describeAttached, describeBrowser, detectHelpApp, filterNavigationModulesByPermission, filterNavigationToolsByPermission, findOrganizationForCode, getAccessToken, getActiveModule, getActiveSubModule, getAxiosErrorMessage, getOrganizationId, getQueryClientConfig, getRequestOrganizationId, getRequiredChildGroups, getStoredOrganizationIds, getTabOrganizationId, guideAnchor, guideMenuItems, hasPlanFeature, isKnownStaleOrganizationId, isLikelyTransientNetworkError, isPathActive, myRolesQueryKey, normalizePathnameForPermissionRules, openFlow, openFlowsPanel, openGuidePanel, openHelp, openPageGuide, openPagesPanel, openSectionGuide, organizationScopedQueryHash, parseMyRoles, platformBaseUrl, reportApiEvent, resolveActiveNav, resolveSidebarNav, resolveStaleOrganization, resolveUiRoutePermission, resolveUrlOrgGate, retryWithStoredOrganizations, roleSummary, runGlobalRequestPrecheck, runWithTransientRetry, setKnownOrganizationIds, setOrganizationId, setTabOrganizationId, shouldRetryQuery, toApiError, unwrapApiResponse, updateOrganizationId, useClearOrgOnUserChange, useFeatureFlag, useFeatureFlags, useGuideEntry, useInvalidateQueriesOnOrgChange, useKeycloakRoles, useMyRoles, useOrganizationIdState, usePageGuides, usePermissionRules, useSessionRefresh, useSidebar, useSidebarToggle, withoutOrganization };
|
|
4427
4431
|
//# sourceMappingURL=index.esm.js.map
|