vc-page-workflows 1.5.13 → 1.5.14

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.
@@ -1,4 +1,4 @@
1
- import { s as t } from "./main-Co3C0IUt.js";
1
+ import { s as t } from "./main-BKs9RZGg.js";
2
2
  import "react";
3
3
  const e = (r) => /* @__PURE__ */ t.jsxs(
4
4
  "svg",
@@ -1,4 +1,4 @@
1
- import { s as c } from "./main-Co3C0IUt.js";
1
+ import { s as c } from "./main-BKs9RZGg.js";
2
2
  import "react";
3
3
  const e = (r) => /* @__PURE__ */ c.jsxs(
4
4
  "svg",
@@ -1,4 +1,4 @@
1
- import { s as r } from "./main-Co3C0IUt.js";
1
+ import { s as r } from "./main-BKs9RZGg.js";
2
2
  import "react";
3
3
  const e = (c) => /* @__PURE__ */ r.jsxs(
4
4
  "svg",
@@ -1,4 +1,4 @@
1
- import { s as t } from "./main-Co3C0IUt.js";
1
+ import { s as t } from "./main-BKs9RZGg.js";
2
2
  import "react";
3
3
  const o = (s) => /* @__PURE__ */ t.jsxs(
4
4
  "svg",
@@ -1,4 +1,4 @@
1
- import { s as c } from "./main-Co3C0IUt.js";
1
+ import { s as c } from "./main-BKs9RZGg.js";
2
2
  import "react";
3
3
  const e = (r) => /* @__PURE__ */ c.jsxs(
4
4
  "svg",
@@ -1,4 +1,4 @@
1
- import { s as c } from "./main-Co3C0IUt.js";
1
+ import { s as c } from "./main-BKs9RZGg.js";
2
2
  import "react";
3
3
  const e = (r) => /* @__PURE__ */ c.jsxs(
4
4
  "svg",
@@ -166188,7 +166188,7 @@ const Ed = (a, u, c) => {
166188
166188
  }
166189
166189
  const u = (async () => {
166190
166190
  try {
166191
- const c = (await Ed(/* @__PURE__ */ Object.assign({ "../../icons/BarCode.jsx": () => Promise.resolve().then(() => bp), "../../icons/Caculator.jsx": () => Promise.resolve().then(() => fu), "../../icons/CryingFace.jsx": () => import("./CryingFace-BqnlUwuF-DnFjRFxS.js"), "../../icons/HappyFace.jsx": () => import("./HappyFace-B4inHb9T-C9fhgR5r.js"), "../../icons/NoParticularEmotion.jsx": () => import("./NoParticularEmotion-Ccxsb4-z-B7nVQBPx.js"), "../../icons/SadFace.jsx": () => import("./SadFace-ZJSXbATY-CYbv0e9B.js"), "../../icons/SlightlySadFace.jsx": () => import("./SlightlySadFace-_rPb-DIQ-D4BiagiO.js"), "../../icons/VeryHappyFace.jsx": () => import("./VeryHappyFace-DQWzNOED-wHYZgnG8.js") }), `../../icons/${a}.jsx`, 4)).default;
166191
+ const c = (await Ed(/* @__PURE__ */ Object.assign({ "../../icons/BarCode.jsx": () => Promise.resolve().then(() => bp), "../../icons/Caculator.jsx": () => Promise.resolve().then(() => fu), "../../icons/CryingFace.jsx": () => import("./CryingFace-BqnlUwuF-aYDLiEpA.js"), "../../icons/HappyFace.jsx": () => import("./HappyFace-B4inHb9T-DdzdVB6l.js"), "../../icons/NoParticularEmotion.jsx": () => import("./NoParticularEmotion-Ccxsb4-z-dCxoLtd1.js"), "../../icons/SadFace.jsx": () => import("./SadFace-ZJSXbATY-w6Qu_IQ6.js"), "../../icons/SlightlySadFace.jsx": () => import("./SlightlySadFace-_rPb-DIQ-CKc5-3BI.js"), "../../icons/VeryHappyFace.jsx": () => import("./VeryHappyFace-DQWzNOED-oSM1Rz99.js") }), `../../icons/${a}.jsx`, 4)).default;
166192
166192
  return Mr.set(a, c), c;
166193
166193
  } catch {
166194
166194
  return Mr.set(a, null), null;
@@ -175592,6 +175592,33 @@ const WalkinConfirmation = ({ onNext: a, data: u, isMobileWebview: c, endWorkflo
175592
175592
  ] })
175593
175593
  ] });
175594
175594
  };
175595
+ function NewVisitConfirmation({ onNext: a, currentComponent: u }) {
175596
+ const [c, d] = useState(null), [f, h] = useState(!0);
175597
+ return useEffect(() => {
175598
+ (async () => {
175599
+ var m;
175600
+ try {
175601
+ const g = await request.get(`${window.base_url}/api_v3/visits/current?_s=current.visit`), v = (m = g == null ? void 0 : g.data) == null ? void 0 : m.id;
175602
+ if (!v) {
175603
+ a({});
175604
+ return;
175605
+ }
175606
+ d(v), h(!1);
175607
+ } catch (g) {
175608
+ console.error(g), a({});
175609
+ }
175610
+ })();
175611
+ }, []), f ? /* @__PURE__ */ jsx$1(Spin, { size: "large" }) : /* @__PURE__ */ jsx$1(
175612
+ FormComponent,
175613
+ {
175614
+ currentComponent: {
175615
+ ...u,
175616
+ data: { visitId: c }
175617
+ },
175618
+ onNext: a
175619
+ }
175620
+ );
175621
+ }
175595
175622
  var componentStates = {
175596
175623
  payment: {
175597
175624
  value: {
@@ -175630,7 +175657,8 @@ const COMPONENT_END_ID = "end", isLoggedIn = () => {
175630
175657
  { type: "search_patient", component: SearchPatient },
175631
175658
  { type: "walkin_confirmation", component: WalkinConfirmation },
175632
175659
  { type: "econsult_confirmation", component: EconsultConfirmmation },
175633
- { type: "phone_callback_confirmation", component: PhoneCallbackConfirmation }
175660
+ { type: "phone_callback_confirmation", component: PhoneCallbackConfirmation },
175661
+ { type: "new_visit_confirmation", component: NewVisitConfirmation }
175634
175662
  ], Workflow = forwardRef((a, u) => {
175635
175663
  const [c, d] = useState(null), [f, h] = useState([]), [p, m] = useState(null), [g, v] = useState(null), [y, b] = useState(!1), [S, x] = useState([]);
175636
175664
  let R = lodash$2.get(componentStates, "room.value"), C = lodash$2.get(componentStates, "intake.value"), $ = lodash$2.get(componentStates, "payment.value"), P = lodash$2.get(componentStates, "visit.value");
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as m } from "./main-Co3C0IUt.js";
1
+ import { D as m } from "./main-BKs9RZGg.js";
2
2
  export {
3
3
  m as DynamicFlows
4
4
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vc-page-workflows",
3
3
  "private": false,
4
- "version": "1.5.13",
4
+ "version": "1.5.14",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"