@equinor/roma-framework 2.0.3 → 3.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.
@@ -0,0 +1 @@
1
+ export declare const queryInvalidationChannel: BroadcastChannel;
@@ -3,9 +3,9 @@ import { Path } from '@equinor/fusion-framework-module-navigation';
3
3
  import { NavigationType } from 'react-router-dom';
4
4
  import { Action } from '@remix-run/router/history';
5
5
  import { AccountInfo } from '@equinor/fusion-framework-module-msal';
6
- import { AuthClient, AuthRequest } from '@equinor/fusion-framework-module-msal/client';
7
6
  import { Service } from '@equinor/fusion-framework-module-service-discovery';
8
7
  import { ServerSentEvent, SseConnection } from '../../../../modules/sse/src/index.ts';
8
+ import { AuthClient, AuthRequest } from '@equinor/fusion-framework-module-msal/dist/types/v2/client';
9
9
  export declare class RomaMockedServiceDiscovery {
10
10
  readonly environment: {
11
11
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/roma-framework",
3
- "version": "2.0.3",
3
+ "version": "3.0.0",
4
4
  "repository": "https://github.com/equinor/tops-roma",
5
5
  "types": "./index.d.ts",
6
6
  "private": false,
@@ -13,9 +13,9 @@
13
13
  "require": "./roma-framework.js"
14
14
  },
15
15
  "./cypress": {
16
+ "types": "./lib/test-utils/roma-cypress-wrapper.d.ts",
16
17
  "import": "./cypress.mjs",
17
- "require": "./cypress.js",
18
- "types": "./lib/test-utils/roma-cypress-wrapper.d.ts"
18
+ "require": "./cypress.js"
19
19
  }
20
20
  }
21
- }
21
+ }
@@ -14,14 +14,13 @@ import { useState, useEffect, lazy, useRef, createContext, useContext, useMemo }
14
14
  import { ModuleProvider } from "@equinor/fusion-framework-react-module";
15
15
  import styled, { StyleSheetManager, keyframes } from "styled-components";
16
16
  import { EdsProvider, StarProgress, Typography, Card, Button, TopBar, SideSheet, Menu, Tooltip, Icon } from "@equinor/eds-core-react";
17
- import { E as EmptyError, o as operate, c as createOperatorSubscriber, i as innerFrom, a as identity, b as isFunction, I as IntlProvider, d as invariant, j as joinPaths, g as getPathContributingMatches, w as warning, r as resolveTo, s as stripBasename, e as createPath, B as BehaviorSubject, f as firstValueFrom, h as of, k as from } from "./router-CD1QGwNJ.mjs";
17
+ import { E as EmptyError, o as operate, c as createOperatorSubscriber, i as innerFrom, a as identity, b as isFunction, I as IntlProvider, d as invariant, j as joinPaths, g as getPathContributingMatches, r as resolveTo, w as warning, s as stripBasename, e as createPath, B as BehaviorSubject, f as firstValueFrom, h as getDefaultExportFromCjs, k as of, l as from } from "./router-DDzmmkip.mjs";
18
18
  import { QueryClient, QueryClientProvider, useQueryClient, useQuery, useMutation } from "@tanstack/react-query";
19
19
  import { useCurrentApp, useApps as useApps$1 } from "@equinor/fusion-framework-react/app";
20
20
  import { App } from "@equinor/fusion-framework-module-app/app";
21
21
  import { comment_more, accessible, account_circle, help_outline } from "@equinor/eds-icons";
22
22
  import { enableAppModule } from "@equinor/fusion-framework-module-app";
23
23
  import { enableContext } from "@equinor/fusion-framework-module-context";
24
- import { ConsoleLogger } from "@equinor/fusion-framework-module-msal/client";
25
24
  import { enableNavigation } from "@equinor/fusion-framework-module-navigation";
26
25
  import { ModuleConfigBuilder } from "@equinor/fusion-framework-module";
27
26
  import { enableServiceDiscovery } from "@equinor/fusion-framework-module-service-discovery";
