@bigbinary/neeto-molecules 1.0.0

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.
Files changed (45) hide show
  1. package/README.md +36 -0
  2. package/dist/BrowserSupport.cjs.js +1468 -0
  3. package/dist/BrowserSupport.js +1462 -0
  4. package/dist/Columns.cjs.js +183 -0
  5. package/dist/Columns.js +177 -0
  6. package/dist/CustomDomain.cjs.js +758 -0
  7. package/dist/CustomDomain.js +732 -0
  8. package/dist/DateRangeFilter.cjs.js +214 -0
  9. package/dist/DateRangeFilter.js +207 -0
  10. package/dist/EmailPreview.cjs.js +32409 -0
  11. package/dist/EmailPreview.js +32383 -0
  12. package/dist/ErrorPage.cjs.js +135 -0
  13. package/dist/ErrorPage.js +111 -0
  14. package/dist/IpRestriction.cjs.js +3578 -0
  15. package/dist/IpRestriction.js +3552 -0
  16. package/dist/KeyboardShortcuts.cjs.js +2212 -0
  17. package/dist/KeyboardShortcuts.js +2205 -0
  18. package/dist/LoginPage.cjs.js +598 -0
  19. package/dist/LoginPage.js +573 -0
  20. package/dist/NeetoWidget.cjs.js +86969 -0
  21. package/dist/NeetoWidget.js +86943 -0
  22. package/dist/PublishBlock.cjs.js +188 -0
  23. package/dist/PublishBlock.js +182 -0
  24. package/dist/Schedule.cjs.js +949 -0
  25. package/dist/Schedule.js +918 -0
  26. package/dist/ShareViaLink.cjs.js +1247 -0
  27. package/dist/ShareViaLink.js +1241 -0
  28. package/dist/Sidebar.cjs.js +222 -0
  29. package/dist/Sidebar.js +195 -0
  30. package/package.json +149 -0
  31. package/src/translations/en.json +244 -0
  32. package/types/BrowserSupport.d.ts +20 -0
  33. package/types/Columns.d.ts +22 -0
  34. package/types/CustomDomain.d.ts +7 -0
  35. package/types/DateRangeFilter.d.ts +17 -0
  36. package/types/EmailPreview.d.ts +11 -0
  37. package/types/ErrorPage.d.ts +8 -0
  38. package/types/IpRestriction.d.ts +5 -0
  39. package/types/KeyboardShortcuts.d.ts +21 -0
  40. package/types/LoginPage.d.ts +12 -0
  41. package/types/NeetoWidget.d.ts +17 -0
  42. package/types/PublishBlock.d.ts +20 -0
  43. package/types/Schedule.d.ts +15 -0
  44. package/types/ShareViaLink.d.ts +17 -0
  45. package/types/Sidebar.d.ts +28 -0
