@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.
- package/cypress.mjs +37 -47
- package/dev-portal/index.d.ts +1 -0
- package/dev-portal/lib/app-provider.d.ts +8 -0
- package/dev-portal/lib/dev-portal/PortalStyles.d.ts +345 -345
- package/dev-portal/lib/query/broadcast-channel.d.ts +1 -0
- 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/index.d.ts +1 -0
- package/lib/app-provider.d.ts +8 -0
- package/lib/dev-portal/PortalStyles.d.ts +345 -345
- package/lib/query/broadcast-channel.d.ts +1 -0
- package/lib/test-utils/modules.d.ts +1 -1
- package/package.json +4 -4
- package/roma-framework.mjs +229 -216
- package/{router-CD1QGwNJ.mjs → router-DDzmmkip.mjs} +137 -60
package/cypress.mjs
CHANGED
|
@@ -2,14 +2,13 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { FrameworkProvider } from "@equinor/fusion-framework-react";
|
|
3
3
|
import { ModuleProvider } from "@equinor/fusion-framework-react-module";
|
|
4
4
|
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
|
5
|
-
import { _ as __extends, S as Subscription,
|
|
5
|
+
import { _ as __extends, S as Subscription, m as __spreadArray, n as __read, p as arrRemove, q as isScheduler, O as Observable, h as getDefaultExportFromCjs, k as of, l as from, A as Action$2, B as BehaviorSubject, f as firstValueFrom, I as IntlProvider } from "./router-DDzmmkip.mjs";
|
|
6
6
|
import require$$0 from "react-dom";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
var dateTimestampProvider = {
|
|
9
9
|
now: function() {
|
|
10
10
|
return Date.now();
|
|
11
|
-
}
|
|
12
|
-
delegate: void 0
|
|
11
|
+
}
|
|
13
12
|
};
|
|
14
13
|
var Action$1 = function(_super) {
|
|
15
14
|
__extends(Action2, _super);
|
|
@@ -191,7 +190,7 @@ function timer(dueTime, intervalOrScheduler, scheduler) {
|
|
|
191
190
|
}
|
|
192
191
|
}
|
|
193
192
|
return new Observable(function(subscriber) {
|
|
194
|
-
var due = isValidDate(dueTime) ?
|
|
193
|
+
var due = isValidDate(dueTime) ? 50 - scheduler.now() : dueTime;
|
|
195
194
|
if (due < 0) {
|
|
196
195
|
due = 0;
|
|
197
196
|
}
|
|
@@ -215,29 +214,37 @@ function interval(period, scheduler) {
|
|
|
215
214
|
return timer(period, period, scheduler);
|
|
216
215
|
}
|
|
217
216
|
var client = {};
|
|
218
|
-
var
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
i.usingClientEntryPoint =
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
i.usingClientEntryPoint =
|
|
238
|
-
|
|
239
|
-
|
|
217
|
+
var hasRequiredClient;
|
|
218
|
+
function requireClient() {
|
|
219
|
+
if (hasRequiredClient) return client;
|
|
220
|
+
hasRequiredClient = 1;
|
|
221
|
+
var m = require$$0;
|
|
222
|
+
if (process.env.NODE_ENV === "production") {
|
|
223
|
+
client.createRoot = m.createRoot;
|
|
224
|
+
client.hydrateRoot = m.hydrateRoot;
|
|
225
|
+
} else {
|
|
226
|
+
var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
227
|
+
client.createRoot = function(c, o) {
|
|
228
|
+
i.usingClientEntryPoint = true;
|
|
229
|
+
try {
|
|
230
|
+
return m.createRoot(c, o);
|
|
231
|
+
} finally {
|
|
232
|
+
i.usingClientEntryPoint = false;
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
client.hydrateRoot = function(c, h, o) {
|
|
236
|
+
i.usingClientEntryPoint = true;
|
|
237
|
+
try {
|
|
238
|
+
return m.hydrateRoot(c, h, o);
|
|
239
|
+
} finally {
|
|
240
|
+
i.usingClientEntryPoint = false;
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
return client;
|
|
240
245
|
}
|
|
246
|
+
var clientExports = requireClient();
|
|
247
|
+
const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(clientExports);
|
|
241
248
|
function getDisplayName(node, fallbackName = "Unknown") {
|
|
242
249
|
const type = node === null || node === void 0 ? void 0 : node.type;
|
|
243
250
|
if (!type) {
|
|
@@ -381,30 +388,13 @@ setupHooks(preMountCleanup);
|
|
|
381
388
|
const debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
382
389
|
};
|
|
383
390
|
var debug_1 = debug;
|
|
384
|
-
const SEMVER_SPEC_VERSION = "2.0.0";
|
|
385
391
|
const MAX_LENGTH$1 = 256;
|
|
386
|
-
const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
387
|
-
9007199254740991;
|
|
388
392
|
const MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
389
393
|
const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH$1 - 6;
|
|
390
|
-
const RELEASE_TYPES = [
|
|
391
|
-
"major",
|
|
392
|
-
"premajor",
|
|
393
|
-
"minor",
|
|
394
|
-
"preminor",
|
|
395
|
-
"patch",
|
|
396
|
-
"prepatch",
|
|
397
|
-
"prerelease"
|
|
398
|
-
];
|
|
399
394
|
var constants = {
|
|
400
395
|
MAX_LENGTH: MAX_LENGTH$1,
|
|
401
396
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
402
|
-
MAX_SAFE_BUILD_LENGTH
|
|
403
|
-
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
|
|
404
|
-
RELEASE_TYPES,
|
|
405
|
-
SEMVER_SPEC_VERSION,
|
|
406
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
407
|
-
FLAG_LOOSE: 2
|
|
397
|
+
MAX_SAFE_BUILD_LENGTH
|
|
408
398
|
};
|
|
409
399
|
function createCommonjsModule(fn) {
|
|
410
400
|
var module = { exports: {} };
|
|
@@ -502,17 +492,17 @@ const cleanup = () => {
|
|
|
502
492
|
function mount$1(jsx2, options = {}, rerenderKey) {
|
|
503
493
|
cleanup();
|
|
504
494
|
const internalOptions = {
|
|
505
|
-
reactDom:
|
|
495
|
+
reactDom: ReactDOM,
|
|
506
496
|
render: (reactComponent, el) => {
|
|
507
497
|
if (!root) {
|
|
508
|
-
root =
|
|
498
|
+
root = ReactDOM.createRoot(el);
|
|
509
499
|
}
|
|
510
500
|
return root.render(reactComponent);
|
|
511
501
|
},
|
|
512
502
|
unmount: internalUnmount,
|
|
513
503
|
cleanup
|
|
514
504
|
};
|
|
515
|
-
return makeMountFn("mount", jsx2, Object.assign({ ReactDom:
|
|
505
|
+
return makeMountFn("mount", jsx2, Object.assign({ ReactDom: ReactDOM }, options), rerenderKey, internalOptions);
|
|
516
506
|
}
|
|
517
507
|
function internalUnmount(options = { log: true }) {
|
|
518
508
|
return makeUnmountFn(options);
|
package/dev-portal/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export * from './lib/api/roma';
|
|
|
11
11
|
export * from './lib/api/ms-graph';
|
|
12
12
|
export * from './lib/app-provider';
|
|
13
13
|
export * from './lib/query/persister';
|
|
14
|
+
export * from './lib/query/broadcast-channel';
|
|
14
15
|
export * from './lib/hooks/use-get-api-roles';
|
|
15
16
|
export * from './lib/hooks/use-has-api-role';
|
|
16
17
|
export * from './lib/error-handlers/http-error-handler';
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
3
|
+
import { QueryClientError } from '@equinor/fusion-query/client';
|
|
4
|
+
type AppLoadError = QueryClientError & {
|
|
5
|
+
cause: {
|
|
6
|
+
data: unknown;
|
|
7
|
+
name: string;
|
|
8
|
+
response: Response;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
3
11
|
export declare const AppContext: import('react').Context<{
|
|
4
12
|
isLoading: boolean;
|
|
5
13
|
apps?: Array<AppManifest & {
|