@equinor/roma-framework 2.1.0 → 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 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, l as __spreadArray, m as __read, n as arrRemove, p as isScheduler, O as Observable, h as of, A as Action$2, k as from, B as BehaviorSubject, f as firstValueFrom, I as IntlProvider } from "./router-CD1QGwNJ.mjs";
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) ? +dueTime - scheduler.now() : 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 m = require$$0;
219
- if (process.env.NODE_ENV === "production") {
220
- client.createRoot = m.createRoot;
221
- client.hydrateRoot = m.hydrateRoot;
222
- } else {
223
- var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
224
- client.createRoot = function(c, o) {
225
- i.usingClientEntryPoint = true;
226
- try {
227
- return m.createRoot(c, o);
228
- } finally {
229
- i.usingClientEntryPoint = false;
230
- }
231
- };
232
- client.hydrateRoot = function(c, h, o) {
233
- i.usingClientEntryPoint = true;
234
- try {
235
- return m.hydrateRoot(c, h, o);
236
- } finally {
237
- i.usingClientEntryPoint = false;
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: client,
495
+ reactDom: ReactDOM,
506
496
  render: (reactComponent, el) => {
507
497
  if (!root) {
508
- root = client.createRoot(el);
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: client }, options), rerenderKey, internalOptions);
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);
@@ -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 & {