UNPKG

@payfit/unity-components

Version:

119 lines (118 loc) 5.41 kB
import { RawLink as e } from "../link/RawLink.js"; import { jsx as t } from "react/jsx-runtime"; import n from "@payfit/unity-illustrations/assets/EmptyStateIncidentPanel"; import r from "@payfit/unity-illustrations/assets/EmptyStateResearch"; import i from "@payfit/unity-illustrations/assets/ClosedLockWithBackground"; //#region src/components/error-state/initConfig.tsx var a = (a, o) => /* @__PURE__ */ new Map([ ["known", { illustration: n, icon: "WarningCircleOutlined", mainTitle: a.formatMessage({ id: "unity:component:error-state:common:main-title", defaultMessage: "Something went wrong" }, { br: () => /* @__PURE__ */ t("br", {}) }), mainDescription: a.formatMessage({ id: "unity:component:error-state:known:main-description", defaultMessage: "Please refresh the page or check your connection.<br></br>We’ve been notified of the issue and are working to resolve it as quickly as possible." }, { br: () => /* @__PURE__ */ t("br", {}) }), mainDescriptionComponent: a.formatMessage({ id: "unity:component:error-state:common:main-description-component", defaultMessage: "Please refresh the page or try signing in again. We’ve been notified of the issue and are working to resolve it as quickly as possible." }, { br: () => /* @__PURE__ */ t("br", {}) }), buttonLabel: a.formatMessage({ id: "unity:component:error-state:button:label", defaultMessage: "Go to dashboard" }, { br: () => /* @__PURE__ */ t("br", {}) }), detailDescription: a.formatMessage({ id: "unity:component:error-state:detail-description", defaultMessage: "Here's the technical error detail.<br></br> <br></br>If the problem continues, you can send it to <Link>our customer support</Link> so we can help unblock you:" }, { br: () => /* @__PURE__ */ t("br", {}), Link: (n) => /* @__PURE__ */ t(e, { variant: "inline", isExternal: !0, color: "primary", href: a.formatMessage({ id: "unity:component:common:customer-support:url" }), children: n }) }) }], ["unknown", { illustration: n, icon: "WarningCircleOutlined", mainTitle: a.formatMessage({ id: "unity:component:error-state:common:main-title", defaultMessage: "Something went wrong" }, { br: () => /* @__PURE__ */ t("br", {}) }), mainDescription: a.formatMessage({ id: "unity:component:error-state:unknown:main-description", defaultMessage: "Please refresh the page or try signing in again.<br></br>We’ve been notified of the issue and are working to resolve it as quickly as possible.<br></br>If the problem continues, please contact <Link>our customer support</Link>." }, { br: () => /* @__PURE__ */ t("br", {}), Link: (n) => /* @__PURE__ */ t(e, { variant: "inline", isExternal: !0, color: "primary", href: a.formatMessage({ id: "unity:component:common:customer-support:url" }), children: n }) }), mainDescriptionComponent: a.formatMessage({ id: "unity:component:error-state:common:main-description-component", defaultMessage: "Please refresh the page or try signing in again. We’ve been notified of the issue and are working to resolve it as quickly as possible." }, { br: () => /* @__PURE__ */ t("br", {}) }), buttonLabel: a.formatMessage({ id: "unity:component:error-state:button:label", defaultMessage: "Go to dashboard" }, { br: () => /* @__PURE__ */ t("br", {}) }), backButtonLabel: a.formatMessage({ id: "unity:component:error-state:unknown:back-link:label", defaultMessage: "Back to dashboard" }, { br: () => /* @__PURE__ */ t("br", {}) }) }], ["404", { illustration: r, icon: "WarningCircleOutlined", mainTitle: a.formatMessage({ id: "unity:component:error-state:404:main-title", defaultMessage: "Sorry, we couldn’t find what you’re looking for" }, { br: () => /* @__PURE__ */ t("br", {}) }), mainDescription: a.formatMessage({ id: "unity:component:error-state:404:main-description", defaultMessage: "This item may have been moved or deleted.<br></br>You can try searching for it manually or start again from your dashboard." }, { br: () => /* @__PURE__ */ t("br", {}) }), buttonLabel: a.formatMessage({ id: "unity:component:error-state:button:label", defaultMessage: "Go to dashboard" }, { br: () => /* @__PURE__ */ t("br", {}) }) }], ["no-permission", { illustration: i, icon: "LockOutlined", mainTitle: a.formatMessage({ id: "unity:component:error-state:no-permission:main-title", defaultMessage: "You don't have access to this page" }, { br: () => /* @__PURE__ */ t("br", {}) }), mainDescription: a.formatMessage({ id: "unity:component:error-state:no-permission:main-description", defaultMessage: "Your current role on {entityName} doesn't include the permission to view this content." }, { br: () => /* @__PURE__ */ t("br", {}), entityName: o?.noPermissionEntityName }), mainDescriptionComponent: a.formatMessage({ id: "unity:component:error-state:no-permission:main-description", defaultMessage: "Your current role on {entityName} doesn't include the permission to view this content." }, { br: () => /* @__PURE__ */ t("br", {}), entityName: o?.noPermissionEntityName }), buttonLabel: a.formatMessage({ id: "unity:component:error-state:no-permission:button:label", defaultMessage: "Go back" }, { br: () => /* @__PURE__ */ t("br", {}) }) }] ]); //#endregion export { a as initConfig };