@access-ci/ui 0.13.0 → 0.13.2

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 { r as Oa, g as sl, t as $, a as I, j as Q } from "./index-DAUT_q6B.js";
1
+ import { r as Oa, g as sl, t as $, a as I, j as Q } from "./index-B1qdYKlx.js";
2
2
  var Ut = {}, on = {};
3
3
  /**
4
4
  * @license React
@@ -7434,11 +7434,15 @@ const Hs = I.createContext(), Xu = ({ children: e }) => {
7434
7434
  return () => {
7435
7435
  document.removeEventListener("keydown", e), r.disconnect(), clearInterval(o);
7436
7436
  };
7437
- }, []), null), Gs = (e) => (console.error("Bot error:", e), e && e.error, He.ERRORS.API_UNAVAILABLE), Ys = (e) => !e || typeof e != "string" ? e : e.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+(?![)\\]])`, "gi"), (t) => {
7438
- let n = t, r = "";
7439
- const o = n.match(/([.,;:!?]+)$/);
7440
- return o && (r = o[1], n = n.slice(0, -r.length)), `[${n}](${n})${r}`;
7441
- }), ed = ({ sessionId: e, apiKey: t }) => {
7437
+ }, []), null), Gs = (e) => (console.error("Bot error:", e), e && e.error, He.ERRORS.API_UNAVAILABLE), Ys = (e) => {
7438
+ if (!e || typeof e != "string") return e;
7439
+ let t = e.replace(/\[(https?:\/\/[^\s]+?)\]/gi, "[$1]($1)");
7440
+ return t = t.replace(new RegExp(`(?<!\\]\\(|href=["']|\\[)https?:\\/\\/[^\\s[\\]()]+`, "gi"), (n) => {
7441
+ let r = n, o = "";
7442
+ const i = r.match(/([.,;:!?]+)$/);
7443
+ return i && (o = i[1], r = r.slice(0, -o.length)), `[${r}](${r})${o}`;
7444
+ }), t;
7445
+ }, ed = ({ sessionId: e, apiKey: t }) => {
7442
7446
  let n = null;
7443
7447
  return { go_ahead_and_ask: { message: "Please type your question about ACCESS below.", path: "qa_loop" }, qa_loop: { message: async (r) => {
7444
7448
  const { userInput: o } = r;
@@ -7972,7 +7976,7 @@ function id({ welcomeMessage: e, isBotLoggedIn: t, loginUrl: n, sessionId: r, ti
7972
7976
  }, setFeedbackForm: c = () => {
7973
7977
  } }) => ({ start: { message: d, options: ["Ask a question about ACCESS", "Open a Help Ticket", "Usage and performance of ACCESS resources (XDMoD)", "Report a security issue"], chatDisabled: !0, path: (m) => m.userInput === "Ask a question about ACCESS" ? "go_ahead_and_ask" : m.userInput === "Open a Help Ticket" ? (l({}), "help_ticket") : m.userInput === "Usage and performance of ACCESS resources (XDMoD)" ? "metrics_intro" : m.userInput === "Report a security issue" ? (l({}), "security_incident") : "start" } }))({ welcome: _s(0, e), setTicketForm: i }) || {}, ...(t ? ed({ sessionId: r, apiKey: A }) : { go_ahead_and_ask: { message: "To ask questions, you need to log in first.", component: $.createElement(Ko, { loginUrl: n }), options: ["Back to Main Menu"], chatDisabled: !0, path: (d) => d.userInput === "Back to Main Menu" ? "start" : "go_ahead_and_ask" } }) || {}, ...(t ? td({ sessionId: r, apiKey: A }) : { metrics_intro: { message: "To investigate metrics, you need to log in first.", component: $.createElement(Ko, { loginUrl: n }), options: ["Back to Main Menu"], chatDisabled: !0, path: (d) => d.userInput === "Back to Main Menu" ? "start" : "metrics_intro" } }) || {}, ...rd({ ticketForm: o, setTicketForm: i, userInfo: s }) || {}, ...od({ ticketForm: o, setTicketForm: i, userInfo: s }) || {} };
7974
7978
  }
7975
- var ad = "2.7.0";
7979
+ var ad = "2.7.3";
7976
7980
  localStorage.getItem("QaBotDebug") === "true" && console.info(`%c🤖 ACCESS QA Bot | v${ad} | react-chatbotify v2.2.0 [${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}]`, "background: #107180; color: white; padding: 8px; border-radius: 3px; font-weight: bold;");
7977
7981
  const sd = () => {
7978
7982
  for (let t = 0; t < localStorage.length; t++) {
@@ -8060,7 +8064,7 @@ const sd = () => {
8060
8064
  return window.addEventListener("rcb-toggle-chat-window", J), () => {
8061
8065
  window.removeEventListener("rcb-toggle-chat-window", J);
8062
8066
  };
8063
- }, []), $.createElement("div", { className: "qa-bot " + (i ? "embedded-qa-bot" : ""), ref: U, role: "region", "aria-label": "Ask ACCESS tool" }, $.createElement(is, null, $.createElement("main", { role: "main", "aria-label": "Chat interface" }, $.createElement(js, { ref: t, embedded: i, isBotLoggedIn: y, currentOpen: r }), $.createElement(SA, { key: `chatbot-${w}-${y}`, settings: _, flow: re, plugins: H }), $.createElement("div", { "aria-live": "polite", "aria-label": "Bot response updates", className: "sr-only", id: "bot-live-region" }), $.createElement("div", { id: "chat-input-help", className: "sr-only" }, "Type your message and press Enter to send. Use arrow keys to navigate through response options. Press Enter or Space to select an option."), $.createElement("div", { id: "keyboard-help", className: "sr-only" }, "Available keyboard shortcuts: Arrow keys to navigate options, Enter or Space to select, Tab to move between interactive elements, Escape to close dialogs."))));
8067
+ }, []), $.createElement("div", { className: "qa-bot " + (i ? "embedded-qa-bot" : ""), ref: U, role: "application", "aria-label": i ? "Ask ACCESS - Embedded Chat Application" : "Ask ACCESS - Chat Assistant Application" }, $.createElement(is, null, $.createElement(js, { ref: t, embedded: i, isBotLoggedIn: y, currentOpen: r }), $.createElement(SA, { key: `chatbot-${w}-${y}`, settings: _, flow: re, plugins: H }), $.createElement("div", { "aria-live": "polite", role: "status", className: "sr-only", id: "bot-live-region" }), $.createElement("div", { id: "chat-input-help", className: "sr-only" }, "Type your message and press Enter to send. Use arrow keys to navigate through response options. Press Enter or Space to select an option."), $.createElement("div", { id: "keyboard-help", className: "sr-only" }, "Available keyboard shortcuts: Arrow keys to navigate options, Enter or Space to select, Tab to move between interactive elements, Escape to close dialogs.")));
8064
8068
  });
8065
8069
  Xs.displayName = "QABotInternal";
8066
8070
  const Ks = $.forwardRef((e, t) => $.createElement(Xu, null, $.createElement(Xs, jr({}, e, { ref: t }))));
@@ -1,4 +1,4 @@
1
- import { j as i } from "./index-DAUT_q6B.js";
1
+ import { j as i } from "./index-B1qdYKlx.js";
2
2
  function c({ alt: n = null, name: s = null, src: l = null }) {
3
3
  return s ? /* @__PURE__ */ i.jsx("i", { className: `icon bi bi-${s}` }) : /* @__PURE__ */ i.jsx("img", { className: "icon", alt: n, src: l });
4
4
  }