@eintrek/erp-shell 0.1.78 → 0.1.79
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 +7 -0
- package/dist/chunks/{format-Wgj2sKpK.esm.js → format-BqUpxbzD.esm.js} +28 -2
- package/dist/chunks/{format-Wgj2sKpK.esm.js.map → format-BqUpxbzD.esm.js.map} +1 -1
- package/dist/chunks/{format-BmTSD3DB.cjs → format-CFXhGhta.cjs} +28 -2
- package/dist/chunks/{format-BmTSD3DB.cjs.map → format-CFXhGhta.cjs.map} +1 -1
- 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
|
@@ -5875,6 +5875,32 @@ function GuideRuntimeInner({ config, organizationId, code, routing, progress: pr
|
|
|
5875
5875
|
dispatchRef.current({ type: "resumeFlow", flow: saved.flow, step: saved.step, context, write: saved.write === true });
|
|
5876
5876
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5877
5877
|
}, [pagesLive, !!state, hasFlows, missionsLive]);
|
|
5878
|
+
// The layer sits above every dialog, and a dialog's buttons sit at its
|
|
5879
|
+
// bottom right, where the chip is: the chip covered them in every app.
|
|
5880
|
+
// While an app dialog is open, the chip is not drawn.
|
|
5881
|
+
const [appDialogShown, setAppDialogShown] = React.useState(false);
|
|
5882
|
+
React.useEffect(() => {
|
|
5883
|
+
if (!missionsLive || typeof MutationObserver === "undefined" || typeof document === "undefined" || !document.body)
|
|
5884
|
+
return;
|
|
5885
|
+
let raf = 0;
|
|
5886
|
+
const check = () => {
|
|
5887
|
+
raf = 0;
|
|
5888
|
+
setAppDialogShown(appDialogOpen());
|
|
5889
|
+
};
|
|
5890
|
+
check();
|
|
5891
|
+
const obs = new MutationObserver(records => {
|
|
5892
|
+
if (records.every(r => inGuideLayer(r.target)))
|
|
5893
|
+
return;
|
|
5894
|
+
if (!raf)
|
|
5895
|
+
raf = requestAnimationFrame(check);
|
|
5896
|
+
});
|
|
5897
|
+
obs.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ["data-state", "role"] });
|
|
5898
|
+
return () => {
|
|
5899
|
+
obs.disconnect();
|
|
5900
|
+
if (raf)
|
|
5901
|
+
cancelAnimationFrame(raf);
|
|
5902
|
+
};
|
|
5903
|
+
}, [missionsLive]);
|
|
5878
5904
|
if (!live || !state || !layer || !ctxIdle)
|
|
5879
5905
|
return null;
|
|
5880
5906
|
/* ---------------- render ---------------- */
|
|
@@ -5982,7 +6008,7 @@ function GuideRuntimeInner({ config, organizationId, code, routing, progress: pr
|
|
|
5982
6008
|
.join(", ")
|
|
5983
6009
|
: undefined,
|
|
5984
6010
|
}));
|
|
5985
|
-
const showChip = missionsLive && chipVisible(state, suite, ctxIdle);
|
|
6011
|
+
const showChip = missionsLive && !appDialogShown && chipVisible(state, suite, ctxIdle);
|
|
5986
6012
|
// The panel: the missions (when this person has them, and not "คู่มือทุกหน้า"),
|
|
5987
6013
|
// then the page guides they have.
|
|
5988
6014
|
const panelMissions = missionsLive && total > 0 && state.panelSection === "all";
|
|
@@ -6135,4 +6161,4 @@ exports.useGuideEntry = useGuideEntry;
|
|
|
6135
6161
|
exports.usePageGuideEntry = usePageGuideEntry;
|
|
6136
6162
|
exports.usePageGuides = usePageGuides;
|
|
6137
6163
|
exports.useSectionGuideValues = useSectionGuideValues;
|
|
6138
|
-
//# sourceMappingURL=format-
|
|
6164
|
+
//# sourceMappingURL=format-CFXhGhta.cjs.map
|