@@ -0,0 +1,135 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
5
+ var neetoui = require('@bigbinary/neetoui');
6
+ var ramda = require('ramda');
7
+ var reactHelmet = require('react-helmet');
8
+ var reactI18next = require('react-i18next');
9
+
10
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
+
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n["default"] = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
31
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
32
+
33
+ var _path$2, _path2$2;
34
+ function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
35
+ var SvgInternalServerError = function SvgInternalServerError(props) {
36
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
37
+ width: 120,
38
+ height: 120,
39
+ fill: "none",
40
+ xmlns: "http://www.w3.org/2000/svg"
41
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
42
+ d: "M120 60c0-33.137-26.863-60-60-60H0v120h120V60Z",
43
+ fill: "#1D1D1F"
44
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
45
+ d: "M30.602 107.562c2.343 0 4.421-.484 6.234-1.453 1.812-.984 3.234-2.343 4.266-4.078 1.03-1.734 1.546-3.726 1.546-5.976v-.047c0-2.172-.484-4.094-1.453-5.766a10.432 10.432 0 0 0-3.96-3.984c-1.672-.969-3.594-1.453-5.766-1.453-1.094 0-2.125.132-3.094.398a9.096 9.096 0 0 0-2.625 1.172 7.204 7.204 0 0 0-1.969 1.922h-.093l1.148-11.367h15.89v-3.75H21.368l-1.734 19.289h3.726c.22-.39.461-.75.727-1.078.281-.329.57-.633.867-.914a7.185 7.185 0 0 1 2.578-1.524c.985-.344 2.047-.516 3.188-.516 1.5 0 2.828.329 3.984.985a7.101 7.101 0 0 1 2.719 2.719c.672 1.14 1.008 2.453 1.008 3.937v.047c0 1.516-.328 2.86-.985 4.031a7.056 7.056 0 0 1-2.742 2.719c-1.172.656-2.523.984-4.055.984-1.343 0-2.554-.257-3.632-.773-1.078-.516-1.953-1.219-2.625-2.109a6.34 6.34 0 0 1-1.22-3.024l-.023-.187H19l.023.257c.172 1.829.766 3.461 1.782 4.899 1.015 1.437 2.36 2.57 4.03 3.398 1.688.828 3.61 1.242 5.767 1.242ZM58.844 107.562c2.593 0 4.82-.71 6.68-2.132 1.859-1.422 3.28-3.438 4.265-6.047 1-2.61 1.5-5.703 1.5-9.281v-.047c0-3.578-.5-6.672-1.5-9.282-.984-2.609-2.406-4.617-4.266-6.023-1.859-1.422-4.085-2.133-6.68-2.133-2.593 0-4.82.711-6.679 2.133-1.844 1.406-3.258 3.414-4.242 6.023-.984 2.61-1.477 5.704-1.477 9.282v.047c0 3.578.492 6.671 1.477 9.28.984 2.61 2.398 4.626 4.242 6.048 1.86 1.422 4.086 2.132 6.68 2.132Zm0-3.679c-1.719 0-3.188-.555-4.407-1.664-1.218-1.125-2.148-2.719-2.789-4.781-.64-2.063-.96-4.508-.96-7.336v-.047c0-2.828.32-5.266.96-7.313.641-2.062 1.57-3.648 2.79-4.758 1.218-1.109 2.687-1.664 4.406-1.664 1.718 0 3.187.555 4.406 1.664 1.234 1.11 2.172 2.696 2.813 4.758.656 2.047.984 4.485.984 7.313v.047c0 2.828-.328 5.273-.984 7.335-.641 2.063-1.579 3.657-2.813 4.782-1.219 1.109-2.688 1.664-4.406 1.664ZM87.953 107.562c2.594 0 4.82-.71 6.68-2.132 1.86-1.422 3.281-3.438 4.265-6.047 1-2.61 1.5-5.703 1.5-9.281v-.047c0-3.578-.5-6.672-1.5-9.282-.984-2.609-2.406-4.617-4.265-6.023-1.86-1.422-4.086-2.133-6.68-2.133-2.594 0-4.82.711-6.68 2.133-1.843 1.406-3.257 3.414-4.242 6.023-.984 2.61-1.476 5.704-1.476 9.282v.047c0 3.578.492 6.671 1.476 9.28.985 2.61 2.399 4.626 4.242 6.048 1.86 1.422 4.086 2.132 6.68 2.132Zm0-3.679c-1.719 0-3.187-.555-4.406-1.664-1.219-1.125-2.149-2.719-2.79-4.781-.64-2.063-.96-4.508-.96-7.336v-.047c0-2.828.32-5.266.96-7.313.641-2.062 1.571-3.648 2.79-4.758 1.219-1.109 2.687-1.664 4.406-1.664 1.719 0 3.188.555 4.406 1.664 1.235 1.11 2.172 2.696 2.813 4.758.656 2.047.984 4.485.984 7.313v.047c0 2.828-.328 5.273-.984 7.335-.64 2.063-1.578 3.657-2.813 4.782-1.218 1.109-2.687 1.664-4.406 1.664Z",
46
+ fill: "#fff"
47
+ })));
48
+ };
49
+
50
+ var _path$1, _path2$1;
51
+ function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
52
+ var SvgPageNotFound = function SvgPageNotFound(props) {
53
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
54
+ width: 121,
55
+ height: 120,
56
+ fill: "none",
57
+ xmlns: "http://www.w3.org/2000/svg"
58
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
59
+ d: "M120.5 60c0-33.137-26.863-60-60-60H.5v120h120V60Z",
60
+ fill: "#1D1D1F"
61
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
62
+ d: "M35.501 106.909h3.164v-7.838h5.154v-2.876h-5.154V72.32h-4.77a2440.935 2440.935 0 0 1-3.188 4.77 823.85 823.85 0 0 0-3.188 4.746 2487.114 2487.114 0 0 1-3.188 4.77l-3.212 4.747c-1.055 1.582-2.11 3.172-3.164 4.77v2.948h17.546v7.838ZM21.24 96.195v-.072a945.042 945.042 0 0 1 2.828-4.195l2.829-4.17 2.828-4.172c.943-1.39 1.886-2.772 2.829-4.147.943-1.39 1.886-2.788 2.828-4.194h.12v20.95H21.24ZM59.879 107.461c2.605 0 4.842-.719 6.712-2.158 1.87-1.454 3.3-3.507 4.29-6.16 1.007-2.669 1.51-5.833 1.51-9.492v-.072c0-3.644-.503-6.8-1.51-9.468-.99-2.669-2.42-4.723-4.29-6.16-1.87-1.455-4.107-2.182-6.712-2.182-2.605 0-4.842.727-6.712 2.181-1.853 1.438-3.284 3.492-4.29 6.16-.991 2.653-1.487 5.81-1.487 9.469v.072c0 3.643.496 6.8 1.487 9.468 1.006 2.653 2.437 4.706 4.29 6.16 1.87 1.455 4.107 2.182 6.712 2.182Zm0-2.877c-1.934 0-3.588-.607-4.962-1.822-1.374-1.214-2.429-2.94-3.164-5.177-.72-2.237-1.079-4.882-1.079-7.934v-.072c0-3.052.36-5.697 1.079-7.934.735-2.237 1.79-3.963 3.164-5.178 1.374-1.214 3.028-1.822 4.962-1.822 1.934 0 3.587.608 4.962 1.822 1.39 1.215 2.453 2.94 3.188 5.178.735 2.221 1.102 4.866 1.102 7.934v.072c0 3.052-.367 5.697-1.102 7.934-.735 2.237-1.798 3.963-3.188 5.177-1.375 1.215-3.028 1.822-4.962 1.822ZM93.893 106.909h3.164v-7.838h5.153v-2.876h-5.153V72.32h-4.77a2487.163 2487.163 0 0 1-3.189 4.77 829.054 829.054 0 0 0-3.188 4.746 2534.647 2534.647 0 0 1-3.188 4.77c-1.07 1.583-2.14 3.165-3.212 4.747-1.054 1.582-2.109 3.172-3.164 4.77v2.948h17.547v7.838ZM79.63 96.195v-.072a953.801 953.801 0 0 1 2.829-4.195l2.828-4.17 2.829-4.172c.943-1.39 1.885-2.772 2.828-4.147.943-1.39 1.886-2.788 2.829-4.194h.12v20.95H79.63Z",
63
+ fill: "#fff"
64
+ })));
65
+ };
66
+
67
+ var _path, _path2;
68
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
69
+ var SvgUnauthorized = function SvgUnauthorized(props) {
70
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
71
+ width: 120,
72
+ height: 120,
73
+ fill: "none",
74
+ xmlns: "http://www.w3.org/2000/svg"
75
+ }, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
76
+ d: "M120 60c0-33.137-26.863-60-60-60H0v120h120V60Z",
77
+ fill: "#1D1D1F"
78
+ })), _path2 || (_path2 = /*#__PURE__*/React__namespace.createElement("path", {
79
+ d: "M32.913 105.236h4.205v-7.143h4.873v-3.846h-4.873V70.764h-6.283a569.118 569.118 0 0 0-2.962 4.515 396.499 396.499 0 0 0-3.01 4.659 611.785 611.785 0 0 0-3.01 4.73l-2.963 4.777a3496.03 3496.03 0 0 1-2.89 4.73v3.918h16.913v7.143ZM20.348 94.271v-.24c.78-1.29 1.576-2.587 2.389-3.893l2.484-3.966a843.046 843.046 0 0 1 2.532-3.941l2.485-3.846c.828-1.274 1.64-2.508 2.436-3.703h.263v19.589h-12.59ZM59.716 106c2.58 0 4.786-.733 6.617-2.198 1.832-1.465 3.241-3.543 4.228-6.235.988-2.691 1.481-5.876 1.481-9.555v-.048c0-3.679-.493-6.856-1.48-9.531-.988-2.692-2.397-4.77-4.229-6.235C64.502 70.733 62.296 70 59.716 70c-2.564 0-4.762.733-6.593 2.198-1.816 1.465-3.217 3.543-4.205 6.235-.971 2.675-1.457 5.852-1.457 9.531v.048c0 3.679.486 6.864 1.457 9.555.988 2.692 2.39 4.77 4.205 6.235 1.831 1.465 4.029 2.198 6.593 2.198Zm0-3.75c-1.656 0-3.082-.582-4.276-1.744-1.179-1.163-2.086-2.803-2.723-4.921-.621-2.134-.932-4.659-.932-7.573v-.048c0-2.914.31-5.43.932-7.549.637-2.118 1.544-3.75 2.723-4.897 1.194-1.162 2.62-1.744 4.276-1.744 1.688 0 3.121.582 4.3 1.744 1.194 1.147 2.11 2.78 2.747 4.897.637 2.118.956 4.635.956 7.55v.047c0 2.914-.319 5.439-.956 7.573-.637 2.118-1.553 3.758-2.747 4.921-1.179 1.162-2.612 1.744-4.3 1.744ZM90.341 105.809c2.31 0 4.364-.43 6.163-1.29 1.8-.876 3.217-2.07 4.252-3.583 1.036-1.513 1.553-3.225 1.553-5.136v-.048c0-2.453-.78-4.42-2.34-5.9-1.546-1.498-3.576-2.35-6.092-2.557V87.2c1.433-.303 2.699-.82 3.798-1.553 1.099-.733 1.959-1.648 2.58-2.747.621-1.1.931-2.357.931-3.775v-.047c0-1.752-.453-3.289-1.361-4.61-.892-1.339-2.158-2.382-3.799-3.13-1.624-.765-3.535-1.147-5.733-1.147-2.15 0-4.053.39-5.71 1.17-1.64.781-2.961 1.872-3.965 3.273-.987 1.402-1.576 3.042-1.767 4.921l-.024.24h4.133l.023-.24c.128-1.162.51-2.166 1.147-3.01.637-.844 1.481-1.489 2.532-1.934 1.067-.462 2.278-.693 3.631-.693 1.402 0 2.588.223 3.56.669.987.445 1.736 1.09 2.245 1.935.51.844.765 1.87.765 3.081v.048c0 1.147-.295 2.174-.884 3.082-.59.891-1.41 1.6-2.46 2.126-1.052.51-2.262.764-3.632.764h-4.133v3.631h4.324c2.421 0 4.332.573 5.734 1.72 1.417 1.13 2.126 2.755 2.126 4.873v.048c0 1.21-.319 2.285-.956 3.225-.637.924-1.529 1.648-2.675 2.174-1.131.526-2.453.788-3.966.788-1.529 0-2.874-.239-4.037-.716-1.163-.494-2.094-1.171-2.795-2.03a5.723 5.723 0 0 1-1.218-2.987l-.024-.239h-4.133l.024.287c.16 1.815.748 3.432 1.768 4.849 1.035 1.418 2.436 2.532 4.204 3.345 1.768.812 3.838 1.218 6.211 1.218Z",
80
+ fill: "#fff"
81
+ })));
82
+ };
83
+
84
+ var ERRORS = {
85
+ 404: {
86
+ Image: SvgPageNotFound,
87
+ errorKey: "neetoMolecules.errorPage.cantBeFound",
88
+ titleKey: "neetoMolecules.errorPage.title.cantBeFound"
89
+ },
90
+ 403: {
91
+ Image: SvgUnauthorized,
92
+ errorKey: "neetoMolecules.errorPage.unauthorized",
93
+ titleKey: "neetoMolecules.errorPage.title.unauthorized"
94
+ },
95
+ 500: {
96
+ Image: SvgInternalServerError,
97
+ errorKey: "neetoMolecules.errorPage.internalServerError",
98
+ titleKey: "neetoMolecules.errorPage.title.internalServerError"
99
+ }
100
+ };
101
+
102
+ var ErrorPage = function ErrorPage(_ref) {
103
+ var _ref$homeUrl = _ref.homeUrl,
104
+ homeUrl = _ref$homeUrl === void 0 ? "/" : _ref$homeUrl,
105
+ status = _ref.status;
106
+ var storeStatusCode = reactUtils.useErrorDisplayStore(ramda.prop("statusCode"));
107
+ status = status || storeStatusCode;
108
+ var _useTranslation = reactI18next.useTranslation(),
109
+ t = _useTranslation.t;
110
+ var _ref2 = ERRORS[status] || ERRORS[404],
111
+ Image = _ref2.Image,
112
+ errorKey = _ref2.errorKey,
113
+ titleKey = _ref2.titleKey;
114
+ return /*#__PURE__*/React__default["default"].createElement("div", {
115
+ className: "flex min-h-screen w-full flex-col items-center justify-center",
116
+ "data-cy": "error-page-container"
117
+ }, /*#__PURE__*/React__default["default"].createElement(reactHelmet.Helmet, null, /*#__PURE__*/React__default["default"].createElement("title", null, t(titleKey))), /*#__PURE__*/React__default["default"].createElement(Image, {
118
+ className: "mb-8",
119
+ "data-cy": "error-image"
120
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
121
+ className: "mb-6 text-center",
122
+ "data-cy": "title",
123
+ style: "h2",
124
+ weight: "semibold"
125
+ }, /*#__PURE__*/React__default["default"].createElement(reactI18next.Trans, {
126
+ i18nKey: errorKey
127
+ })), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
128
+ href: homeUrl,
129
+ label: t("neetoMolecules.errorPage.backToHome"),
130
+ size: "large",
131
+ style: "primary"
132
+ }));
133
+ };
134
+
135
+ module.exports = ErrorPage;
@@ -0,0 +1,111 @@
1
+ import * as React from 'react';
2
+ import React__default from 'react';
3
+ import { useErrorDisplayStore } from '@bigbinary/neeto-commons-frontend/react-utils';
4
+ import { Typography, Button } from '@bigbinary/neetoui';
5
+ import { prop } from 'ramda';
6
+ import { Helmet } from 'react-helmet';
7
+ import { useTranslation, Trans } from 'react-i18next';
8
+
9
+ var _path$2, _path2$2;
10
+ function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
11
+ var SvgInternalServerError = function SvgInternalServerError(props) {
12
+ return /*#__PURE__*/React.createElement("svg", _extends$2({
13
+ width: 120,
14
+ height: 120,
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg"
17
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
18
+ d: "M120 60c0-33.137-26.863-60-60-60H0v120h120V60Z",
19
+ fill: "#1D1D1F"
20
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
21
+ d: "M30.602 107.562c2.343 0 4.421-.484 6.234-1.453 1.812-.984 3.234-2.343 4.266-4.078 1.03-1.734 1.546-3.726 1.546-5.976v-.047c0-2.172-.484-4.094-1.453-5.766a10.432 10.432 0 0 0-3.96-3.984c-1.672-.969-3.594-1.453-5.766-1.453-1.094 0-2.125.132-3.094.398a9.096 9.096 0 0 0-2.625 1.172 7.204 7.204 0 0 0-1.969 1.922h-.093l1.148-11.367h15.89v-3.75H21.368l-1.734 19.289h3.726c.22-.39.461-.75.727-1.078.281-.329.57-.633.867-.914a7.185 7.185 0 0 1 2.578-1.524c.985-.344 2.047-.516 3.188-.516 1.5 0 2.828.329 3.984.985a7.101 7.101 0 0 1 2.719 2.719c.672 1.14 1.008 2.453 1.008 3.937v.047c0 1.516-.328 2.86-.985 4.031a7.056 7.056 0 0 1-2.742 2.719c-1.172.656-2.523.984-4.055.984-1.343 0-2.554-.257-3.632-.773-1.078-.516-1.953-1.219-2.625-2.109a6.34 6.34 0 0 1-1.22-3.024l-.023-.187H19l.023.257c.172 1.829.766 3.461 1.782 4.899 1.015 1.437 2.36 2.57 4.03 3.398 1.688.828 3.61 1.242 5.767 1.242ZM58.844 107.562c2.593 0 4.82-.71 6.68-2.132 1.859-1.422 3.28-3.438 4.265-6.047 1-2.61 1.5-5.703 1.5-9.281v-.047c0-3.578-.5-6.672-1.5-9.282-.984-2.609-2.406-4.617-4.266-6.023-1.859-1.422-4.085-2.133-6.68-2.133-2.593 0-4.82.711-6.679 2.133-1.844 1.406-3.258 3.414-4.242 6.023-.984 2.61-1.477 5.704-1.477 9.282v.047c0 3.578.492 6.671 1.477 9.28.984 2.61 2.398 4.626 4.242 6.048 1.86 1.422 4.086 2.132 6.68 2.132Zm0-3.679c-1.719 0-3.188-.555-4.407-1.664-1.218-1.125-2.148-2.719-2.789-4.781-.64-2.063-.96-4.508-.96-7.336v-.047c0-2.828.32-5.266.96-7.313.641-2.062 1.57-3.648 2.79-4.758 1.218-1.109 2.687-1.664 4.406-1.664 1.718 0 3.187.555 4.406 1.664 1.234 1.11 2.172 2.696 2.813 4.758.656 2.047.984 4.485.984 7.313v.047c0 2.828-.328 5.273-.984 7.335-.641 2.063-1.579 3.657-2.813 4.782-1.219 1.109-2.688 1.664-4.406 1.664ZM87.953 107.562c2.594 0 4.82-.71 6.68-2.132 1.86-1.422 3.281-3.438 4.265-6.047 1-2.61 1.5-5.703 1.5-9.281v-.047c0-3.578-.5-6.672-1.5-9.282-.984-2.609-2.406-4.617-4.265-6.023-1.86-1.422-4.086-2.133-6.68-2.133-2.594 0-4.82.711-6.68 2.133-1.843 1.406-3.257 3.414-4.242 6.023-.984 2.61-1.476 5.704-1.476 9.282v.047c0 3.578.492 6.671 1.476 9.28.985 2.61 2.399 4.626 4.242 6.048 1.86 1.422 4.086 2.132 6.68 2.132Zm0-3.679c-1.719 0-3.187-.555-4.406-1.664-1.219-1.125-2.149-2.719-2.79-4.781-.64-2.063-.96-4.508-.96-7.336v-.047c0-2.828.32-5.266.96-7.313.641-2.062 1.571-3.648 2.79-4.758 1.219-1.109 2.687-1.664 4.406-1.664 1.719 0 3.188.555 4.406 1.664 1.235 1.11 2.172 2.696 2.813 4.758.656 2.047.984 4.485.984 7.313v.047c0 2.828-.328 5.273-.984 7.335-.64 2.063-1.578 3.657-2.813 4.782-1.218 1.109-2.687 1.664-4.406 1.664Z",
22
+ fill: "#fff"
23
+ })));
24
+ };
25
+
26
+ var _path$1, _path2$1;
27
+ function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
28
+ var SvgPageNotFound = function SvgPageNotFound(props) {
29
+ return /*#__PURE__*/React.createElement("svg", _extends$1({
30
+ width: 121,
31
+ height: 120,
32
+ fill: "none",
33
+ xmlns: "http://www.w3.org/2000/svg"
34
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
35
+ d: "M120.5 60c0-33.137-26.863-60-60-60H.5v120h120V60Z",
36
+ fill: "#1D1D1F"
37
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
38
+ d: "M35.501 106.909h3.164v-7.838h5.154v-2.876h-5.154V72.32h-4.77a2440.935 2440.935 0 0 1-3.188 4.77 823.85 823.85 0 0 0-3.188 4.746 2487.114 2487.114 0 0 1-3.188 4.77l-3.212 4.747c-1.055 1.582-2.11 3.172-3.164 4.77v2.948h17.546v7.838ZM21.24 96.195v-.072a945.042 945.042 0 0 1 2.828-4.195l2.829-4.17 2.828-4.172c.943-1.39 1.886-2.772 2.829-4.147.943-1.39 1.886-2.788 2.828-4.194h.12v20.95H21.24ZM59.879 107.461c2.605 0 4.842-.719 6.712-2.158 1.87-1.454 3.3-3.507 4.29-6.16 1.007-2.669 1.51-5.833 1.51-9.492v-.072c0-3.644-.503-6.8-1.51-9.468-.99-2.669-2.42-4.723-4.29-6.16-1.87-1.455-4.107-2.182-6.712-2.182-2.605 0-4.842.727-6.712 2.181-1.853 1.438-3.284 3.492-4.29 6.16-.991 2.653-1.487 5.81-1.487 9.469v.072c0 3.643.496 6.8 1.487 9.468 1.006 2.653 2.437 4.706 4.29 6.16 1.87 1.455 4.107 2.182 6.712 2.182Zm0-2.877c-1.934 0-3.588-.607-4.962-1.822-1.374-1.214-2.429-2.94-3.164-5.177-.72-2.237-1.079-4.882-1.079-7.934v-.072c0-3.052.36-5.697 1.079-7.934.735-2.237 1.79-3.963 3.164-5.178 1.374-1.214 3.028-1.822 4.962-1.822 1.934 0 3.587.608 4.962 1.822 1.39 1.215 2.453 2.94 3.188 5.178.735 2.221 1.102 4.866 1.102 7.934v.072c0 3.052-.367 5.697-1.102 7.934-.735 2.237-1.798 3.963-3.188 5.177-1.375 1.215-3.028 1.822-4.962 1.822ZM93.893 106.909h3.164v-7.838h5.153v-2.876h-5.153V72.32h-4.77a2487.163 2487.163 0 0 1-3.189 4.77 829.054 829.054 0 0 0-3.188 4.746 2534.647 2534.647 0 0 1-3.188 4.77c-1.07 1.583-2.14 3.165-3.212 4.747-1.054 1.582-2.109 3.172-3.164 4.77v2.948h17.547v7.838ZM79.63 96.195v-.072a953.801 953.801 0 0 1 2.829-4.195l2.828-4.17 2.829-4.172c.943-1.39 1.885-2.772 2.828-4.147.943-1.39 1.886-2.788 2.829-4.194h.12v20.95H79.63Z",
39
+ fill: "#fff"
40
+ })));
41
+ };
42
+
43
+ var _path, _path2;
44
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
45
+ var SvgUnauthorized = function SvgUnauthorized(props) {
46
+ return /*#__PURE__*/React.createElement("svg", _extends({
47
+ width: 120,
48
+ height: 120,
49
+ fill: "none",
50
+ xmlns: "http://www.w3.org/2000/svg"
51
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
52
+ d: "M120 60c0-33.137-26.863-60-60-60H0v120h120V60Z",
53
+ fill: "#1D1D1F"
54
+ })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
55
+ d: "M32.913 105.236h4.205v-7.143h4.873v-3.846h-4.873V70.764h-6.283a569.118 569.118 0 0 0-2.962 4.515 396.499 396.499 0 0 0-3.01 4.659 611.785 611.785 0 0 0-3.01 4.73l-2.963 4.777a3496.03 3496.03 0 0 1-2.89 4.73v3.918h16.913v7.143ZM20.348 94.271v-.24c.78-1.29 1.576-2.587 2.389-3.893l2.484-3.966a843.046 843.046 0 0 1 2.532-3.941l2.485-3.846c.828-1.274 1.64-2.508 2.436-3.703h.263v19.589h-12.59ZM59.716 106c2.58 0 4.786-.733 6.617-2.198 1.832-1.465 3.241-3.543 4.228-6.235.988-2.691 1.481-5.876 1.481-9.555v-.048c0-3.679-.493-6.856-1.48-9.531-.988-2.692-2.397-4.77-4.229-6.235C64.502 70.733 62.296 70 59.716 70c-2.564 0-4.762.733-6.593 2.198-1.816 1.465-3.217 3.543-4.205 6.235-.971 2.675-1.457 5.852-1.457 9.531v.048c0 3.679.486 6.864 1.457 9.555.988 2.692 2.39 4.77 4.205 6.235 1.831 1.465 4.029 2.198 6.593 2.198Zm0-3.75c-1.656 0-3.082-.582-4.276-1.744-1.179-1.163-2.086-2.803-2.723-4.921-.621-2.134-.932-4.659-.932-7.573v-.048c0-2.914.31-5.43.932-7.549.637-2.118 1.544-3.75 2.723-4.897 1.194-1.162 2.62-1.744 4.276-1.744 1.688 0 3.121.582 4.3 1.744 1.194 1.147 2.11 2.78 2.747 4.897.637 2.118.956 4.635.956 7.55v.047c0 2.914-.319 5.439-.956 7.573-.637 2.118-1.553 3.758-2.747 4.921-1.179 1.162-2.612 1.744-4.3 1.744ZM90.341 105.809c2.31 0 4.364-.43 6.163-1.29 1.8-.876 3.217-2.07 4.252-3.583 1.036-1.513 1.553-3.225 1.553-5.136v-.048c0-2.453-.78-4.42-2.34-5.9-1.546-1.498-3.576-2.35-6.092-2.557V87.2c1.433-.303 2.699-.82 3.798-1.553 1.099-.733 1.959-1.648 2.58-2.747.621-1.1.931-2.357.931-3.775v-.047c0-1.752-.453-3.289-1.361-4.61-.892-1.339-2.158-2.382-3.799-3.13-1.624-.765-3.535-1.147-5.733-1.147-2.15 0-4.053.39-5.71 1.17-1.64.781-2.961 1.872-3.965 3.273-.987 1.402-1.576 3.042-1.767 4.921l-.024.24h4.133l.023-.24c.128-1.162.51-2.166 1.147-3.01.637-.844 1.481-1.489 2.532-1.934 1.067-.462 2.278-.693 3.631-.693 1.402 0 2.588.223 3.56.669.987.445 1.736 1.09 2.245 1.935.51.844.765 1.87.765 3.081v.048c0 1.147-.295 2.174-.884 3.082-.59.891-1.41 1.6-2.46 2.126-1.052.51-2.262.764-3.632.764h-4.133v3.631h4.324c2.421 0 4.332.573 5.734 1.72 1.417 1.13 2.126 2.755 2.126 4.873v.048c0 1.21-.319 2.285-.956 3.225-.637.924-1.529 1.648-2.675 2.174-1.131.526-2.453.788-3.966.788-1.529 0-2.874-.239-4.037-.716-1.163-.494-2.094-1.171-2.795-2.03a5.723 5.723 0 0 1-1.218-2.987l-.024-.239h-4.133l.024.287c.16 1.815.748 3.432 1.768 4.849 1.035 1.418 2.436 2.532 4.204 3.345 1.768.812 3.838 1.218 6.211 1.218Z",
56
+ fill: "#fff"
57
+ })));
58
+ };
59
+
60
+ var ERRORS = {
61
+ 404: {
62
+ Image: SvgPageNotFound,
63
+ errorKey: "neetoMolecules.errorPage.cantBeFound",
64
+ titleKey: "neetoMolecules.errorPage.title.cantBeFound"
65
+ },
66
+ 403: {
67
+ Image: SvgUnauthorized,
68
+ errorKey: "neetoMolecules.errorPage.unauthorized",
69
+ titleKey: "neetoMolecules.errorPage.title.unauthorized"
70
+ },
71
+ 500: {
72
+ Image: SvgInternalServerError,
73
+ errorKey: "neetoMolecules.errorPage.internalServerError",
74
+ titleKey: "neetoMolecules.errorPage.title.internalServerError"
75
+ }
76
+ };
77
+
78
+ var ErrorPage = function ErrorPage(_ref) {
79
+ var _ref$homeUrl = _ref.homeUrl,
80
+ homeUrl = _ref$homeUrl === void 0 ? "/" : _ref$homeUrl,
81
+ status = _ref.status;
82
+ var storeStatusCode = useErrorDisplayStore(prop("statusCode"));
83
+ status = status || storeStatusCode;
84
+ var _useTranslation = useTranslation(),
85
+ t = _useTranslation.t;
86
+ var _ref2 = ERRORS[status] || ERRORS[404],
87
+ Image = _ref2.Image,
88
+ errorKey = _ref2.errorKey,
89
+ titleKey = _ref2.titleKey;
90
+ return /*#__PURE__*/React__default.createElement("div", {
91
+ className: "flex min-h-screen w-full flex-col items-center justify-center",
92
+ "data-cy": "error-page-container"
93
+ }, /*#__PURE__*/React__default.createElement(Helmet, null, /*#__PURE__*/React__default.createElement("title", null, t(titleKey))), /*#__PURE__*/React__default.createElement(Image, {
94
+ className: "mb-8",
95
+ "data-cy": "error-image"
96
+ }), /*#__PURE__*/React__default.createElement(Typography, {
97
+ className: "mb-6 text-center",
98
+ "data-cy": "title",
99
+ style: "h2",
100
+ weight: "semibold"
101
+ }, /*#__PURE__*/React__default.createElement(Trans, {
102
+ i18nKey: errorKey
103
+ })), /*#__PURE__*/React__default.createElement(Button, {
104
+ href: homeUrl,
105
+ label: t("neetoMolecules.errorPage.backToHome"),
106
+ size: "large",
107
+ style: "primary"
108
+ }));
109
+ };
110
+
111
+ export { ErrorPage as default };