@peassoft/mnr-web-topline 2.0.0 → 2.2.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.
@@ -3,6 +3,7 @@ import type { ToplineUser } from '../../types/data.js';
3
3
  import type { ToplineService } from '../../modules/topline-service/index.js';
4
4
  export type InnerToplineContext = {
5
5
  ssrUser: ToplineUser | null;
6
+ forceBlankHomeLink: boolean;
6
7
  user: ToplineUser | null;
7
8
  handleUserChange: (user: ToplineUser | null) => unknown;
8
9
  onReady: (toplineService: ToplineService, user: ToplineUser | null) => unknown;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export default React.createContext({
3
3
  ssrUser: null,
4
+ forceBlankHomeLink: false,
4
5
  user: null,
5
6
  handleUserChange: () => undefined,
6
7
  onReady: () => undefined,
@@ -1 +1,2 @@
1
- export default function Logo(): import("react/jsx-runtime").JSX.Element;
1
+ import { type JSX } from 'react';
2
+ export default function Logo(): JSX.Element;
@@ -1,8 +1,16 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
2
3
  import LogoFull from './logo-full.js';
3
4
  import LogoShort from './logo-short.js';
5
+ import ToplineContext from '../../context.js';
4
6
  export default function Logo() {
5
- return _jsxs(_Fragment, {
7
+ const {
8
+ forceBlankHomeLink
9
+ } = useContext(ToplineContext);
10
+ return _jsxs("a", {
11
+ href: '/',
12
+ "aria-label": "Home page",
13
+ target: forceBlankHomeLink ? '_blank' : undefined,
6
14
  children: [_jsx(LogoFull, {}), _jsx(LogoShort, {})]
7
15
  });
8
16
  }
@@ -6,6 +6,7 @@ export default function LogoFull() {
6
6
  height: '40',
7
7
  viewBox: '0 0 300 40',
8
8
  className: 'topline_shell_fullLogo',
9
+ role: 'presentation',
9
10
  children: [_jsx("path", {
10
11
  d: 'M207.4375,24.234375 L207.4375,27.796875 C207.4375,28.6614627 207.234377,29.3098937 206.828125,29.7421875 C206.421873,30.1744813 205.906253,30.390625 205.28125,30.390625 C204.666664,30.390625 204.16146,30.1718772 203.765625,29.734375 C203.36979,29.2968728 203.171875,28.6510459 203.171875,27.796875 L203.171875,15.921875 C203.171875,14.0051988 203.864576,13.046875 205.25,13.046875 C205.958337,13.046875 206.468748,13.2708311 206.78125,13.71875 C207.093752,14.1666689 207.265625,14.8281206 207.296875,15.703125 C207.807294,14.8281206 208.330726,14.1666689 208.867188,13.71875 C209.403649,13.2708311 210.119787,13.046875 211.015625,13.046875 C211.911463,13.046875 212.781246,13.2708311 213.625,13.71875 C214.468754,14.1666689 214.890625,14.760413 214.890625,15.5 C214.890625,16.0208359 214.710939,16.4505191 214.351562,16.7890625 C213.992186,17.1276059 213.604169,17.296875 213.1875,17.296875 C213.031249,17.296875 212.653649,17.2005218 212.054688,17.0078125 C211.455726,16.8151032 210.927086,16.71875 210.46875,16.71875 C209.843747,16.71875 209.333335,16.8828109 208.9375,17.2109375 C208.541665,17.5390641 208.234376,18.0260384 208.015625,18.671875 C207.796874,19.3177116 207.645834,20.085933 207.5625,20.9765625 C207.479166,21.867192 207.4375,22.9531186 207.4375,24.234375 Z M228.328125,22.765625 L219.984375,22.765625 C219.994792,23.7343798 220.190102,24.588538 220.570312,25.328125 C220.950523,26.067712 221.455726,26.6249981 222.085938,27 C222.716149,27.3750019 223.411455,27.5625 224.171875,27.5625 C224.682294,27.5625 225.148435,27.5026048 225.570312,27.3828125 C225.99219,27.2630202 226.40104,27.0755221 226.796875,26.8203125 C227.19271,26.5651029 227.55729,26.2916681 227.890625,26 C228.22396,25.7083319 228.656247,25.3125025 229.1875,24.8125 C229.406251,24.6249991 229.718748,24.53125 230.125,24.53125 C230.562502,24.53125 230.916665,24.6510405 231.1875,24.890625 C231.458335,25.1302095 231.59375,25.4687478 231.59375,25.90625 C231.59375,26.2916686 231.44271,26.7421849 231.140625,27.2578125 C230.83854,27.7734401 230.382816,28.2682268 229.773438,28.7421875 C229.164059,29.2161482 228.398442,29.6093734 227.476562,29.921875 C226.554683,30.2343766 225.494798,30.390625 224.296875,30.390625 C221.557278,30.390625 219.427091,29.6093828 217.90625,28.046875 C216.385409,26.4843672 215.625,24.3645967 215.625,21.6875 C215.625,20.427077 215.812498,19.2578179 216.1875,18.1796875 C216.562502,17.1015571 217.109371,16.1770872 217.828125,15.40625 C218.546879,14.6354128 219.432286,14.0442729 220.484375,13.6328125 C221.536464,13.2213521 222.703119,13.015625 223.984375,13.015625 C225.65105,13.015625 227.080723,13.367184 228.273438,14.0703125 C229.466152,14.773441 230.359372,15.6822861 230.953125,16.796875 C231.546878,17.9114639 231.84375,19.0468692 231.84375,20.203125 C231.84375,21.276047 231.536461,21.9713526 230.921875,22.2890625 C230.307289,22.6067724 229.442714,22.765625 228.328125,22.765625 Z M219.984375,20.34375 L227.71875,20.34375 C227.614583,18.8854094 227.221358,17.7942745 226.539062,17.0703125 C225.856767,16.3463505 224.958339,15.984375 223.84375,15.984375 C222.781245,15.984375 221.908858,16.3515588 221.226562,17.0859375 C220.544267,17.8203162 220.130209,18.9062428 219.984375,20.34375 Z M237.65625,15.703125 L241.109375,25.390625 L244.828125,15.28125 C245.119793,14.4687459 245.406249,13.8932309 245.6875,13.5546875 C245.968751,13.2161441 246.39583,13.046875 246.96875,13.046875 C247.510419,13.046875 247.971352,13.2291648 248.351562,13.59375 C248.731773,13.9583352 248.921875,14.3802059 248.921875,14.859375 C248.921875,15.0468759 248.888021,15.2656237 248.820312,15.515625 C248.752604,15.7656263 248.67448,15.9999989 248.585938,16.21875 C248.497395,16.4375011 248.395834,16.6874986 248.28125,16.96875 L244.1875,27.125 C244.072916,27.4166681 243.92448,27.7864561 243.742188,28.234375 C243.559895,28.6822939 243.356772,29.0651026 243.132812,29.3828125 C242.908853,29.7005224 242.632814,29.9479158 242.304688,30.125 C241.976561,30.3020842 241.578127,30.390625 241.109375,30.390625 C240.505205,30.390625 240.023439,30.2526055 239.664062,29.9765625 C239.304686,29.7005195 239.039063,29.3984391 238.867188,29.0703125 C238.695312,28.7421859 238.406252,28.0937548 238,27.125 L233.9375,17.078125 C233.84375,16.8281237 233.747396,16.5781263 233.648438,16.328125 C233.549479,16.0781237 233.466146,15.822918 233.398438,15.5625 C233.330729,15.302082 233.296875,15.0781259 233.296875,14.890625 C233.296875,14.5989569 233.385416,14.3098973 233.5625,14.0234375 C233.739584,13.7369777 233.984373,13.5026051 234.296875,13.3203125 C234.609377,13.1380199 234.947915,13.046875 235.3125,13.046875 C236.020837,13.046875 236.507811,13.249998 236.773438,13.65625 C237.039064,14.062502 237.333332,14.7447869 237.65625,15.703125 Z M256.25,15.46875 L256.25,27.796875 C256.25,28.6510459 256.046877,29.2968728 255.640625,29.734375 C255.234373,30.1718772 254.718753,30.390625 254.09375,30.390625 C253.468747,30.390625 252.960939,30.1666689 252.570312,29.71875 C252.179686,29.2708311 251.984375,28.6302125 251.984375,27.796875 L251.984375,15.59375 C251.984375,14.7499958 252.179686,14.1145855 252.570312,13.6875 C252.960939,13.2604145 253.468747,13.046875 254.09375,13.046875 C254.718753,13.046875 255.234373,13.2604145 255.640625,13.6875 C256.046877,14.1145855 256.25,14.7083295 256.25,15.46875 Z M254.140625,11.0625 C253.546872,11.0625 253.039065,10.8802102 252.617188,10.515625 C252.19531,10.1510398 251.984375,9.63542 251.984375,8.96875 C251.984375,8.36458031 252.200519,7.86718945 252.632812,7.4765625 C253.065106,7.08593555 253.567705,6.890625 254.140625,6.890625 C254.692711,6.890625 255.18229,7.06770656 255.609375,7.421875 C256.03646,7.77604344 256.25,8.29166328 256.25,8.96875 C256.25,9.62500328 256.041669,10.138019 255.625,10.5078125 C255.208331,10.877606 254.713545,11.0625 254.140625,11.0625 Z M274.390625,24.8125 C274.390625,25.9895892 274.10417,26.9973916 273.53125,27.8359375 C272.95833,28.6744834 272.111985,29.3098937 270.992188,29.7421875 C269.87239,30.1744813 268.510425,30.390625 266.90625,30.390625 C265.374992,30.390625 264.062505,30.1562523 262.96875,29.6875 C261.874995,29.2187477 261.067711,28.632816 260.546875,27.9296875 C260.026039,27.226559 259.765625,26.5208369 259.765625,25.8125 C259.765625,25.3437477 259.93229,24.94271 260.265625,24.609375 C260.59896,24.27604 261.020831,24.109375 261.53125,24.109375 C261.979169,24.109375 262.322915,24.2187489 262.5625,24.4375 C262.802085,24.6562511 263.031249,24.9635397 263.25,25.359375 C263.687502,26.1197955 264.210934,26.6874981 264.820312,27.0625 C265.429691,27.4375019 266.260411,27.625 267.3125,27.625 C268.166671,27.625 268.867185,27.4348977 269.414062,27.0546875 C269.96094,26.6744773 270.234375,26.2395858 270.234375,25.75 C270.234375,24.9999962 269.950524,24.4531267 269.382812,24.109375 C268.815101,23.7656233 267.880215,23.4375016 266.578125,23.125 C265.109368,22.7604148 263.914067,22.3776062 262.992188,21.9765625 C262.070308,21.5755188 261.333336,21.0468783 260.78125,20.390625 C260.229164,19.7343717 259.953125,18.9270881 259.953125,17.96875 C259.953125,17.1145791 260.208331,16.3072955 260.71875,15.546875 C261.229169,14.7864545 261.981766,14.1796898 262.976562,13.7265625 C263.971359,13.2734352 265.171868,13.046875 266.578125,13.046875 C267.682297,13.046875 268.674475,13.1614572 269.554688,13.390625 C270.4349,13.6197928 271.169268,13.9270814 271.757812,14.3125 C272.346357,14.6979186 272.794269,15.1249977 273.101562,15.59375 C273.408856,16.0625023 273.5625,16.5208311 273.5625,16.96875 C273.5625,17.4583358 273.398439,17.8593734 273.070312,18.171875 C272.742186,18.4843766 272.276045,18.640625 271.671875,18.640625 C271.234373,18.640625 270.861981,18.5156263 270.554688,18.265625 C270.247394,18.0156237 269.895835,17.6406275 269.5,17.140625 C269.177082,16.7239563 268.796877,16.3906263 268.359375,16.140625 C267.921873,15.8906237 267.328129,15.765625 266.578125,15.765625 C265.807288,15.765625 265.166669,15.9296859 264.65625,16.2578125 C264.145831,16.5859391 263.890625,16.9947892 263.890625,17.484375 C263.890625,17.9322939 264.078123,18.2994777 264.453125,18.5859375 C264.828127,18.8723973 265.33333,19.1093741 265.96875,19.296875 C266.60417,19.4843759 267.479161,19.7135403 268.59375,19.984375 C269.916673,20.3072933 270.997392,20.6927061 271.835938,21.140625 C272.674483,21.5885439 273.309894,22.1171845 273.742188,22.7265625 C274.174481,23.3359405 274.390625,24.0312461 274.390625,24.8125 Z M289.90625,22.765625 L281.5625,22.765625 C281.572917,23.7343798 281.768227,24.588538 282.148438,25.328125 C282.528648,26.067712 283.033851,26.6249981 283.664062,27 C284.294274,27.3750019 284.98958,27.5625 285.75,27.5625 C286.260419,27.5625 286.72656,27.5026048 287.148438,27.3828125 C287.570315,27.2630202 287.979165,27.0755221 288.375,26.8203125 C288.770835,26.5651029 289.135415,26.2916681 289.46875,26 C289.802085,25.7083319 290.234372,25.3125025 290.765625,24.8125 C290.984376,24.6249991 291.296873,24.53125 291.703125,24.53125 C292.140627,24.53125 292.49479,24.6510405 292.765625,24.890625 C293.03646,25.1302095 293.171875,25.4687478 293.171875,25.90625 C293.171875,26.2916686 293.020835,26.7421849 292.71875,27.2578125 C292.416665,27.7734401 291.960941,28.2682268 291.351562,28.7421875 C290.742184,29.2161482 289.976567,29.6093734 289.054688,29.921875 C288.132808,30.2343766 287.072923,30.390625 285.875,30.390625 C283.135403,30.390625 281.005216,29.6093828 279.484375,28.046875 C277.963534,26.4843672 277.203125,24.3645967 277.203125,21.6875 C277.203125,20.427077 277.390623,19.2578179 277.765625,18.1796875 C278.140627,17.1015571 278.687496,16.1770872 279.40625,15.40625 C280.125004,14.6354128 281.010411,14.0442729 282.0625,13.6328125 C283.114589,13.2213521 284.281244,13.015625 285.5625,13.015625 C287.229175,13.015625 288.658848,13.367184 289.851562,14.0703125 C291.044277,14.773441 291.937497,15.6822861 292.53125,16.796875 C293.125003,17.9114639 293.421875,19.0468692 293.421875,20.203125 C293.421875,21.276047 293.114586,21.9713526 292.5,22.2890625 C291.885414,22.6067724 291.020839,22.765625 289.90625,22.765625 Z M281.5625,20.34375 L289.296875,20.34375 C289.192708,18.8854094 288.799483,17.7942745 288.117188,17.0703125 C287.434892,16.3463505 286.536464,15.984375 285.421875,15.984375 C284.35937,15.984375 283.486983,16.3515588 282.804688,17.0859375 C282.122392,17.8203162 281.708334,18.9062428 281.5625,20.34375 Z',
11
12
  fill: '#3F72AF'
@@ -6,6 +6,7 @@ export default function LogoShort() {
6
6
  height: '40',
7
7
  viewBox: '0 0 180 40',
8
8
  className: 'topline_shell_shortLogo',
9
+ role: 'presentation',
9
10
  children: [_jsx("path", {
10
11
  d: 'M131.4375,24.234375 L131.4375,27.796875 C131.4375,28.6614627 131.234377,29.3098937 130.828125,29.7421875 C130.421873,30.1744813 129.906253,30.390625 129.28125,30.390625 C128.666664,30.390625 128.16146,30.1718772 127.765625,29.734375 C127.36979,29.2968728 127.171875,28.6510459 127.171875,27.796875 L127.171875,15.921875 C127.171875,14.0051988 127.864576,13.046875 129.25,13.046875 C129.958337,13.046875 130.468748,13.2708311 130.78125,13.71875 C131.093752,14.1666689 131.265625,14.8281206 131.296875,15.703125 C131.807294,14.8281206 132.330726,14.1666689 132.867188,13.71875 C133.403649,13.2708311 134.119787,13.046875 135.015625,13.046875 C135.911463,13.046875 136.781246,13.2708311 137.625,13.71875 C138.468754,14.1666689 138.890625,14.760413 138.890625,15.5 C138.890625,16.0208359 138.710939,16.4505191 138.351562,16.7890625 C137.992186,17.1276059 137.604169,17.296875 137.1875,17.296875 C137.031249,17.296875 136.653649,17.2005218 136.054688,17.0078125 C135.455726,16.8151032 134.927086,16.71875 134.46875,16.71875 C133.843747,16.71875 133.333335,16.8828109 132.9375,17.2109375 C132.541665,17.5390641 132.234376,18.0260384 132.015625,18.671875 C131.796874,19.3177116 131.645834,20.085933 131.5625,20.9765625 C131.479166,21.867192 131.4375,22.9531186 131.4375,24.234375 Z M152.328125,22.765625 L143.984375,22.765625 C143.994792,23.7343798 144.190102,24.588538 144.570312,25.328125 C144.950523,26.067712 145.455726,26.6249981 146.085938,27 C146.716149,27.3750019 147.411455,27.5625 148.171875,27.5625 C148.682294,27.5625 149.148435,27.5026048 149.570312,27.3828125 C149.99219,27.2630202 150.40104,27.0755221 150.796875,26.8203125 C151.19271,26.5651029 151.55729,26.2916681 151.890625,26 C152.22396,25.7083319 152.656247,25.3125025 153.1875,24.8125 C153.406251,24.6249991 153.718748,24.53125 154.125,24.53125 C154.562502,24.53125 154.916665,24.6510405 155.1875,24.890625 C155.458335,25.1302095 155.59375,25.4687478 155.59375,25.90625 C155.59375,26.2916686 155.44271,26.7421849 155.140625,27.2578125 C154.83854,27.7734401 154.382816,28.2682268 153.773438,28.7421875 C153.164059,29.2161482 152.398442,29.6093734 151.476562,29.921875 C150.554683,30.2343766 149.494798,30.390625 148.296875,30.390625 C145.557278,30.390625 143.427091,29.6093828 141.90625,28.046875 C140.385409,26.4843672 139.625,24.3645967 139.625,21.6875 C139.625,20.427077 139.812498,19.2578179 140.1875,18.1796875 C140.562502,17.1015571 141.109371,16.1770872 141.828125,15.40625 C142.546879,14.6354128 143.432286,14.0442729 144.484375,13.6328125 C145.536464,13.2213521 146.703119,13.015625 147.984375,13.015625 C149.65105,13.015625 151.080723,13.367184 152.273438,14.0703125 C153.466152,14.773441 154.359372,15.6822861 154.953125,16.796875 C155.546878,17.9114639 155.84375,19.0468692 155.84375,20.203125 C155.84375,21.276047 155.536461,21.9713526 154.921875,22.2890625 C154.307289,22.6067724 153.442714,22.765625 152.328125,22.765625 Z M143.984375,20.34375 L151.71875,20.34375 C151.614583,18.8854094 151.221358,17.7942745 150.539062,17.0703125 C149.856767,16.3463505 148.958339,15.984375 147.84375,15.984375 C146.781245,15.984375 145.908858,16.3515588 145.226562,17.0859375 C144.544267,17.8203162 144.130209,18.9062428 143.984375,20.34375 Z M161.65625,15.703125 L165.109375,25.390625 L168.828125,15.28125 C169.119793,14.4687459 169.406249,13.8932309 169.6875,13.5546875 C169.968751,13.2161441 170.39583,13.046875 170.96875,13.046875 C171.510419,13.046875 171.971352,13.2291648 172.351562,13.59375 C172.731773,13.9583352 172.921875,14.3802059 172.921875,14.859375 C172.921875,15.0468759 172.888021,15.2656237 172.820312,15.515625 C172.752604,15.7656263 172.67448,15.9999989 172.585938,16.21875 C172.497395,16.4375011 172.395834,16.6874986 172.28125,16.96875 L168.1875,27.125 C168.072916,27.4166681 167.92448,27.7864561 167.742188,28.234375 C167.559895,28.6822939 167.356772,29.0651026 167.132812,29.3828125 C166.908853,29.7005224 166.632814,29.9479158 166.304688,30.125 C165.976561,30.3020842 165.578127,30.390625 165.109375,30.390625 C164.505205,30.390625 164.023439,30.2526055 163.664062,29.9765625 C163.304686,29.7005195 163.039063,29.3984391 162.867188,29.0703125 C162.695312,28.7421859 162.406252,28.0937548 162,27.125 L157.9375,17.078125 C157.84375,16.8281237 157.747396,16.5781263 157.648438,16.328125 C157.549479,16.0781237 157.466146,15.822918 157.398438,15.5625 C157.330729,15.302082 157.296875,15.0781259 157.296875,14.890625 C157.296875,14.5989569 157.385416,14.3098973 157.5625,14.0234375 C157.739584,13.7369777 157.984373,13.5026051 158.296875,13.3203125 C158.609377,13.1380199 158.947915,13.046875 159.3125,13.046875 C160.020837,13.046875 160.507811,13.249998 160.773438,13.65625 C161.039064,14.062502 161.333332,14.7447869 161.65625,15.703125 Z',
11
12
  fill: '#3F72AF'
@@ -6,6 +6,12 @@ import type { ToplineService } from './modules/topline-service/index.js';
6
6
  export type ToplineProps = {
7
7
  /** User to use in SSR */
8
8
  ssrUser?: ToplineUser | null;
9
+ /**
10
+ * If set to `true`, the link to the home page opens the home page in a separate window.
11
+ *
12
+ * For use in PWA.
13
+ */
14
+ forceBlankHomeLink?: boolean;
9
15
  /** Callback that is invoked after user is restored from a local DB */
10
16
  onReady?: (toplineService: ToplineService, user: ToplineUser | null) => unknown;
11
17
  /**
@@ -7,6 +7,7 @@ import { ToplineContext, Shell } from './parts/shell/index.js';
7
7
  export default function Topline(props) {
8
8
  const {
9
9
  ssrUser = null,
10
+ forceBlankHomeLink = false,
10
11
  onReady = () => undefined,
11
12
  onError = () => undefined
12
13
  } = props;
@@ -18,6 +19,7 @@ export default function Topline(props) {
18
19
  }, []);
19
20
  const context = {
20
21
  ssrUser: isSsrUserConsumed ? null : ssrUser,
22
+ forceBlankHomeLink,
21
23
  user,
22
24
  handleUserChange,
23
25
  onReady,
@@ -3,6 +3,7 @@ import type { ToplineUser } from '../../types/data.js';
3
3
  import type { ToplineService } from '../../modules/topline-service/index.js';
4
4
  export type InnerToplineContext = {
5
5
  ssrUser: ToplineUser | null;
6
+ forceBlankHomeLink: boolean;
6
7
  user: ToplineUser | null;
7
8
  handleUserChange: (user: ToplineUser | null) => unknown;
8
9
  onReady: (toplineService: ToplineService, user: ToplineUser | null) => unknown;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export default React.createContext({
3
3
  ssrUser: null,
4
+ forceBlankHomeLink: false,
4
5
  user: null,
5
6
  handleUserChange: () => undefined,
6
7
  onReady: () => undefined,
@@ -1 +1,2 @@
1
- export default function Logo(): import("react/jsx-runtime").JSX.Element;
1
+ import { type JSX } from 'react';
2
+ export default function Logo(): JSX.Element;
@@ -1,8 +1,16 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext } from 'react';
2
3
  import LogoFull from './logo-full.js';
3
4
  import LogoShort from './logo-short.js';
5
+ import ToplineContext from '../../context.js';
4
6
  export default function Logo() {
5
- return _jsxs(_Fragment, {
7
+ const {
8
+ forceBlankHomeLink
9
+ } = useContext(ToplineContext);
10
+ return _jsxs("a", {
11
+ href: '/',
12
+ "aria-label": "Главная страница",
13
+ target: forceBlankHomeLink ? '_blank' : undefined,
6
14
  children: [_jsx(LogoFull, {}), _jsx(LogoShort, {})]
7
15
  });
8
16
  }
@@ -6,6 +6,7 @@ export default function LogoFull() {
6
6
  height: '40',
7
7
  viewBox: '0 0 300 40',
8
8
  className: 'topline_shell_fullLogo',
9
+ role: 'presentation',
9
10
  children: [_jsx("path", {
10
11
  d: 'M207.4375,24.234375 L207.4375,27.796875 C207.4375,28.6614627 207.234377,29.3098937 206.828125,29.7421875 C206.421873,30.1744813 205.906253,30.390625 205.28125,30.390625 C204.666664,30.390625 204.16146,30.1718772 203.765625,29.734375 C203.36979,29.2968728 203.171875,28.6510459 203.171875,27.796875 L203.171875,15.921875 C203.171875,14.0051988 203.864576,13.046875 205.25,13.046875 C205.958337,13.046875 206.468748,13.2708311 206.78125,13.71875 C207.093752,14.1666689 207.265625,14.8281206 207.296875,15.703125 C207.807294,14.8281206 208.330726,14.1666689 208.867188,13.71875 C209.403649,13.2708311 210.119787,13.046875 211.015625,13.046875 C211.911463,13.046875 212.781246,13.2708311 213.625,13.71875 C214.468754,14.1666689 214.890625,14.760413 214.890625,15.5 C214.890625,16.0208359 214.710939,16.4505191 214.351562,16.7890625 C213.992186,17.1276059 213.604169,17.296875 213.1875,17.296875 C213.031249,17.296875 212.653649,17.2005218 212.054688,17.0078125 C211.455726,16.8151032 210.927086,16.71875 210.46875,16.71875 C209.843747,16.71875 209.333335,16.8828109 208.9375,17.2109375 C208.541665,17.5390641 208.234376,18.0260384 208.015625,18.671875 C207.796874,19.3177116 207.645834,20.085933 207.5625,20.9765625 C207.479166,21.867192 207.4375,22.9531186 207.4375,24.234375 Z M228.328125,22.765625 L219.984375,22.765625 C219.994792,23.7343798 220.190102,24.588538 220.570312,25.328125 C220.950523,26.067712 221.455726,26.6249981 222.085938,27 C222.716149,27.3750019 223.411455,27.5625 224.171875,27.5625 C224.682294,27.5625 225.148435,27.5026048 225.570312,27.3828125 C225.99219,27.2630202 226.40104,27.0755221 226.796875,26.8203125 C227.19271,26.5651029 227.55729,26.2916681 227.890625,26 C228.22396,25.7083319 228.656247,25.3125025 229.1875,24.8125 C229.406251,24.6249991 229.718748,24.53125 230.125,24.53125 C230.562502,24.53125 230.916665,24.6510405 231.1875,24.890625 C231.458335,25.1302095 231.59375,25.4687478 231.59375,25.90625 C231.59375,26.2916686 231.44271,26.7421849 231.140625,27.2578125 C230.83854,27.7734401 230.382816,28.2682268 229.773438,28.7421875 C229.164059,29.2161482 228.398442,29.6093734 227.476562,29.921875 C226.554683,30.2343766 225.494798,30.390625 224.296875,30.390625 C221.557278,30.390625 219.427091,29.6093828 217.90625,28.046875 C216.385409,26.4843672 215.625,24.3645967 215.625,21.6875 C215.625,20.427077 215.812498,19.2578179 216.1875,18.1796875 C216.562502,17.1015571 217.109371,16.1770872 217.828125,15.40625 C218.546879,14.6354128 219.432286,14.0442729 220.484375,13.6328125 C221.536464,13.2213521 222.703119,13.015625 223.984375,13.015625 C225.65105,13.015625 227.080723,13.367184 228.273438,14.0703125 C229.466152,14.773441 230.359372,15.6822861 230.953125,16.796875 C231.546878,17.9114639 231.84375,19.0468692 231.84375,20.203125 C231.84375,21.276047 231.536461,21.9713526 230.921875,22.2890625 C230.307289,22.6067724 229.442714,22.765625 228.328125,22.765625 Z M219.984375,20.34375 L227.71875,20.34375 C227.614583,18.8854094 227.221358,17.7942745 226.539062,17.0703125 C225.856767,16.3463505 224.958339,15.984375 223.84375,15.984375 C222.781245,15.984375 221.908858,16.3515588 221.226562,17.0859375 C220.544267,17.8203162 220.130209,18.9062428 219.984375,20.34375 Z M237.65625,15.703125 L241.109375,25.390625 L244.828125,15.28125 C245.119793,14.4687459 245.406249,13.8932309 245.6875,13.5546875 C245.968751,13.2161441 246.39583,13.046875 246.96875,13.046875 C247.510419,13.046875 247.971352,13.2291648 248.351562,13.59375 C248.731773,13.9583352 248.921875,14.3802059 248.921875,14.859375 C248.921875,15.0468759 248.888021,15.2656237 248.820312,15.515625 C248.752604,15.7656263 248.67448,15.9999989 248.585938,16.21875 C248.497395,16.4375011 248.395834,16.6874986 248.28125,16.96875 L244.1875,27.125 C244.072916,27.4166681 243.92448,27.7864561 243.742188,28.234375 C243.559895,28.6822939 243.356772,29.0651026 243.132812,29.3828125 C242.908853,29.7005224 242.632814,29.9479158 242.304688,30.125 C241.976561,30.3020842 241.578127,30.390625 241.109375,30.390625 C240.505205,30.390625 240.023439,30.2526055 239.664062,29.9765625 C239.304686,29.7005195 239.039063,29.3984391 238.867188,29.0703125 C238.695312,28.7421859 238.406252,28.0937548 238,27.125 L233.9375,17.078125 C233.84375,16.8281237 233.747396,16.5781263 233.648438,16.328125 C233.549479,16.0781237 233.466146,15.822918 233.398438,15.5625 C233.330729,15.302082 233.296875,15.0781259 233.296875,14.890625 C233.296875,14.5989569 233.385416,14.3098973 233.5625,14.0234375 C233.739584,13.7369777 233.984373,13.5026051 234.296875,13.3203125 C234.609377,13.1380199 234.947915,13.046875 235.3125,13.046875 C236.020837,13.046875 236.507811,13.249998 236.773438,13.65625 C237.039064,14.062502 237.333332,14.7447869 237.65625,15.703125 Z M256.25,15.46875 L256.25,27.796875 C256.25,28.6510459 256.046877,29.2968728 255.640625,29.734375 C255.234373,30.1718772 254.718753,30.390625 254.09375,30.390625 C253.468747,30.390625 252.960939,30.1666689 252.570312,29.71875 C252.179686,29.2708311 251.984375,28.6302125 251.984375,27.796875 L251.984375,15.59375 C251.984375,14.7499958 252.179686,14.1145855 252.570312,13.6875 C252.960939,13.2604145 253.468747,13.046875 254.09375,13.046875 C254.718753,13.046875 255.234373,13.2604145 255.640625,13.6875 C256.046877,14.1145855 256.25,14.7083295 256.25,15.46875 Z M254.140625,11.0625 C253.546872,11.0625 253.039065,10.8802102 252.617188,10.515625 C252.19531,10.1510398 251.984375,9.63542 251.984375,8.96875 C251.984375,8.36458031 252.200519,7.86718945 252.632812,7.4765625 C253.065106,7.08593555 253.567705,6.890625 254.140625,6.890625 C254.692711,6.890625 255.18229,7.06770656 255.609375,7.421875 C256.03646,7.77604344 256.25,8.29166328 256.25,8.96875 C256.25,9.62500328 256.041669,10.138019 255.625,10.5078125 C255.208331,10.877606 254.713545,11.0625 254.140625,11.0625 Z M274.390625,24.8125 C274.390625,25.9895892 274.10417,26.9973916 273.53125,27.8359375 C272.95833,28.6744834 272.111985,29.3098937 270.992188,29.7421875 C269.87239,30.1744813 268.510425,30.390625 266.90625,30.390625 C265.374992,30.390625 264.062505,30.1562523 262.96875,29.6875 C261.874995,29.2187477 261.067711,28.632816 260.546875,27.9296875 C260.026039,27.226559 259.765625,26.5208369 259.765625,25.8125 C259.765625,25.3437477 259.93229,24.94271 260.265625,24.609375 C260.59896,24.27604 261.020831,24.109375 261.53125,24.109375 C261.979169,24.109375 262.322915,24.2187489 262.5625,24.4375 C262.802085,24.6562511 263.031249,24.9635397 263.25,25.359375 C263.687502,26.1197955 264.210934,26.6874981 264.820312,27.0625 C265.429691,27.4375019 266.260411,27.625 267.3125,27.625 C268.166671,27.625 268.867185,27.4348977 269.414062,27.0546875 C269.96094,26.6744773 270.234375,26.2395858 270.234375,25.75 C270.234375,24.9999962 269.950524,24.4531267 269.382812,24.109375 C268.815101,23.7656233 267.880215,23.4375016 266.578125,23.125 C265.109368,22.7604148 263.914067,22.3776062 262.992188,21.9765625 C262.070308,21.5755188 261.333336,21.0468783 260.78125,20.390625 C260.229164,19.7343717 259.953125,18.9270881 259.953125,17.96875 C259.953125,17.1145791 260.208331,16.3072955 260.71875,15.546875 C261.229169,14.7864545 261.981766,14.1796898 262.976562,13.7265625 C263.971359,13.2734352 265.171868,13.046875 266.578125,13.046875 C267.682297,13.046875 268.674475,13.1614572 269.554688,13.390625 C270.4349,13.6197928 271.169268,13.9270814 271.757812,14.3125 C272.346357,14.6979186 272.794269,15.1249977 273.101562,15.59375 C273.408856,16.0625023 273.5625,16.5208311 273.5625,16.96875 C273.5625,17.4583358 273.398439,17.8593734 273.070312,18.171875 C272.742186,18.4843766 272.276045,18.640625 271.671875,18.640625 C271.234373,18.640625 270.861981,18.5156263 270.554688,18.265625 C270.247394,18.0156237 269.895835,17.6406275 269.5,17.140625 C269.177082,16.7239563 268.796877,16.3906263 268.359375,16.140625 C267.921873,15.8906237 267.328129,15.765625 266.578125,15.765625 C265.807288,15.765625 265.166669,15.9296859 264.65625,16.2578125 C264.145831,16.5859391 263.890625,16.9947892 263.890625,17.484375 C263.890625,17.9322939 264.078123,18.2994777 264.453125,18.5859375 C264.828127,18.8723973 265.33333,19.1093741 265.96875,19.296875 C266.60417,19.4843759 267.479161,19.7135403 268.59375,19.984375 C269.916673,20.3072933 270.997392,20.6927061 271.835938,21.140625 C272.674483,21.5885439 273.309894,22.1171845 273.742188,22.7265625 C274.174481,23.3359405 274.390625,24.0312461 274.390625,24.8125 Z M289.90625,22.765625 L281.5625,22.765625 C281.572917,23.7343798 281.768227,24.588538 282.148438,25.328125 C282.528648,26.067712 283.033851,26.6249981 283.664062,27 C284.294274,27.3750019 284.98958,27.5625 285.75,27.5625 C286.260419,27.5625 286.72656,27.5026048 287.148438,27.3828125 C287.570315,27.2630202 287.979165,27.0755221 288.375,26.8203125 C288.770835,26.5651029 289.135415,26.2916681 289.46875,26 C289.802085,25.7083319 290.234372,25.3125025 290.765625,24.8125 C290.984376,24.6249991 291.296873,24.53125 291.703125,24.53125 C292.140627,24.53125 292.49479,24.6510405 292.765625,24.890625 C293.03646,25.1302095 293.171875,25.4687478 293.171875,25.90625 C293.171875,26.2916686 293.020835,26.7421849 292.71875,27.2578125 C292.416665,27.7734401 291.960941,28.2682268 291.351562,28.7421875 C290.742184,29.2161482 289.976567,29.6093734 289.054688,29.921875 C288.132808,30.2343766 287.072923,30.390625 285.875,30.390625 C283.135403,30.390625 281.005216,29.6093828 279.484375,28.046875 C277.963534,26.4843672 277.203125,24.3645967 277.203125,21.6875 C277.203125,20.427077 277.390623,19.2578179 277.765625,18.1796875 C278.140627,17.1015571 278.687496,16.1770872 279.40625,15.40625 C280.125004,14.6354128 281.010411,14.0442729 282.0625,13.6328125 C283.114589,13.2213521 284.281244,13.015625 285.5625,13.015625 C287.229175,13.015625 288.658848,13.367184 289.851562,14.0703125 C291.044277,14.773441 291.937497,15.6822861 292.53125,16.796875 C293.125003,17.9114639 293.421875,19.0468692 293.421875,20.203125 C293.421875,21.276047 293.114586,21.9713526 292.5,22.2890625 C291.885414,22.6067724 291.020839,22.765625 289.90625,22.765625 Z M281.5625,20.34375 L289.296875,20.34375 C289.192708,18.8854094 288.799483,17.7942745 288.117188,17.0703125 C287.434892,16.3463505 286.536464,15.984375 285.421875,15.984375 C284.35937,15.984375 283.486983,16.3515588 282.804688,17.0859375 C282.122392,17.8203162 281.708334,18.9062428 281.5625,20.34375 Z',
11
12
  fill: '#3F72AF'
@@ -6,6 +6,7 @@ export default function LogoShort() {
6
6
  height: '40',
7
7
  viewBox: '0 0 180 40',
8
8
  className: 'topline_shell_shortLogo',
9
+ role: 'presentation',
9
10
  children: [_jsx("path", {
10
11
  d: 'M131.4375,24.234375 L131.4375,27.796875 C131.4375,28.6614627 131.234377,29.3098937 130.828125,29.7421875 C130.421873,30.1744813 129.906253,30.390625 129.28125,30.390625 C128.666664,30.390625 128.16146,30.1718772 127.765625,29.734375 C127.36979,29.2968728 127.171875,28.6510459 127.171875,27.796875 L127.171875,15.921875 C127.171875,14.0051988 127.864576,13.046875 129.25,13.046875 C129.958337,13.046875 130.468748,13.2708311 130.78125,13.71875 C131.093752,14.1666689 131.265625,14.8281206 131.296875,15.703125 C131.807294,14.8281206 132.330726,14.1666689 132.867188,13.71875 C133.403649,13.2708311 134.119787,13.046875 135.015625,13.046875 C135.911463,13.046875 136.781246,13.2708311 137.625,13.71875 C138.468754,14.1666689 138.890625,14.760413 138.890625,15.5 C138.890625,16.0208359 138.710939,16.4505191 138.351562,16.7890625 C137.992186,17.1276059 137.604169,17.296875 137.1875,17.296875 C137.031249,17.296875 136.653649,17.2005218 136.054688,17.0078125 C135.455726,16.8151032 134.927086,16.71875 134.46875,16.71875 C133.843747,16.71875 133.333335,16.8828109 132.9375,17.2109375 C132.541665,17.5390641 132.234376,18.0260384 132.015625,18.671875 C131.796874,19.3177116 131.645834,20.085933 131.5625,20.9765625 C131.479166,21.867192 131.4375,22.9531186 131.4375,24.234375 Z M152.328125,22.765625 L143.984375,22.765625 C143.994792,23.7343798 144.190102,24.588538 144.570312,25.328125 C144.950523,26.067712 145.455726,26.6249981 146.085938,27 C146.716149,27.3750019 147.411455,27.5625 148.171875,27.5625 C148.682294,27.5625 149.148435,27.5026048 149.570312,27.3828125 C149.99219,27.2630202 150.40104,27.0755221 150.796875,26.8203125 C151.19271,26.5651029 151.55729,26.2916681 151.890625,26 C152.22396,25.7083319 152.656247,25.3125025 153.1875,24.8125 C153.406251,24.6249991 153.718748,24.53125 154.125,24.53125 C154.562502,24.53125 154.916665,24.6510405 155.1875,24.890625 C155.458335,25.1302095 155.59375,25.4687478 155.59375,25.90625 C155.59375,26.2916686 155.44271,26.7421849 155.140625,27.2578125 C154.83854,27.7734401 154.382816,28.2682268 153.773438,28.7421875 C153.164059,29.2161482 152.398442,29.6093734 151.476562,29.921875 C150.554683,30.2343766 149.494798,30.390625 148.296875,30.390625 C145.557278,30.390625 143.427091,29.6093828 141.90625,28.046875 C140.385409,26.4843672 139.625,24.3645967 139.625,21.6875 C139.625,20.427077 139.812498,19.2578179 140.1875,18.1796875 C140.562502,17.1015571 141.109371,16.1770872 141.828125,15.40625 C142.546879,14.6354128 143.432286,14.0442729 144.484375,13.6328125 C145.536464,13.2213521 146.703119,13.015625 147.984375,13.015625 C149.65105,13.015625 151.080723,13.367184 152.273438,14.0703125 C153.466152,14.773441 154.359372,15.6822861 154.953125,16.796875 C155.546878,17.9114639 155.84375,19.0468692 155.84375,20.203125 C155.84375,21.276047 155.536461,21.9713526 154.921875,22.2890625 C154.307289,22.6067724 153.442714,22.765625 152.328125,22.765625 Z M143.984375,20.34375 L151.71875,20.34375 C151.614583,18.8854094 151.221358,17.7942745 150.539062,17.0703125 C149.856767,16.3463505 148.958339,15.984375 147.84375,15.984375 C146.781245,15.984375 145.908858,16.3515588 145.226562,17.0859375 C144.544267,17.8203162 144.130209,18.9062428 143.984375,20.34375 Z M161.65625,15.703125 L165.109375,25.390625 L168.828125,15.28125 C169.119793,14.4687459 169.406249,13.8932309 169.6875,13.5546875 C169.968751,13.2161441 170.39583,13.046875 170.96875,13.046875 C171.510419,13.046875 171.971352,13.2291648 172.351562,13.59375 C172.731773,13.9583352 172.921875,14.3802059 172.921875,14.859375 C172.921875,15.0468759 172.888021,15.2656237 172.820312,15.515625 C172.752604,15.7656263 172.67448,15.9999989 172.585938,16.21875 C172.497395,16.4375011 172.395834,16.6874986 172.28125,16.96875 L168.1875,27.125 C168.072916,27.4166681 167.92448,27.7864561 167.742188,28.234375 C167.559895,28.6822939 167.356772,29.0651026 167.132812,29.3828125 C166.908853,29.7005224 166.632814,29.9479158 166.304688,30.125 C165.976561,30.3020842 165.578127,30.390625 165.109375,30.390625 C164.505205,30.390625 164.023439,30.2526055 163.664062,29.9765625 C163.304686,29.7005195 163.039063,29.3984391 162.867188,29.0703125 C162.695312,28.7421859 162.406252,28.0937548 162,27.125 L157.9375,17.078125 C157.84375,16.8281237 157.747396,16.5781263 157.648438,16.328125 C157.549479,16.0781237 157.466146,15.822918 157.398438,15.5625 C157.330729,15.302082 157.296875,15.0781259 157.296875,14.890625 C157.296875,14.5989569 157.385416,14.3098973 157.5625,14.0234375 C157.739584,13.7369777 157.984373,13.5026051 158.296875,13.3203125 C158.609377,13.1380199 158.947915,13.046875 159.3125,13.046875 C160.020837,13.046875 160.507811,13.249998 160.773438,13.65625 C161.039064,14.062502 161.333332,14.7447869 161.65625,15.703125 Z',
11
12
  fill: '#3F72AF'
@@ -6,6 +6,12 @@ import type { ToplineService } from './modules/topline-service/index.js';
6
6
  export type ToplineProps = {
7
7
  /** User to use in SSR */
8
8
  ssrUser?: ToplineUser | null;
9
+ /**
10
+ * If set to `true`, the link to the home page opens the home page in a separate window.
11
+ *
12
+ * For use in PWA.
13
+ */
14
+ forceBlankHomeLink?: boolean;
9
15
  /** Callback that is invoked after user is restored from a local DB */
10
16
  onReady?: (toplineService: ToplineService, user: ToplineUser | null) => unknown;
11
17
  /**
@@ -7,6 +7,7 @@ import { ToplineContext, Shell } from './parts/shell/index.js';
7
7
  export default function Topline(props) {
8
8
  const {
9
9
  ssrUser = null,
10
+ forceBlankHomeLink = false,
10
11
  onReady = () => undefined,
11
12
  onError = () => undefined
12
13
  } = props;
@@ -18,6 +19,7 @@ export default function Topline(props) {
18
19
  }, []);
19
20
  const context = {
20
21
  ssrUser: isSsrUserConsumed ? null : ssrUser,
22
+ forceBlankHomeLink,
21
23
  user,
22
24
  handleUserChange,
23
25
  onReady,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peassoft/mnr-web-topline",
3
- "version": "2.0.0",
3
+ "version": "2.2.0",
4
4
  "description": "Peassoft Topline widget for mem'n'rev web applications",
5
5
  "type": "module",
6
6
  "exports": {