@@ -176,9 +175,6 @@ const EdsEventProvider = ({ event, children }) => {
176
175
  }, [event]);
177
176
  return /* @__PURE__ */ jsx(EdsProvider, { density, children });
178
177
  };
179
- function getDefaultExportFromCjs(x) {
180
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
181
- }
182
178
  const makeComponent = (Component, args, configure2) => lazy(async () => {
183
179
  const init = configureModules(configure2);
184
180
  const modules = await init(args);
@@ -1181,17 +1177,6 @@ const HeaderMenu = ({ menuState }) => {
1181
1177
  if (tags.includes("liquids-operations")) return "10511";
1182
1178
  return "10540";
1183
1179
  };
1184
- useMemo(
1185
- () => ({
1186
- limit: 10,
1187
- filter: {
1188
- attributes: {
1189
- read: false
1190
- }
1191
- }
1192
- }),
1193
- []
1194
- );
1195
1180
  const feedbackArea = getFeedbackAreaFromTags(currentApp, applications);
1196
1181
  const toggleDensity = (newDensity) => {
1197
1182
  localStorage.setItem("roma__density", newDensity);
@@ -1275,8 +1260,8 @@ const HeaderMenu = ({ menuState }) => {
1275
1260
  /* @__PURE__ */ jsx(
1276
1261
  Menu.Item,
1277
1262
  {
1278
- onClick: () => auth.defaultClient.logoutRedirect({
1279
- postLogoutRedirectUri: window.location.origin
1263
+ onClick: () => auth.logout({
1264
+ redirectUri: window.location.origin
1280
1265
  }),
1281
1266
  children: "Sign out"
1282
1267
  }
@@ -1767,196 +1752,218 @@ function enableSse(configurator, name, optionsOrCallback) {
1767
1752
  });
1768
1753
  }
1769
1754
  }
1770
- function Cache(maxSize) {
1771
- this._maxSize = maxSize;
1772
- this.clear();
1773
- }
1774
- Cache.prototype.clear = function() {
1775
- this._size = 0;
1776
- this._values = /* @__PURE__ */ Object.create(null);
1777
- };
1778
- Cache.prototype.get = function(key) {
1779
- return this._values[key];
1780
- };
1781
- Cache.prototype.set = function(key, value) {
1782
- this._size >= this._maxSize && this.clear();
1783
- if (!(key in this._values)) this._size++;
1784
- return this._values[key] = value;
1785
- };
1786
- var SPLIT_REGEX = /[^.^\]^[]+|(?=\[\]|\.\.)/g, DIGIT_REGEX = /^\d+$/, LEAD_DIGIT_REGEX = /^\d/, SPEC_CHAR_REGEX = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g, CLEAN_QUOTES_REGEX = /^\s*(['"]?)(.*?)(\1)\s*$/, MAX_CACHE_SIZE = 512;
1787
- var pathCache = new Cache(MAX_CACHE_SIZE), setCache = new Cache(MAX_CACHE_SIZE), getCache = new Cache(MAX_CACHE_SIZE);
1788
- var propertyExpr = {
1789
- Cache,
1790
- split,
1791
- normalizePath,
1792
- setter: function(path) {
1793
- var parts = normalizePath(path);
1794
- return setCache.get(path) || setCache.set(path, function setter(obj, value) {
1795
- var index = 0;
1796
- var len = parts.length;
1797
- var data = obj;
1798
- while (index < len - 1) {
1799
- var part = parts[index];
1800
- if (part === "__proto__" || part === "constructor" || part === "prototype") {
1801
- return obj;
1755
+ var propertyExpr;
1756
+ var hasRequiredPropertyExpr;
1757
+ function requirePropertyExpr() {
1758
+ if (hasRequiredPropertyExpr) return propertyExpr;
1759
+ hasRequiredPropertyExpr = 1;
1760
+ function Cache(maxSize) {
1761
+ this._maxSize = maxSize;
1762
+ this.clear();
1763
+ }
1764
+ Cache.prototype.clear = function() {
1765
+ this._size = 0;
1766
+ this._values = /* @__PURE__ */ Object.create(null);
1767
+ };
1768
+ Cache.prototype.get = function(key) {
1769
+ return this._values[key];
1770
+ };
1771
+ Cache.prototype.set = function(key, value) {
1772
+ this._size >= this._maxSize && this.clear();
1773
+ if (!(key in this._values)) this._size++;
1774
+ return this._values[key] = value;
1775
+ };
1776
+ var SPLIT_REGEX = /[^.^\]^[]+|(?=\[\]|\.\.)/g, DIGIT_REGEX = /^\d+$/, LEAD_DIGIT_REGEX = /^\d/, SPEC_CHAR_REGEX = /[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g, CLEAN_QUOTES_REGEX = /^\s*(['"]?)(.*?)(\1)\s*$/, MAX_CACHE_SIZE = 512;
1777
+ var pathCache = new Cache(MAX_CACHE_SIZE), setCache = new Cache(MAX_CACHE_SIZE), getCache = new Cache(MAX_CACHE_SIZE);
1778
+ propertyExpr = {
1779
+ Cache,
1780
+ split,
1781
+ normalizePath,
1782
+ setter: function(path) {
1783
+ var parts = normalizePath(path);
1784
+ return setCache.get(path) || setCache.set(path, function setter(obj, value) {
1785
+ var index = 0;
1786
+ var len = parts.length;
1787
+ var data = obj;
1788
+ while (index < len - 1) {
1789
+ var part = parts[index];
1790
+ if (part === "__proto__" || part === "constructor" || part === "prototype") {
1791
+ return obj;
1792
+ }
1793
+ data = data[parts[index++]];
1802
1794
  }
1803
- data = data[parts[index++]];
1804
- }
1805
- data[parts[index]] = value;
1806
- });
1807
- },
1808
- getter: function(path, safe) {
1809
- var parts = normalizePath(path);
1810
- return getCache.get(path) || getCache.set(path, function getter(data) {
1811
- var index = 0, len = parts.length;
1812
- while (index < len) {
1813
- if (data != null || !safe) data = data[parts[index++]];
1814
- else return;
1815
- }
1816
- return data;
1817
- });
1818
- },
1819
- join: function(segments) {
1820
- return segments.reduce(function(path, part) {
1821
- return path + (isQuoted(part) || DIGIT_REGEX.test(part) ? "[" + part + "]" : (path ? "." : "") + part);
1822
- }, "");
1823
- },
1824
- forEach: function(path, cb, thisArg) {
1825
- forEach(Array.isArray(path) ? path : split(path), cb, thisArg);
1795
+ data[parts[index]] = value;
1796
+ });
1797
+ },
1798
+ getter: function(path, safe) {
1799
+ var parts = normalizePath(path);
1800
+ return getCache.get(path) || getCache.set(path, function getter(data) {
1801
+ var index = 0, len = parts.length;
1802
+ while (index < len) {
1803
+ if (data != null || !safe) data = data[parts[index++]];
1804
+ else return;
1805
+ }
1806
+ return data;
1807
+ });
1808
+ },
1809
+ join: function(segments) {
1810
+ return segments.reduce(function(path, part) {
1811
+ return path + (isQuoted(part) || DIGIT_REGEX.test(part) ? "[" + part + "]" : (path ? "." : "") + part);
1812
+ }, "");
1813
+ },
1814
+ forEach: function(path, cb, thisArg) {
1815
+ forEach(Array.isArray(path) ? path : split(path), cb, thisArg);
1816
+ }
1817
+ };
1818
+ function normalizePath(path) {
1819
+ return pathCache.get(path) || pathCache.set(
1820
+ path,
1821
+ split(path).map(function(part) {
1822
+ return part.replace(CLEAN_QUOTES_REGEX, "$2");
1823
+ })
1824
+ );
1826
1825
  }
1827
- };
1828
- function normalizePath(path) {
1829
- return pathCache.get(path) || pathCache.set(
1830
- path,
1831
- split(path).map(function(part) {
1832
- return part.replace(CLEAN_QUOTES_REGEX, "$2");
1833
- })
1834
- );
1835
- }
1836
- function split(path) {
1837
- return path.match(SPLIT_REGEX) || [""];
1838
- }
1839
- function forEach(parts, iter, thisArg) {
1840
- var len = parts.length, part, idx, isArray, isBracket;
1841
- for (idx = 0; idx < len; idx++) {
1842
- part = parts[idx];
1843
- if (part) {
1844
- if (shouldBeQuoted(part)) {
1845
- part = '"' + part + '"';
1826
+ function split(path) {
1827
+ return path.match(SPLIT_REGEX) || [""];
1828
+ }
1829
+ function forEach(parts, iter, thisArg) {
1830
+ var len = parts.length, part, idx, isArray, isBracket;
1831
+ for (idx = 0; idx < len; idx++) {
1832
+ part = parts[idx];
1833
+ if (part) {
1834
+ if (shouldBeQuoted(part)) {
1835
+ part = '"' + part + '"';
1836
+ }
1837
+ isBracket = isQuoted(part);
1838
+ isArray = !isBracket && /^\d+$/.test(part);
1839
+ iter.call(thisArg, part, isBracket, isArray, idx, parts);
1846
1840
  }
1847
- isBracket = isQuoted(part);
1848
- isArray = !isBracket && /^\d+$/.test(part);
1849
- iter.call(thisArg, part, isBracket, isArray, idx, parts);
1850
1841
  }
1851
1842
  }
1843
+ function isQuoted(str) {
1844
+ return typeof str === "string" && str && ["'", '"'].indexOf(str.charAt(0)) !== -1;
1845
+ }
1846
+ function hasLeadingNumber(part) {
1847
+ return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX);
1848
+ }
1849
+ function hasSpecialChars(part) {
1850
+ return SPEC_CHAR_REGEX.test(part);
1851
+ }
1852
+ function shouldBeQuoted(part) {
1853
+ return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part));
1854
+ }
1855
+ return propertyExpr;
1852
1856
  }
1853
- function isQuoted(str) {
1854
- return typeof str === "string" && str && ["'", '"'].indexOf(str.charAt(0)) !== -1;
1855
- }
1856
- function hasLeadingNumber(part) {
1857
- return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX);
1858
- }
1859
- function hasSpecialChars(part) {
1860
- return SPEC_CHAR_REGEX.test(part);
1861
- }
1862
- function shouldBeQuoted(part) {
1863
- return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part));
1857
+ var propertyExprExports = requirePropertyExpr();
1858
+ var tinyCase;
1859
+ var hasRequiredTinyCase;
1860
+ function requireTinyCase() {
1861
+ if (hasRequiredTinyCase) return tinyCase;
1862
+ hasRequiredTinyCase = 1;
1863
+ const reWords = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g;
1864
+ const words = (str) => str.match(reWords) || [];
1865
+ const upperFirst = (str) => str[0].toUpperCase() + str.slice(1);
1866
+ const join = (str, d) => words(str).join(d).toLowerCase();
1867
+ const camelCase = (str) => words(str).reduce(
1868
+ (acc, next) => `${acc}${!acc ? next.toLowerCase() : next[0].toUpperCase() + next.slice(1).toLowerCase()}`,
1869
+ ""
1870
+ );
1871
+ const pascalCase = (str) => upperFirst(camelCase(str));
1872
+ const snakeCase = (str) => join(str, "_");
1873
+ const kebabCase = (str) => join(str, "-");
1874
+ const sentenceCase = (str) => upperFirst(join(str, " "));
1875
+ const titleCase = (str) => words(str).map(upperFirst).join(" ");
1876
+ tinyCase = {
1877
+ words,
1878
+ upperFirst,
1879
+ camelCase,
1880
+ pascalCase,
1881
+ snakeCase,
1882
+ kebabCase,
1883
+ sentenceCase,
1884
+ titleCase
1885
+ };
1886
+ return tinyCase;
1864
1887
  }
1865
- const reWords = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g;
1866
- const words = (str) => str.match(reWords) || [];
1867
- const upperFirst = (str) => str[0].toUpperCase() + str.slice(1);
1868
- const join = (str, d) => words(str).join(d).toLowerCase();
1869
- const camelCase = (str) => words(str).reduce(
1870
- (acc, next) => `${acc}${!acc ? next.toLowerCase() : next[0].toUpperCase() + next.slice(1).toLowerCase()}`,
1871
- ""
1872
- );
1873
- const pascalCase = (str) => upperFirst(camelCase(str));
1874
- const snakeCase = (str) => join(str, "_");
1875
- const kebabCase = (str) => join(str, "-");
1876
- const sentenceCase = (str) => upperFirst(join(str, " "));
1877
- const titleCase = (str) => words(str).map(upperFirst).join(" ");
1878
- var tinyCase = {
1879
- words,
1880
- upperFirst,
1881
- camelCase,
1882
- pascalCase,
1883
- snakeCase,
1884
- kebabCase,
1885
- sentenceCase,
1886
- titleCase
1887
- };
1888
- var toposort$2 = { exports: {} };
1889
- toposort$2.exports = function(edges) {
1890
- return toposort(uniqueNodes(edges), edges);
1891
- };
1892
- toposort$2.exports.array = toposort;
1893
- function toposort(nodes, edges) {
1894
- var cursor = nodes.length, sorted = new Array(cursor), visited = {}, i = cursor, outgoingEdges = makeOutgoingEdges(edges), nodesHash = makeNodesHash(nodes);
1895
- edges.forEach(function(edge) {
1896
- if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {
1897
- throw new Error("Unknown node. There is an unknown node in the supplied edges.");
1888
+ var tinyCaseExports = requireTinyCase();
1889
+ var toposort$1 = { exports: {} };
1890
+ var hasRequiredToposort;
1891
+ function requireToposort() {
1892
+ if (hasRequiredToposort) return toposort$1.exports;
1893
+ hasRequiredToposort = 1;
1894
+ toposort$1.exports = function(edges) {
1895
+ return toposort2(uniqueNodes(edges), edges);
1896
+ };
1897
+ toposort$1.exports.array = toposort2;
1898
+ function toposort2(nodes, edges) {
1899
+ var cursor = nodes.length, sorted = new Array(cursor), visited = {}, i = cursor, outgoingEdges = makeOutgoingEdges(edges), nodesHash = makeNodesHash(nodes);
1900
+ edges.forEach(function(edge) {
1901
+ if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {
1902
+ throw new Error("Unknown node. There is an unknown node in the supplied edges.");
1903
+ }
1904
+ });
1905
+ while (i--) {
1906
+ if (!visited[i]) visit(nodes[i], i, /* @__PURE__ */ new Set());
1898
1907
  }
1899
- });
1900
- while (i--) {
1901
- if (!visited[i]) visit(nodes[i], i, /* @__PURE__ */ new Set());
1902
- }
1903
- return sorted;
1904
- function visit(node, i2, predecessors) {
1905
- if (predecessors.has(node)) {
1906
- var nodeRep;
1907
- try {
1908
- nodeRep = ", node was:" + JSON.stringify(node);
1909
- } catch (e) {
1910
- nodeRep = "";
1908
+ return sorted;
1909
+ function visit(node, i2, predecessors) {
1910
+ if (predecessors.has(node)) {
1911
+ var nodeRep;
1912
+ try {
1913
+ nodeRep = ", node was:" + JSON.stringify(node);
1914
+ } catch (e) {
1915
+ nodeRep = "";
1916
+ }
1917
+ throw new Error("Cyclic dependency" + nodeRep);
1918
+ }
1919
+ if (!nodesHash.has(node)) {
1920
+ throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(node));
1921
+ }
1922
+ if (visited[i2]) return;
1923
+ visited[i2] = true;
1924
+ var outgoing = outgoingEdges.get(node) || /* @__PURE__ */ new Set();
1925
+ outgoing = Array.from(outgoing);
1926
+ if (i2 = outgoing.length) {
1927
+ predecessors.add(node);
1928
+ do {
1929
+ var child = outgoing[--i2];
1930
+ visit(child, nodesHash.get(child), predecessors);
1931
+ } while (i2);
1932
+ predecessors.delete(node);
1911
1933
  }
1912
- throw new Error("Cyclic dependency" + nodeRep);
1934
+ sorted[--cursor] = node;
1913
1935
  }
1914
- if (!nodesHash.has(node)) {
1915
- throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(node));
1936
+ }
1937
+ function uniqueNodes(arr) {
1938
+ var res = /* @__PURE__ */ new Set();
1939
+ for (var i = 0, len = arr.length; i < len; i++) {
1940
+ var edge = arr[i];
1941
+ res.add(edge[0]);
1942
+ res.add(edge[1]);
1916
1943
  }
1917
- if (visited[i2]) return;
1918
- visited[i2] = true;
1919
- var outgoing = outgoingEdges.get(node) || /* @__PURE__ */ new Set();
1920
- outgoing = Array.from(outgoing);
1921
- if (i2 = outgoing.length) {
1922
- predecessors.add(node);
1923
- do {
1924
- var child = outgoing[--i2];
1925
- visit(child, nodesHash.get(child), predecessors);
1926
- } while (i2);
1927
- predecessors.delete(node);
1944
+ return Array.from(res);
1945
+ }
1946
+ function makeOutgoingEdges(arr) {
1947
+ var edges = /* @__PURE__ */ new Map();
1948
+ for (var i = 0, len = arr.length; i < len; i++) {
1949
+ var edge = arr[i];
1950
+ if (!edges.has(edge[0])) edges.set(edge[0], /* @__PURE__ */ new Set());
1951
+ if (!edges.has(edge[1])) edges.set(edge[1], /* @__PURE__ */ new Set());
1952
+ edges.get(edge[0]).add(edge[1]);
1928
1953
  }
1929
- sorted[--cursor] = node;
1954
+ return edges;
1930
1955
  }
1931
- }
1932
- function uniqueNodes(arr) {
1933
- var res = /* @__PURE__ */ new Set();
1934
- for (var i = 0, len = arr.length; i < len; i++) {
1935
- var edge = arr[i];
1936
- res.add(edge[0]);
1937
- res.add(edge[1]);
1938
- }
1939
- return Array.from(res);
1940
- }
1941
- function makeOutgoingEdges(arr) {
1942
- var edges = /* @__PURE__ */ new Map();
1943
- for (var i = 0, len = arr.length; i < len; i++) {
1944
- var edge = arr[i];
1945
- if (!edges.has(edge[0])) edges.set(edge[0], /* @__PURE__ */ new Set());
1946
- if (!edges.has(edge[1])) edges.set(edge[1], /* @__PURE__ */ new Set());
1947
- edges.get(edge[0]).add(edge[1]);
1948
- }
1949
- return edges;
1950
- }
1951
- function makeNodesHash(arr) {
1952
- var res = /* @__PURE__ */ new Map();
1953
- for (var i = 0, len = arr.length; i < len; i++) {
1954
- res.set(arr[i], i);
1956
+ function makeNodesHash(arr) {
1957
+ var res = /* @__PURE__ */ new Map();
1958
+ for (var i = 0, len = arr.length; i < len; i++) {
1959
+ res.set(arr[i], i);
1960
+ }
1961
+ return res;
1955
1962
  }
1956
- return res;
1963
+ return toposort$1.exports;
1957
1964
  }
1958
- var toposortExports = toposort$2.exports;
1959
- const toposort$1 = /* @__PURE__ */ getDefaultExportFromCjs(toposortExports);
1965
+ var toposortExports = requireToposort();
1966
+ const toposort = /* @__PURE__ */ getDefaultExportFromCjs(toposortExports);
1960
1967
  const toString = Object.prototype.toString;
1961
1968
  const errorToString = Error.prototype.toString;
1962
1969
  const regExpToString = RegExp.prototype.toString;
@@ -2171,7 +2178,7 @@ class Reference {
2171
2178
  this.isSibling = !this.isContext && !this.isValue;
2172
2179
  let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : "";
2173
2180
  this.path = this.key.slice(prefix.length);
2174
- this.getter = this.path && propertyExpr.getter(this.path, true);
2181
+ this.getter = this.path && propertyExprExports.getter(this.path, true);
2175
2182
  this.map = options.map;
2176
2183
  }
2177
2184
  getValue(value, parent, context) {
@@ -2297,7 +2304,7 @@ function getIn(schema, path, value, context = value) {
2297
2304
  parentPath: path,
2298
2305
  schema
2299
2306
  };
2300
- propertyExpr.forEach(path, (_part, isBracket, isArray) => {
2307
+ propertyExprExports.forEach(path, (_part, isBracket, isArray) => {
2301
2308
  let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
2302
2309
  schema = schema.resolve({
2303
2310
  context,
@@ -3285,13 +3292,12 @@ class DateSchema extends Schema {
3285
3292
  }
3286
3293
  }
3287
3294
  DateSchema.INVALID_DATE = invalidDate;
3288
- DateSchema.prototype;
3289
3295
  function sortFields(fields, excludedEdges = []) {
3290
3296
  let edges = [];
3291
3297
  let nodes = /* @__PURE__ */ new Set();
3292
3298
  let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));
3293
3299
  function addNode(depPath, key) {
3294
- let node = propertyExpr.split(depPath)[0];
3300
+ let node = propertyExprExports.split(depPath)[0];
3295
3301
  nodes.add(node);
3296
3302
  if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);
3297
3303
  }
@@ -3301,7 +3307,7 @@ function sortFields(fields, excludedEdges = []) {
3301
3307
  if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);
3302
3308
  else if (isSchema(value) && "deps" in value) value.deps.forEach((path) => addNode(path, key));
3303
3309
  }
3304
- return toposort$1.array(Array.from(nodes), edges).reverse();
3310
+ return toposort.array(Array.from(nodes), edges).reverse();
3305
3311
  }
3306
3312
  function findIndex(arr, err) {
3307
3313
  let idx = Infinity;
@@ -3354,10 +3360,10 @@ function deepPartial(schema) {
3354
3360
  return schema;
3355
3361
  }
3356
3362
  const deepHas = (obj, p) => {
3357
- const path = [...propertyExpr.normalizePath(p)];
3363
+ const path = [...propertyExprExports.normalizePath(p)];
3358
3364
  if (path.length === 1) return path[0] in obj;
3359
3365
  let last = path.pop();
3360
- let parent = propertyExpr.getter(propertyExpr.join(path), true)(obj);
3366
+ let parent = propertyExprExports.getter(propertyExprExports.join(path), true)(obj);
3361
3367
  return !!(parent && last in parent);
3362
3368
  };
3363
3369
  let isObject = (obj) => Object.prototype.toString.call(obj) === "[object Object]";
@@ -3564,7 +3570,7 @@ class ObjectSchema extends Schema {
3564
3570
  return this.pick(remaining);
3565
3571
  }
3566
3572
  from(from2, to, alias) {
3567
- let fromGetter = propertyExpr.getter(from2, true);
3573
+ let fromGetter = propertyExprExports.getter(from2, true);
3568
3574
  return this.transform((obj) => {
3569
3575
  if (!obj) return obj;
3570
3576
  let newObj = obj;
@@ -3614,13 +3620,13 @@ class ObjectSchema extends Schema {
3614
3620
  });
3615
3621
  }
3616
3622
  camelCase() {
3617
- return this.transformKeys(tinyCase.camelCase);
3623
+ return this.transformKeys(tinyCaseExports.camelCase);
3618
3624
  }
3619
3625
  snakeCase() {
3620
- return this.transformKeys(tinyCase.snakeCase);
3626
+ return this.transformKeys(tinyCaseExports.snakeCase);
3621
3627
  }
3622
3628
  constantCase() {
3623
- return this.transformKeys((key) => tinyCase.snakeCase(key).toUpperCase());
3629
+ return this.transformKeys((key) => tinyCaseExports.snakeCase(key).toUpperCase());
3624
3630
  }
3625
3631
  describe(options) {
3626
3632
  const next = (options ? this.resolve(options) : this).clone();
@@ -3972,7 +3978,7 @@ ${error.join("\n")}`);
3972
3978
  clientId: environment.frontendClientId,
3973
3979
  redirectUri: "/authentication/login-callback"
3974
3980
  },
3975
- { requiresAuth: true }
3981
+ true
3976
3982
  );
3977
3983
  enableServiceDiscovery(config, async (builder) => {
3978
3984
  builder.setServiceDiscoveryClient(new ServiceDiscoveryClient());
@@ -3992,7 +3998,6 @@ ${error.join("\n")}`);
3992
3998
  console.info("Fusion config done");
3993
3999
  });
3994
4000
  config.onInitialized(async (fusion) => {
3995
- fusion.auth.defaultClient.setLogger(new ConsoleLogger(config.logger.level));
3996
4001
  window.sessionStorage.clear();
3997
4002
  });
3998
4003
  };
@@ -5095,6 +5100,9 @@ function createIDBPersister(idbValidKey = "reactQuery") {
5095
5100
  }
5096
5101
  };
5097
5102
  }
5103
+ const queryInvalidationChannel = new BroadcastChannel(
5104
+ "query-invalidation"
5105
+ );
5098
5106
  function parseJwt(token) {
5099
5107
  const parts = token.split(".");
5100
5108
  if (parts.length !== 3) {
@@ -5340,6 +5348,18 @@ const useManageWatchList = (system) => {
5340
5348
  const queryClient = useQueryClient();
5341
5349
  const updateMutator = useUpdateByUserIdAndId();
5342
5350
  const createMutator = useCreateSettingByUserId();
5351
+ const mutateSuccess = async () => {
5352
+ const key = getGetSettingsByAppShortNameQueryKey("notifications");
5353
+ try {
5354
+ await queryClient.resetQueries({
5355
+ queryKey: key
5356
+ });
5357
+ } catch (message) {
5358
+ console.error(message);
5359
+ } finally {
5360
+ queryInvalidationChannel.postMessage({ key });
5361
+ }
5362
+ };
5343
5363
  const saveSetting = (setting2) => {
5344
5364
  if (!setting2.id) {
5345
5365
  createMutator.mutate(
@@ -5351,11 +5371,7 @@ const useManageWatchList = (system) => {
5351
5371
  }
5352
5372
  },
5353
5373
  {
5354
- onSuccess: () => {
5355
- return queryClient.resetQueries({
5356
- queryKey: getGetSettingsByAppShortNameQueryKey("notifications")
5357
- });
5358
- }
5374
+ onSuccess: mutateSuccess
5359
5375
  }
5360
5376
  );
5361
5377
  } else {
@@ -5366,11 +5382,7 @@ const useManageWatchList = (system) => {
5366
5382
  data: setting2
5367
5383
  },
5368
5384
  {
5369
- onSuccess: () => {
5370
- return queryClient.resetQueries({
5371
- queryKey: getGetSettingsByAppShortNameQueryKey("notifications")
5372
- });
5373
- }
5385
+ onSuccess: mutateSuccess
5374
5386
  }
5375
5387
  );
5376
5388
  }
@@ -5446,6 +5458,7 @@ export {
5446
5458
  handleError,
5447
5459
  makeComponent,
5448
5460
  parseJwt,
5461
+ queryInvalidationChannel,
5449
5462
  useAddRomaConfiguration,
5450
5463
  useAddRomaConfigurationHook,
5451
5464
  useAddRomaConfigurationMutationOptions,