@equinor/roma-framework 2.1.0 → 3.0.1
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.
- package/cypress.mjs +37 -47
- package/dev-portal/lib/app-provider.d.ts +8 -0
- package/dev-portal/lib/dev-portal/PortalStyles.d.ts +349 -349
- package/dev-portal/lib/eds-event-provider.d.ts +2 -1
- package/dev-portal/lib/test-utils/modules.d.ts +1 -1
- package/dev-portal/package.json +3 -3
- package/dev-portal/roma-framework.umd.js +4308 -4108
- package/lib/app-provider.d.ts +8 -0
- package/lib/dev-portal/PortalStyles.d.ts +349 -349
- package/lib/eds-event-provider.d.ts +2 -1
- package/lib/test-utils/modules.d.ts +1 -1
- package/package.json +4 -4
- package/roma-framework.mjs +241 -209
- package/{router-CD1QGwNJ.mjs → router-DDzmmkip.mjs} +137 -60
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
export declare const EdsEventProvider: ({ event, children }: {
|
|
3
|
+
export declare const EdsEventProvider: ({ event, children, portalContainer, }: {
|
|
4
4
|
event: IEventModuleProvider;
|
|
5
5
|
children: ReactNode;
|
|
6
|
+
portalContainer: string;
|
|
6
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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": "
|
|
3
|
+
"version": "3.0.1",
|
|
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
|
+
}
|
package/roma-framework.mjs
CHANGED
|
@@ -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,
|
|
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";
|
|
@@ -163,22 +162,39 @@ function tap(observerOrNext, error, complete) {
|
|
|
163
162
|
}));
|
|
164
163
|
}) : identity;
|
|
165
164
|
}
|
|
166
|
-
const EdsEventProvider = ({
|
|
165
|
+
const EdsEventProvider = ({
|
|
166
|
+
event,
|
|
167
|
+
children,
|
|
168
|
+
portalContainer
|
|
169
|
+
}) => {
|
|
167
170
|
const [density, setDensity] = useState(
|
|
168
171
|
localStorage.getItem("roma__density") ?? "comfortable"
|
|
169
172
|
);
|
|
170
173
|
const evModule = useFramework().modules.event;
|
|
174
|
+
const [root, setRoot] = useState(null);
|
|
171
175
|
useEffect(() => {
|
|
172
176
|
const sub = evModule.event$.pipe(filter((e) => e.type === "onDensityChanged")).subscribe((e) => {
|
|
173
177
|
setDensity(e.detail);
|
|
174
178
|
});
|
|
175
179
|
return () => sub.unsubscribe();
|
|
176
180
|
}, [event]);
|
|
177
|
-
|
|
181
|
+
useEffect(() => {
|
|
182
|
+
if (root) return;
|
|
183
|
+
const interval = setInterval(() => {
|
|
184
|
+
setRoot(document.querySelector(`#${portalContainer}`));
|
|
185
|
+
}, 250);
|
|
186
|
+
if (root) clearInterval(interval);
|
|
187
|
+
return () => clearInterval(interval);
|
|
188
|
+
}, [root, portalContainer]);
|
|
189
|
+
return /* @__PURE__ */ jsx(
|
|
190
|
+
EdsProvider,
|
|
191
|
+
{
|
|
192
|
+
density,
|
|
193
|
+
rootElement: document.querySelector(`#${portalContainer}`),
|
|
194
|
+
children
|
|
195
|
+
}
|
|
196
|
+
);
|
|
178
197
|
};
|
|
179
|
-
function getDefaultExportFromCjs(x) {
|
|
180
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
181
|
-
}
|
|
182
198
|
const makeComponent = (Component, args, configure2) => lazy(async () => {
|
|
183
199
|
const init = configureModules(configure2);
|
|
184
200
|
const modules = await init(args);
|
|
@@ -191,7 +207,14 @@ const makeComponent = (Component, args, configure2) => lazy(async () => {
|
|
|
191
207
|
});
|
|
192
208
|
const queryClient = args.query ?? new QueryClient();
|
|
193
209
|
return {
|
|
194
|
-
default: () => /* @__PURE__ */ jsx(FrameworkProvider, { value: fusion, children: /* @__PURE__ */ jsx(IntlProvider, { locale: navigator.language, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(StyleProvider, { scope: `roma-${appKey}`, children: /* @__PURE__ */ jsx(
|
|
210
|
+
default: () => /* @__PURE__ */ jsx(FrameworkProvider, { value: fusion, children: /* @__PURE__ */ jsx(IntlProvider, { locale: navigator.language, children: /* @__PURE__ */ jsx(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx(StyleProvider, { scope: `roma-${appKey}`, children: /* @__PURE__ */ jsx(
|
|
211
|
+
EdsEventProvider,
|
|
212
|
+
{
|
|
213
|
+
portalContainer: `roma-${appKey}`,
|
|
214
|
+
event: modules.event,
|
|
215
|
+
children: /* @__PURE__ */ jsx(ModuleProvider, { value: modules, children: Component })
|
|
216
|
+
}
|
|
217
|
+
) }) }) }) })
|
|
195
218
|
};
|
|
196
219
|
});
|
|
197
220
|
const withStyleIsolation = (children, args) => lazy(async () => {
|
|
@@ -1181,17 +1204,6 @@ const HeaderMenu = ({ menuState }) => {
|
|
|
1181
1204
|
if (tags.includes("liquids-operations")) return "10511";
|
|
1182
1205
|
return "10540";
|
|
1183
1206
|
};
|
|
1184
|
-
useMemo(
|
|
1185
|
-
() => ({
|
|
1186
|
-
limit: 10,
|
|
1187
|
-
filter: {
|
|
1188
|
-
attributes: {
|
|
1189
|
-
read: false
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
}),
|
|
1193
|
-
[]
|
|
1194
|
-
);
|
|
1195
1207
|
const feedbackArea = getFeedbackAreaFromTags(currentApp, applications);
|
|
1196
1208
|
const toggleDensity = (newDensity) => {
|
|
1197
1209
|
localStorage.setItem("roma__density", newDensity);
|
|
@@ -1275,8 +1287,8 @@ const HeaderMenu = ({ menuState }) => {
|
|
|
1275
1287
|
/* @__PURE__ */ jsx(
|
|
1276
1288
|
Menu.Item,
|
|
1277
1289
|
{
|
|
1278
|
-
onClick: () => auth.
|
|
1279
|
-
|
|
1290
|
+
onClick: () => auth.logout({
|
|
1291
|
+
redirectUri: window.location.origin
|
|
1280
1292
|
}),
|
|
1281
1293
|
children: "Sign out"
|
|
1282
1294
|
}
|
|
@@ -1767,196 +1779,218 @@ function enableSse(configurator, name, optionsOrCallback) {
|
|
|
1767
1779
|
});
|
|
1768
1780
|
}
|
|
1769
1781
|
}
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
};
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1782
|
+
var propertyExpr;
|
|
1783
|
+
var hasRequiredPropertyExpr;
|
|
1784
|
+
function requirePropertyExpr() {
|
|
1785
|
+
if (hasRequiredPropertyExpr) return propertyExpr;
|
|
1786
|
+
hasRequiredPropertyExpr = 1;
|
|
1787
|
+
function Cache(maxSize) {
|
|
1788
|
+
this._maxSize = maxSize;
|
|
1789
|
+
this.clear();
|
|
1790
|
+
}
|
|
1791
|
+
Cache.prototype.clear = function() {
|
|
1792
|
+
this._size = 0;
|
|
1793
|
+
this._values = /* @__PURE__ */ Object.create(null);
|
|
1794
|
+
};
|
|
1795
|
+
Cache.prototype.get = function(key) {
|
|
1796
|
+
return this._values[key];
|
|
1797
|
+
};
|
|
1798
|
+
Cache.prototype.set = function(key, value) {
|
|
1799
|
+
this._size >= this._maxSize && this.clear();
|
|
1800
|
+
if (!(key in this._values)) this._size++;
|
|
1801
|
+
return this._values[key] = value;
|
|
1802
|
+
};
|
|
1803
|
+
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;
|
|
1804
|
+
var pathCache = new Cache(MAX_CACHE_SIZE), setCache = new Cache(MAX_CACHE_SIZE), getCache = new Cache(MAX_CACHE_SIZE);
|
|
1805
|
+
propertyExpr = {
|
|
1806
|
+
Cache,
|
|
1807
|
+
split,
|
|
1808
|
+
normalizePath,
|
|
1809
|
+
setter: function(path) {
|
|
1810
|
+
var parts = normalizePath(path);
|
|
1811
|
+
return setCache.get(path) || setCache.set(path, function setter(obj, value) {
|
|
1812
|
+
var index = 0;
|
|
1813
|
+
var len = parts.length;
|
|
1814
|
+
var data = obj;
|
|
1815
|
+
while (index < len - 1) {
|
|
1816
|
+
var part = parts[index];
|
|
1817
|
+
if (part === "__proto__" || part === "constructor" || part === "prototype") {
|
|
1818
|
+
return obj;
|
|
1819
|
+
}
|
|
1820
|
+
data = data[parts[index++]];
|
|
1802
1821
|
}
|
|
1803
|
-
data
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
}
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1822
|
+
data[parts[index]] = value;
|
|
1823
|
+
});
|
|
1824
|
+
},
|
|
1825
|
+
getter: function(path, safe) {
|
|
1826
|
+
var parts = normalizePath(path);
|
|
1827
|
+
return getCache.get(path) || getCache.set(path, function getter(data) {
|
|
1828
|
+
var index = 0, len = parts.length;
|
|
1829
|
+
while (index < len) {
|
|
1830
|
+
if (data != null || !safe) data = data[parts[index++]];
|
|
1831
|
+
else return;
|
|
1832
|
+
}
|
|
1833
|
+
return data;
|
|
1834
|
+
});
|
|
1835
|
+
},
|
|
1836
|
+
join: function(segments) {
|
|
1837
|
+
return segments.reduce(function(path, part) {
|
|
1838
|
+
return path + (isQuoted(part) || DIGIT_REGEX.test(part) ? "[" + part + "]" : (path ? "." : "") + part);
|
|
1839
|
+
}, "");
|
|
1840
|
+
},
|
|
1841
|
+
forEach: function(path, cb, thisArg) {
|
|
1842
|
+
forEach(Array.isArray(path) ? path : split(path), cb, thisArg);
|
|
1843
|
+
}
|
|
1844
|
+
};
|
|
1845
|
+
function normalizePath(path) {
|
|
1846
|
+
return pathCache.get(path) || pathCache.set(
|
|
1847
|
+
path,
|
|
1848
|
+
split(path).map(function(part) {
|
|
1849
|
+
return part.replace(CLEAN_QUOTES_REGEX, "$2");
|
|
1850
|
+
})
|
|
1851
|
+
);
|
|
1826
1852
|
}
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
for (idx = 0; idx < len; idx++) {
|
|
1842
|
-
part = parts[idx];
|
|
1843
|
-
if (part) {
|
|
1844
|
-
if (shouldBeQuoted(part)) {
|
|
1845
|
-
part = '"' + part + '"';
|
|
1853
|
+
function split(path) {
|
|
1854
|
+
return path.match(SPLIT_REGEX) || [""];
|
|
1855
|
+
}
|
|
1856
|
+
function forEach(parts, iter, thisArg) {
|
|
1857
|
+
var len = parts.length, part, idx, isArray, isBracket;
|
|
1858
|
+
for (idx = 0; idx < len; idx++) {
|
|
1859
|
+
part = parts[idx];
|
|
1860
|
+
if (part) {
|
|
1861
|
+
if (shouldBeQuoted(part)) {
|
|
1862
|
+
part = '"' + part + '"';
|
|
1863
|
+
}
|
|
1864
|
+
isBracket = isQuoted(part);
|
|
1865
|
+
isArray = !isBracket && /^\d+$/.test(part);
|
|
1866
|
+
iter.call(thisArg, part, isBracket, isArray, idx, parts);
|
|
1846
1867
|
}
|
|
1847
|
-
isBracket = isQuoted(part);
|
|
1848
|
-
isArray = !isBracket && /^\d+$/.test(part);
|
|
1849
|
-
iter.call(thisArg, part, isBracket, isArray, idx, parts);
|
|
1850
1868
|
}
|
|
1851
1869
|
}
|
|
1870
|
+
function isQuoted(str) {
|
|
1871
|
+
return typeof str === "string" && str && ["'", '"'].indexOf(str.charAt(0)) !== -1;
|
|
1872
|
+
}
|
|
1873
|
+
function hasLeadingNumber(part) {
|
|
1874
|
+
return part.match(LEAD_DIGIT_REGEX) && !part.match(DIGIT_REGEX);
|
|
1875
|
+
}
|
|
1876
|
+
function hasSpecialChars(part) {
|
|
1877
|
+
return SPEC_CHAR_REGEX.test(part);
|
|
1878
|
+
}
|
|
1879
|
+
function shouldBeQuoted(part) {
|
|
1880
|
+
return !isQuoted(part) && (hasLeadingNumber(part) || hasSpecialChars(part));
|
|
1881
|
+
}
|
|
1882
|
+
return propertyExpr;
|
|
1852
1883
|
}
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
function
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1884
|
+
var propertyExprExports = requirePropertyExpr();
|
|
1885
|
+
var tinyCase;
|
|
1886
|
+
var hasRequiredTinyCase;
|
|
1887
|
+
function requireTinyCase() {
|
|
1888
|
+
if (hasRequiredTinyCase) return tinyCase;
|
|
1889
|
+
hasRequiredTinyCase = 1;
|
|
1890
|
+
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;
|
|
1891
|
+
const words = (str) => str.match(reWords) || [];
|
|
1892
|
+
const upperFirst = (str) => str[0].toUpperCase() + str.slice(1);
|
|
1893
|
+
const join = (str, d) => words(str).join(d).toLowerCase();
|
|
1894
|
+
const camelCase = (str) => words(str).reduce(
|
|
1895
|
+
(acc, next) => `${acc}${!acc ? next.toLowerCase() : next[0].toUpperCase() + next.slice(1).toLowerCase()}`,
|
|
1896
|
+
""
|
|
1897
|
+
);
|
|
1898
|
+
const pascalCase = (str) => upperFirst(camelCase(str));
|
|
1899
|
+
const snakeCase = (str) => join(str, "_");
|
|
1900
|
+
const kebabCase = (str) => join(str, "-");
|
|
1901
|
+
const sentenceCase = (str) => upperFirst(join(str, " "));
|
|
1902
|
+
const titleCase = (str) => words(str).map(upperFirst).join(" ");
|
|
1903
|
+
tinyCase = {
|
|
1904
|
+
words,
|
|
1905
|
+
upperFirst,
|
|
1906
|
+
camelCase,
|
|
1907
|
+
pascalCase,
|
|
1908
|
+
snakeCase,
|
|
1909
|
+
kebabCase,
|
|
1910
|
+
sentenceCase,
|
|
1911
|
+
titleCase
|
|
1912
|
+
};
|
|
1913
|
+
return tinyCase;
|
|
1864
1914
|
}
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
);
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
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.");
|
|
1915
|
+
var tinyCaseExports = requireTinyCase();
|
|
1916
|
+
var toposort$1 = { exports: {} };
|
|
1917
|
+
var hasRequiredToposort;
|
|
1918
|
+
function requireToposort() {
|
|
1919
|
+
if (hasRequiredToposort) return toposort$1.exports;
|
|
1920
|
+
hasRequiredToposort = 1;
|
|
1921
|
+
toposort$1.exports = function(edges) {
|
|
1922
|
+
return toposort2(uniqueNodes(edges), edges);
|
|
1923
|
+
};
|
|
1924
|
+
toposort$1.exports.array = toposort2;
|
|
1925
|
+
function toposort2(nodes, edges) {
|
|
1926
|
+
var cursor = nodes.length, sorted = new Array(cursor), visited = {}, i = cursor, outgoingEdges = makeOutgoingEdges(edges), nodesHash = makeNodesHash(nodes);
|
|
1927
|
+
edges.forEach(function(edge) {
|
|
1928
|
+
if (!nodesHash.has(edge[0]) || !nodesHash.has(edge[1])) {
|
|
1929
|
+
throw new Error("Unknown node. There is an unknown node in the supplied edges.");
|
|
1930
|
+
}
|
|
1931
|
+
});
|
|
1932
|
+
while (i--) {
|
|
1933
|
+
if (!visited[i]) visit(nodes[i], i, /* @__PURE__ */ new Set());
|
|
1898
1934
|
}
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
} catch (e) {
|
|
1910
|
-
nodeRep = "";
|
|
1935
|
+
return sorted;
|
|
1936
|
+
function visit(node, i2, predecessors) {
|
|
1937
|
+
if (predecessors.has(node)) {
|
|
1938
|
+
var nodeRep;
|
|
1939
|
+
try {
|
|
1940
|
+
nodeRep = ", node was:" + JSON.stringify(node);
|
|
1941
|
+
} catch (e) {
|
|
1942
|
+
nodeRep = "";
|
|
1943
|
+
}
|
|
1944
|
+
throw new Error("Cyclic dependency" + nodeRep);
|
|
1911
1945
|
}
|
|
1912
|
-
|
|
1946
|
+
if (!nodesHash.has(node)) {
|
|
1947
|
+
throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: " + JSON.stringify(node));
|
|
1948
|
+
}
|
|
1949
|
+
if (visited[i2]) return;
|
|
1950
|
+
visited[i2] = true;
|
|
1951
|
+
var outgoing = outgoingEdges.get(node) || /* @__PURE__ */ new Set();
|
|
1952
|
+
outgoing = Array.from(outgoing);
|
|
1953
|
+
if (i2 = outgoing.length) {
|
|
1954
|
+
predecessors.add(node);
|
|
1955
|
+
do {
|
|
1956
|
+
var child = outgoing[--i2];
|
|
1957
|
+
visit(child, nodesHash.get(child), predecessors);
|
|
1958
|
+
} while (i2);
|
|
1959
|
+
predecessors.delete(node);
|
|
1960
|
+
}
|
|
1961
|
+
sorted[--cursor] = node;
|
|
1913
1962
|
}
|
|
1914
|
-
|
|
1915
|
-
|
|
1963
|
+
}
|
|
1964
|
+
function uniqueNodes(arr) {
|
|
1965
|
+
var res = /* @__PURE__ */ new Set();
|
|
1966
|
+
for (var i = 0, len = arr.length; i < len; i++) {
|
|
1967
|
+
var edge = arr[i];
|
|
1968
|
+
res.add(edge[0]);
|
|
1969
|
+
res.add(edge[1]);
|
|
1916
1970
|
}
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
} while (i2);
|
|
1927
|
-
predecessors.delete(node);
|
|
1971
|
+
return Array.from(res);
|
|
1972
|
+
}
|
|
1973
|
+
function makeOutgoingEdges(arr) {
|
|
1974
|
+
var edges = /* @__PURE__ */ new Map();
|
|
1975
|
+
for (var i = 0, len = arr.length; i < len; i++) {
|
|
1976
|
+
var edge = arr[i];
|
|
1977
|
+
if (!edges.has(edge[0])) edges.set(edge[0], /* @__PURE__ */ new Set());
|
|
1978
|
+
if (!edges.has(edge[1])) edges.set(edge[1], /* @__PURE__ */ new Set());
|
|
1979
|
+
edges.get(edge[0]).add(edge[1]);
|
|
1928
1980
|
}
|
|
1929
|
-
|
|
1981
|
+
return edges;
|
|
1930
1982
|
}
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
res
|
|
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);
|
|
1983
|
+
function makeNodesHash(arr) {
|
|
1984
|
+
var res = /* @__PURE__ */ new Map();
|
|
1985
|
+
for (var i = 0, len = arr.length; i < len; i++) {
|
|
1986
|
+
res.set(arr[i], i);
|
|
1987
|
+
}
|
|
1988
|
+
return res;
|
|
1955
1989
|
}
|
|
1956
|
-
return
|
|
1990
|
+
return toposort$1.exports;
|
|
1957
1991
|
}
|
|
1958
|
-
var toposortExports =
|
|
1959
|
-
const toposort
|
|
1992
|
+
var toposortExports = requireToposort();
|
|
1993
|
+
const toposort = /* @__PURE__ */ getDefaultExportFromCjs(toposortExports);
|
|
1960
1994
|
const toString = Object.prototype.toString;
|
|
1961
1995
|
const errorToString = Error.prototype.toString;
|
|
1962
1996
|
const regExpToString = RegExp.prototype.toString;
|
|
@@ -2171,7 +2205,7 @@ class Reference {
|
|
|
2171
2205
|
this.isSibling = !this.isContext && !this.isValue;
|
|
2172
2206
|
let prefix = this.isContext ? prefixes.context : this.isValue ? prefixes.value : "";
|
|
2173
2207
|
this.path = this.key.slice(prefix.length);
|
|
2174
|
-
this.getter = this.path &&
|
|
2208
|
+
this.getter = this.path && propertyExprExports.getter(this.path, true);
|
|
2175
2209
|
this.map = options.map;
|
|
2176
2210
|
}
|
|
2177
2211
|
getValue(value, parent, context) {
|
|
@@ -2297,7 +2331,7 @@ function getIn(schema, path, value, context = value) {
|
|
|
2297
2331
|
parentPath: path,
|
|
2298
2332
|
schema
|
|
2299
2333
|
};
|
|
2300
|
-
|
|
2334
|
+
propertyExprExports.forEach(path, (_part, isBracket, isArray) => {
|
|
2301
2335
|
let part = isBracket ? _part.slice(1, _part.length - 1) : _part;
|
|
2302
2336
|
schema = schema.resolve({
|
|
2303
2337
|
context,
|
|
@@ -3285,13 +3319,12 @@ class DateSchema extends Schema {
|
|
|
3285
3319
|
}
|
|
3286
3320
|
}
|
|
3287
3321
|
DateSchema.INVALID_DATE = invalidDate;
|
|
3288
|
-
DateSchema.prototype;
|
|
3289
3322
|
function sortFields(fields, excludedEdges = []) {
|
|
3290
3323
|
let edges = [];
|
|
3291
3324
|
let nodes = /* @__PURE__ */ new Set();
|
|
3292
3325
|
let excludes = new Set(excludedEdges.map(([a, b]) => `${a}-${b}`));
|
|
3293
3326
|
function addNode(depPath, key) {
|
|
3294
|
-
let node =
|
|
3327
|
+
let node = propertyExprExports.split(depPath)[0];
|
|
3295
3328
|
nodes.add(node);
|
|
3296
3329
|
if (!excludes.has(`${key}-${node}`)) edges.push([key, node]);
|
|
3297
3330
|
}
|
|
@@ -3301,7 +3334,7 @@ function sortFields(fields, excludedEdges = []) {
|
|
|
3301
3334
|
if (Reference.isRef(value) && value.isSibling) addNode(value.path, key);
|
|
3302
3335
|
else if (isSchema(value) && "deps" in value) value.deps.forEach((path) => addNode(path, key));
|
|
3303
3336
|
}
|
|
3304
|
-
return toposort
|
|
3337
|
+
return toposort.array(Array.from(nodes), edges).reverse();
|
|
3305
3338
|
}
|
|
3306
3339
|
function findIndex(arr, err) {
|
|
3307
3340
|
let idx = Infinity;
|
|
@@ -3354,10 +3387,10 @@ function deepPartial(schema) {
|
|
|
3354
3387
|
return schema;
|
|
3355
3388
|
}
|
|
3356
3389
|
const deepHas = (obj, p) => {
|
|
3357
|
-
const path = [...
|
|
3390
|
+
const path = [...propertyExprExports.normalizePath(p)];
|
|
3358
3391
|
if (path.length === 1) return path[0] in obj;
|
|
3359
3392
|
let last = path.pop();
|
|
3360
|
-
let parent =
|
|
3393
|
+
let parent = propertyExprExports.getter(propertyExprExports.join(path), true)(obj);
|
|
3361
3394
|
return !!(parent && last in parent);
|
|
3362
3395
|
};
|
|
3363
3396
|
let isObject = (obj) => Object.prototype.toString.call(obj) === "[object Object]";
|
|
@@ -3564,7 +3597,7 @@ class ObjectSchema extends Schema {
|
|
|
3564
3597
|
return this.pick(remaining);
|
|
3565
3598
|
}
|
|
3566
3599
|
from(from2, to, alias) {
|
|
3567
|
-
let fromGetter =
|
|
3600
|
+
let fromGetter = propertyExprExports.getter(from2, true);
|
|
3568
3601
|
return this.transform((obj) => {
|
|
3569
3602
|
if (!obj) return obj;
|
|
3570
3603
|
let newObj = obj;
|
|
@@ -3614,13 +3647,13 @@ class ObjectSchema extends Schema {
|
|
|
3614
3647
|
});
|
|
3615
3648
|
}
|
|
3616
3649
|
camelCase() {
|
|
3617
|
-
return this.transformKeys(
|
|
3650
|
+
return this.transformKeys(tinyCaseExports.camelCase);
|
|
3618
3651
|
}
|
|
3619
3652
|
snakeCase() {
|
|
3620
|
-
return this.transformKeys(
|
|
3653
|
+
return this.transformKeys(tinyCaseExports.snakeCase);
|
|
3621
3654
|
}
|
|
3622
3655
|
constantCase() {
|
|
3623
|
-
return this.transformKeys((key) =>
|
|
3656
|
+
return this.transformKeys((key) => tinyCaseExports.snakeCase(key).toUpperCase());
|
|
3624
3657
|
}
|
|
3625
3658
|
describe(options) {
|
|
3626
3659
|
const next = (options ? this.resolve(options) : this).clone();
|
|
@@ -3972,7 +4005,7 @@ ${error.join("\n")}`);
|
|
|
3972
4005
|
clientId: environment.frontendClientId,
|
|
3973
4006
|
redirectUri: "/authentication/login-callback"
|
|
3974
4007
|
},
|
|
3975
|
-
|
|
4008
|
+
true
|
|
3976
4009
|
);
|
|
3977
4010
|
enableServiceDiscovery(config, async (builder) => {
|
|
3978
4011
|
builder.setServiceDiscoveryClient(new ServiceDiscoveryClient());
|
|
@@ -3992,7 +4025,6 @@ ${error.join("\n")}`);
|
|
|
3992
4025
|
console.info("Fusion config done");
|
|
3993
4026
|
});
|
|
3994
4027
|
config.onInitialized(async (fusion) => {
|
|
3995
|
-
fusion.auth.defaultClient.setLogger(new ConsoleLogger(config.logger.level));
|
|
3996
4028
|
window.sessionStorage.clear();
|
|
3997
4029
|
});
|
|
3998
4030
|
};
|