@eintrek/erp-shell 0.1.76 → 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 +27 -0
- package/dist/chunks/{format-BVoVc7Yk.cjs → format-DQLPHq7h.cjs} +223 -33
- package/dist/chunks/format-DQLPHq7h.cjs.map +1 -0
- package/dist/chunks/{format-BWUKNKxg.esm.js → format-ILrTMV4G.esm.js} +223 -33
- package/dist/chunks/format-ILrTMV4G.esm.js.map +1 -0
- package/dist/guide/guide-ui.d.ts +6 -0
- package/dist/guide/machine.d.ts +39 -0
- package/dist/guide/types.d.ts +6 -0
- package/dist/guide-core.cjs +1 -1
- package/dist/guide-core.esm.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.esm.js +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/format-BVoVc7Yk.cjs.map +0 -1
- package/dist/chunks/format-BWUKNKxg.esm.js.map +0 -1
package/dist/guide/guide-ui.d.ts
CHANGED
|
@@ -100,6 +100,12 @@ export interface StepLayerProps {
|
|
|
100
100
|
height: number;
|
|
101
101
|
offsetTop: number;
|
|
102
102
|
};
|
|
103
|
+
/**
|
|
104
|
+
* The app's content column (GuideConfig.contentRoot), already cut to the
|
|
105
|
+
* viewport: the bubble stays inside it (LIFF's 460 px column on a desktop).
|
|
106
|
+
* Shell ≥ 0.1.77. Omitted: the viewport.
|
|
107
|
+
*/
|
|
108
|
+
bounds?: Rect | null;
|
|
103
109
|
phone: boolean;
|
|
104
110
|
showHand: boolean;
|
|
105
111
|
bubble: BubbleModel;
|
package/dist/guide/machine.d.ts
CHANGED
|
@@ -62,6 +62,11 @@ export type GuideScreen = {
|
|
|
62
62
|
section?: string;
|
|
63
63
|
/** A flow's step: the flow key (the mission is `flow:<key>`). Shell ≥ 0.1.76. */
|
|
64
64
|
flow?: string;
|
|
65
|
+
/** "ขั้นที่ no/total" as shown (GuideState.counter): never going down. Shell ≥ 0.1.77. */
|
|
66
|
+
pos?: {
|
|
67
|
+
no: number;
|
|
68
|
+
total: number;
|
|
69
|
+
};
|
|
65
70
|
}
|
|
66
71
|
/** The first-visit offer of this page's guide: a small card, not modal. */
|
|
67
72
|
| {
|
|
@@ -129,6 +134,18 @@ export interface GuideState {
|
|
|
129
134
|
mission: string;
|
|
130
135
|
steps: number[];
|
|
131
136
|
} | null;
|
|
137
|
+
/**
|
|
138
|
+
* The counter of the run being played (shell ≥ 0.1.77): the steps shown so
|
|
139
|
+
* far, and the total as last worked out and on which page. The total is
|
|
140
|
+
* worked out when a step is entered on a page it was not worked out on,
|
|
141
|
+
* and never goes down.
|
|
142
|
+
*/
|
|
143
|
+
counter: {
|
|
144
|
+
mission: string;
|
|
145
|
+
shown: number[];
|
|
146
|
+
total: number;
|
|
147
|
+
path: string;
|
|
148
|
+
} | null;
|
|
132
149
|
}
|
|
133
150
|
/** The page-guide part of the state, from the progress answer. */
|
|
134
151
|
export interface GuidePagesInit {
|
|
@@ -442,6 +459,14 @@ export declare function stepPosition(mission: GuideMission, index: number, env:
|
|
|
442
459
|
no: number;
|
|
443
460
|
total: number;
|
|
444
461
|
};
|
|
462
|
+
/**
|
|
463
|
+
* The steps after `index` this person will see, as far as can be known from
|
|
464
|
+
* here: on this page, everything is read (requires, skipIf, a click whose
|
|
465
|
+
* outcome already holds); on another page, a step whose showing depends on
|
|
466
|
+
* what is on that page (`skipIf`, `onMissing: "skip"`) is not counted until
|
|
467
|
+
* its page is reached.
|
|
468
|
+
*/
|
|
469
|
+
export declare function stepsAhead(mission: GuideMission, index: number, env: GuideEnv, context: Readonly<Record<string, string>>): number;
|
|
445
470
|
/** A step entered now would pass at once: a click or select step whose route or visible outcome holds. */
|
|
446
471
|
export declare function wouldAutoPass(step: GuideStep, env: GuideEnv): boolean;
|
|
447
472
|
/** The steps of this mission that passed by themselves in this run. */
|
|
@@ -481,6 +506,14 @@ export declare function firstStepReady(suite: GuideSuite, pageKey: string, env:
|
|
|
481
506
|
* route, a moment of nothing loading, the primary tab, not hidden.
|
|
482
507
|
*/
|
|
483
508
|
export declare function pageOfferDue(state: GuideState, suite: GuideSuite, env: GuideEnv): string | null;
|
|
509
|
+
/**
|
|
510
|
+
* Whether a row may be written now: none of this version yet, or — once —
|
|
511
|
+
* a skipped one that the person has now finished (skipped → completed,
|
|
512
|
+
* shell ≥ 0.1.77). A completed row is final; skipped again changes nothing.
|
|
513
|
+
*/
|
|
514
|
+
export declare function rowWritable(row: PageRow | undefined, version: number, status: "completed" | "skipped"): boolean;
|
|
515
|
+
/** Whether a run should keep its row to write at its end: no row yet, or only a skipped one. */
|
|
516
|
+
export declare function rowStillDue(row: PageRow | undefined, version: number): boolean;
|
|
484
517
|
/** The section guide's row says this person has ended this version of it. */
|
|
485
518
|
export declare function sectionRecorded(state: GuideState, section: {
|
|
486
519
|
key: string;
|
|
@@ -517,4 +550,10 @@ export declare function backTarget(mission: GuideMission, index: number, env: Gu
|
|
|
517
550
|
index: number;
|
|
518
551
|
close: boolean;
|
|
519
552
|
} | null;
|
|
553
|
+
/**
|
|
554
|
+
* A flow's next step (the next one this person sees) when the person is on
|
|
555
|
+
* its page and no longer on the current step's: they moved on by
|
|
556
|
+
* themselves. -1 otherwise (still on this step's page, or elsewhere).
|
|
557
|
+
*/
|
|
558
|
+
export declare function flowStepArrivedAt(mission: GuideMission, index: number, env: GuideEnv, context: Readonly<Record<string, string>>): number;
|
|
520
559
|
export declare function reduceGuide(state: GuideState, action: GuideAction, suite: GuideSuite, env: GuideEnv): GuideResult;
|
package/dist/guide/types.d.ts
CHANGED
|
@@ -542,4 +542,10 @@ export interface GuideConfig {
|
|
|
542
542
|
* `module.accounting` is known). Shell ≥ 0.1.74.
|
|
543
543
|
*/
|
|
544
544
|
pagesReady?: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* A selector for the app's content column (LIFF's centred 460 px
|
|
547
|
+
* `MobileShell` on a desktop): bubbles stay inside it. Omitted: the
|
|
548
|
+
* viewport. Shell ≥ 0.1.77.
|
|
549
|
+
*/
|
|
550
|
+
contentRoot?: string;
|
|
545
551
|
}
|
package/dist/guide-core.cjs
CHANGED
package/dist/guide-core.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { A as GUIDE_API_EVENT, G as GUIDE_EVENT_PREFIX, a as GUIDE_LAYER_ATTRIBUTE, c as GuideProgressConflict, d as GuideRuntime, S as SectionGuideButton, T as THAI_MONTHS_SHORT, e as apiCallDetail, f as emitGuideEvent, g as fillRoute, h as formatBaht, i as guideAnchor, j as guideMenuItems, k as guideMenuShown, l as loadGuides, m as matchApiPath, n as matchRoute, o as openFlow, p as openFlowsPanel, q as openGuidePanel, r as openPageGuide, s as openPagesPanel, t as openSectionGuide, u as reportApiCall, v as reportApiEvent, w as setSectionGuideValues, x as storeGuides, y as thaiMonth, z as thaiMonthYear, B as useGuideEntry, C as usePageGuideEntry, D as usePageGuides, E as useSectionGuideValues } from './chunks/format-
|
|
2
|
+
export { A as GUIDE_API_EVENT, G as GUIDE_EVENT_PREFIX, a as GUIDE_LAYER_ATTRIBUTE, c as GuideProgressConflict, d as GuideRuntime, S as SectionGuideButton, T as THAI_MONTHS_SHORT, e as apiCallDetail, f as emitGuideEvent, g as fillRoute, h as formatBaht, i as guideAnchor, j as guideMenuItems, k as guideMenuShown, l as loadGuides, m as matchApiPath, n as matchRoute, o as openFlow, p as openFlowsPanel, q as openGuidePanel, r as openPageGuide, s as openPagesPanel, t as openSectionGuide, u as reportApiCall, v as reportApiEvent, w as setSectionGuideValues, x as storeGuides, y as thaiMonth, z as thaiMonthYear, B as useGuideEntry, C as usePageGuideEntry, D as usePageGuides, E as useSectionGuideValues } from './chunks/format-ILrTMV4G.esm.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react-dom';
|
package/dist/index.cjs
CHANGED
|
@@ -14,7 +14,7 @@ var Link = require('next/link');
|
|
|
14
14
|
var reactDom = require('react-dom');
|
|
15
15
|
var nextThemes = require('next-themes');
|
|
16
16
|
var axios = require('axios');
|
|
17
|
-
var format = require('./chunks/format-
|
|
17
|
+
var format = require('./chunks/format-DQLPHq7h.cjs');
|
|
18
18
|
var reactQueryDevtools = require('@tanstack/react-query-devtools');
|
|
19
19
|
require('@floating-ui/dom');
|
|
20
20
|
|
|
@@ -1740,7 +1740,7 @@ function platformApiBase(app) {
|
|
|
1740
1740
|
* This package's version, attached to help messages so the back office can
|
|
1741
1741
|
* tell which shell a report came from. Keep in step with package.json.
|
|
1742
1742
|
*/
|
|
1743
|
-
const SHELL_VERSION = "0.1.
|
|
1743
|
+
const SHELL_VERSION = "0.1.77";
|
|
1744
1744
|
|
|
1745
1745
|
const HELP_APP_LABEL = {
|
|
1746
1746
|
platform: "แพลตฟอร์ม",
|
package/dist/index.esm.js
CHANGED
|
@@ -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 { 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-
|
|
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-
|
|
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: "แพลตฟอร์ม",
|
package/dist/version.d.ts
CHANGED