@equinor/fusion-framework-dev-portal 11.1.0 → 11.1.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.
Files changed (2) hide show
  1. package/dist/main.js +86 -76
  2. package/package.json +22 -22
package/dist/main.js CHANGED
@@ -70356,7 +70356,7 @@ function lMe(e = window.FUSION_MOCK_SERVER_URL) {
70356
70356
  }
70357
70357
  //#endregion
70358
70358
  //#region src/version.ts
70359
- var uMe = "11.1.0", dMe = async (e) => {
70359
+ var uMe = "11.1.1", dMe = async (e) => {
70360
70360
  Wg(e, {
70361
70361
  attachConfiguratorEvents: !0,
70362
70362
  configure: (e, t) => {
@@ -79257,22 +79257,28 @@ var XVe = ({ id: e, label: t, meta: n, helperText: r, helperIcon: i, variant: a,
79257
79257
  onActivate: n.activateClaimableRoleAssignment
79258
79258
  })
79259
79259
  ] });
79260
- }, v3 = ({ requiredAccessRoles: e, children: t }) => {
79261
- let n = nA("roles"), r = v$(e ?? []), i = e !== void 0 && r !== "[]";
79260
+ }, v3 = ({ requiredAccessRoles: e, fallbackRender: t, FallbackComponent: n, children: r }) => {
79261
+ let i = nA("roles"), a = v$(e ?? []), o = e !== void 0 && a !== "[]";
79262
79262
  return (0, G.jsx)(g$, {
79263
- resetKeys: [r, n],
79264
- fallbackRender: ({ error: e, resetErrorBoundary: t }) => {
79265
- let n = m3(e);
79266
- if (!_$(n)) throw n;
79267
- return (0, G.jsx)(oHe, {
79268
- error: n,
79269
- onRetry: t
79263
+ resetKeys: [a, i],
79264
+ fallbackRender: ({ error: e, resetErrorBoundary: r }) => {
79265
+ let i = m3(e);
79266
+ if (!_$(i)) throw i;
79267
+ return t ? t({
79268
+ error: i,
79269
+ resetErrorBoundary: r
79270
+ }) : n ? (0, G.jsx)(n, {
79271
+ error: i,
79272
+ resetErrorBoundary: r
79273
+ }) : (0, G.jsx)(oHe, {
79274
+ error: i,
79275
+ onRetry: r
79270
79276
  });
79271
79277
  },
79272
- children: i ? (0, G.jsx)($Ve, {
79278
+ children: o ? (0, G.jsx)($Ve, {
79273
79279
  requiredAccessRoles: e,
79274
- children: t
79275
- }) : t
79280
+ children: r
79281
+ }) : r
79276
79282
  });
79277
79283
  }, y3 = (0, j.createContext)(void 0), b3 = () => {
79278
79284
  let e = (0, j.useContext)(y3);
@@ -79948,117 +79954,121 @@ var M3 = {
79948
79954
  complete: a,
79949
79955
  suppress: s
79950
79956
  };
79951
- }, NHe = 6e4, PHe = ({ provider: e, requiredAccessRoles: t, children: n }) => {
79952
- let r = (0, j.useMemo)(() => new jHe(e), [e]), i = (0, j.useCallback)((e) => {
79953
- let t = r.subscribe(e);
79957
+ }, NHe = 6e4, PHe = ({ provider: e, requiredAccessRoles: t, fallbackRender: n, FallbackComponent: r, children: i }) => {
79958
+ let a = (0, j.useMemo)(() => new jHe(e), [e]), o = (0, j.useCallback)((e) => {
79959
+ let t = a.subscribe(e);
79954
79960
  return () => t.unsubscribe();
79955
- }, [r]), a = (0, j.useCallback)(() => r.value, [r]), o = (0, j.useSyncExternalStore)(i, a, a), s = MHe(o.consolidatedClaimableRoleAssignments), c = (0, j.useRef)(!1), l = (0, j.useRef)(0);
79961
+ }, [a]), s = (0, j.useCallback)(() => a.value, [a]), c = (0, j.useSyncExternalStore)(o, s, s), l = MHe(c.consolidatedClaimableRoleAssignments), u = (0, j.useRef)(!1), d = (0, j.useRef)(0);
79956
79962
  (0, j.useEffect)(() => {
79957
- let e = ++l.current;
79963
+ let e = ++d.current;
79958
79964
  return Promise.allSettled([
79959
- r.loadActiveAccessRoleAssignments(),
79960
- r.loadConsolidatedClaimableRoleAssignments(),
79961
- r.loadConsolidatedRoleAssignments()
79965
+ a.loadActiveAccessRoleAssignments(),
79966
+ a.loadConsolidatedClaimableRoleAssignments(),
79967
+ a.loadConsolidatedRoleAssignments()
79962
79968
  ]), () => {
79963
79969
  queueMicrotask(() => {
79964
- l.current === e && r.dispose();
79970
+ d.current === e && a.dispose();
79965
79971
  });
79966
79972
  };
79967
- }, [r]);
79968
- let u = (0, j.useCallback)(async () => {
79969
- if (!c.current) {
79970
- c.current = !0;
79973
+ }, [a]);
79974
+ let f = (0, j.useCallback)(async () => {
79975
+ if (!u.current) {
79976
+ u.current = !0;
79971
79977
  try {
79972
79978
  await Promise.allSettled([
79973
- r.loadActiveAccessRoleAssignments(!0),
79974
- r.loadConsolidatedClaimableRoleAssignments(!0),
79975
- r.loadConsolidatedRoleAssignments(!0)
79979
+ a.loadActiveAccessRoleAssignments(!0),
79980
+ a.loadConsolidatedClaimableRoleAssignments(!0),
79981
+ a.loadConsolidatedRoleAssignments(!0)
79976
79982
  ]);
79977
79983
  } finally {
79978
- c.current = !1;
79984
+ u.current = !1;
79979
79985
  }
79980
79986
  }
79981
- }, [r]);
79987
+ }, [a]);
79982
79988
  (0, j.useEffect)(() => {
79983
79989
  let e = () => {
79984
- document.visibilityState === "visible" && u();
79990
+ document.visibilityState === "visible" && f();
79985
79991
  }, t = window.setInterval(e, NHe);
79986
79992
  return window.addEventListener("focus", e), document.addEventListener("visibilitychange", e), () => {
79987
79993
  window.clearInterval(t), window.removeEventListener("focus", e), document.removeEventListener("visibilitychange", e);
79988
79994
  };
79989
- }, [u]);
79990
- let d = (0, j.useCallback)(() => r.loadActiveAccessRoleAssignments(!0), [r]), f = (0, j.useCallback)(() => r.loadConsolidatedClaimableRoleAssignments(!0), [r]), p = (0, j.useCallback)(() => r.loadConsolidatedRoleAssignments(!0), [r]), m = (0, j.useCallback)((e) => r.activateClaimableRoleAssignment(e), [r]), { suppress: h, complete: g } = s, _ = (0, j.useCallback)(async (e) => {
79991
- let t = h(e.assignmentId);
79995
+ }, [f]);
79996
+ let p = (0, j.useCallback)(() => a.loadActiveAccessRoleAssignments(!0), [a]), m = (0, j.useCallback)(() => a.loadConsolidatedClaimableRoleAssignments(!0), [a]), h = (0, j.useCallback)(() => a.loadConsolidatedRoleAssignments(!0), [a]), g = (0, j.useCallback)((e) => a.activateClaimableRoleAssignment(e), [a]), { suppress: _, complete: v } = l, y = (0, j.useCallback)(async (e) => {
79997
+ let t = _(e.assignmentId);
79992
79998
  try {
79993
- return await r.deactivateClaimableRoleAssignment(e);
79999
+ return await a.deactivateClaimableRoleAssignment(e);
79994
80000
  } catch (e) {
79995
80001
  throw t(), e;
79996
80002
  }
79997
- }, [r, h]), v = (0, j.useMemo)(() => ({
80003
+ }, [a, _]), b = (0, j.useMemo)(() => ({
79998
80004
  activeAccessRoleAssignments: {
79999
- assignments: o.activeAccessRoleAssignments.assignments,
80000
- isLoading: o.activeAccessRoleAssignments.status === "loading",
80001
- error: o.activeAccessRoleAssignments.error,
80002
- reload: d
80005
+ assignments: c.activeAccessRoleAssignments.assignments,
80006
+ isLoading: c.activeAccessRoleAssignments.status === "loading",
80007
+ error: c.activeAccessRoleAssignments.error,
80008
+ reload: p
80003
80009
  },
80004
80010
  consolidatedClaimableRoleAssignments: {
80005
- assignments: o.consolidatedClaimableRoleAssignments.assignments,
80006
- isLoading: o.consolidatedClaimableRoleAssignments.status === "loading",
80007
- error: o.consolidatedClaimableRoleAssignments.error,
80008
- reload: f,
80009
- activateClaimableRoleAssignment: m,
80010
- deactivateClaimableRoleAssignment: _,
80011
- isActivating: o.activation.pending > 0,
80012
- activationError: o.activation.error,
80013
- isDeactivating: o.deactivation.pending > 0,
80014
- deactivationError: o.deactivation.error
80011
+ assignments: c.consolidatedClaimableRoleAssignments.assignments,
80012
+ isLoading: c.consolidatedClaimableRoleAssignments.status === "loading",
80013
+ error: c.consolidatedClaimableRoleAssignments.error,
80014
+ reload: m,
80015
+ activateClaimableRoleAssignment: g,
80016
+ deactivateClaimableRoleAssignment: y,
80017
+ isActivating: c.activation.pending > 0,
80018
+ activationError: c.activation.error,
80019
+ isDeactivating: c.deactivation.pending > 0,
80020
+ deactivationError: c.deactivation.error
80015
80021
  },
80016
80022
  consolidatedRoleAssignments: {
80017
- assignments: o.consolidatedRoleAssignments.assignments,
80018
- isLoading: o.consolidatedRoleAssignments.status === "loading",
80019
- error: o.consolidatedRoleAssignments.error,
80020
- reload: p
80023
+ assignments: c.consolidatedRoleAssignments.assignments,
80024
+ isLoading: c.consolidatedRoleAssignments.status === "loading",
80025
+ error: c.consolidatedRoleAssignments.error,
80026
+ reload: h
80021
80027
  }
80022
80028
  }), [
80023
- o,
80024
- d,
80025
- f,
80029
+ c,
80026
80030
  p,
80027
80031
  m,
80028
- _
80032
+ h,
80033
+ g,
80034
+ y
80029
80035
  ]);
80030
80036
  return (0, G.jsx)(v3, {
80031
80037
  requiredAccessRoles: t,
80038
+ fallbackRender: n,
80039
+ FallbackComponent: r,
80032
80040
  children: (0, G.jsxs)(y3.Provider, {
80033
- value: v,
80034
- children: [n, (0, G.jsx)(g3, {
80035
- claimableRoleAssignment: s.claimableRoleAssignment,
80041
+ value: b,
80042
+ children: [i, (0, G.jsx)(g3, {
80043
+ claimableRoleAssignment: l.claimableRoleAssignment,
80036
80044
  defaultReason: "Continue active work",
80037
- isActivating: o.activation.pending > 0,
80038
- onClose: s.dismiss,
80045
+ isActivating: c.activation.pending > 0,
80046
+ onClose: l.dismiss,
80039
80047
  onActivate: async (e, t, n) => {
80040
- await r.activateClaimableRoleAssignment({
80048
+ await a.activateClaimableRoleAssignment({
80041
80049
  assignmentId: e,
80042
80050
  reason: t,
80043
80051
  hours: n
80044
- }), g(e);
80052
+ }), v(e);
80045
80053
  }
80046
80054
  })]
80047
80055
  })
80048
80056
  });
80049
- }, FHe = ({ requiredAccessRoles: e, children: t }) => {
80050
- let n = nA("roles"), [r, i] = (0, j.useState)({
80051
- provider: n,
80057
+ }, FHe = ({ requiredAccessRoles: e, fallbackRender: t, FallbackComponent: n, children: r }) => {
80058
+ let i = nA("roles"), [a, o] = (0, j.useState)({
80059
+ provider: i,
80052
80060
  generation: 0
80053
80061
  });
80054
- if (!n || typeof n.getActiveAccessRoleAssignments != "function" || typeof n.getConsolidatedClaimableRoleAssignments != "function" || typeof n.getConsolidatedRoleAssignments != "function" || typeof n.activateClaimableRoleAssignment != "function" || typeof n.deactivateClaimableRoleAssignment != "function" || typeof n.hasAccessRole != "function") throw Error("RolesProvider requires a configured Roles module. Call enableRoles in the Fusion module configuration and mount inside its module context.");
80055
- return r.provider === n ? (0, G.jsx)(PHe, {
80056
- provider: n,
80062
+ if (!i || typeof i.getActiveAccessRoleAssignments != "function" || typeof i.getConsolidatedClaimableRoleAssignments != "function" || typeof i.getConsolidatedRoleAssignments != "function" || typeof i.activateClaimableRoleAssignment != "function" || typeof i.deactivateClaimableRoleAssignment != "function" || typeof i.hasAccessRole != "function") throw Error("RolesProvider requires a configured Roles module. Call enableRoles in the Fusion module configuration and mount inside its module context.");
80063
+ return a.provider === i ? (0, G.jsx)(PHe, {
80064
+ provider: i,
80057
80065
  requiredAccessRoles: e,
80058
- children: t
80059
- }, r.generation) : (i({
80060
- provider: n,
80061
- generation: r.generation + 1
80066
+ fallbackRender: t,
80067
+ FallbackComponent: n,
80068
+ children: r
80069
+ }, a.generation) : (o({
80070
+ provider: i,
80071
+ generation: a.generation + 1
80062
80072
  }), null);
80063
80073
  }, I3 = ({ error: e }) => /* @__PURE__ */ (0, G.jsxs)(G.Fragment, { children: [/* @__PURE__ */ (0, G.jsxs)("div", {
80064
80074
  style: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-dev-portal",
3
- "version": "11.1.0",
3
+ "version": "11.1.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "module": "./dist/main.js",
@@ -50,50 +50,50 @@
50
50
  "vite": "^8.0.0",
51
51
  "vitest": "^4.1.0",
52
52
  "vitest-browser-react": "^2.2.0",
53
- "@equinor/fusion-framework": "9.0.1",
54
53
  "@equinor/fusion-framework-app": "13.1.7",
55
- "@equinor/fusion-framework-module-ag-grid": "37.1.2",
56
54
  "@equinor/fusion-framework-dev-server": "2.1.7",
57
- "@equinor/fusion-framework-module-context": "9.0.1",
58
- "@equinor/fusion-framework-module-feature-flag": "2.1.1",
59
- "@equinor/fusion-framework-module-analytics": "3.1.7",
55
+ "@equinor/fusion-framework-module-ag-grid": "37.1.2",
60
56
  "@equinor/fusion-framework-module-bookmark": "4.1.2",
57
+ "@equinor/fusion-framework-module-analytics": "3.1.7",
58
+ "@equinor/fusion-framework-module-context": "9.0.1",
59
+ "@equinor/fusion-framework": "9.0.1",
61
60
  "@equinor/fusion-framework-module-navigation": "7.0.10",
62
61
  "@equinor/fusion-framework-module-app": "8.2.0",
63
- "@equinor/fusion-framework-module-services": "8.1.2",
64
62
  "@equinor/fusion-framework-module-roles": "^0.3.0",
65
63
  "@equinor/fusion-framework-module-telemetry": "7.1.2",
64
+ "@equinor/fusion-framework-module-services": "8.1.2",
65
+ "@equinor/fusion-framework-plugin-context-navigation": "1.0.3",
66
66
  "@equinor/fusion-framework-react": "9.0.2",
67
+ "@equinor/fusion-framework-react-components-roles": "^0.2.0",
67
68
  "@equinor/fusion-framework-react-components-bookmark": "2.0.5",
68
- "@equinor/fusion-framework-plugin-context-navigation": "1.0.3",
69
- "@equinor/fusion-framework-react-components-roles": "^0.1.2",
69
+ "@equinor/fusion-framework-react-module-bookmark": "7.0.1",
70
+ "@equinor/fusion-framework-module-feature-flag": "2.1.1",
70
71
  "@equinor/fusion-framework-react-components-people-provider": "2.0.6",
71
72
  "@equinor/fusion-framework-react-router": "2.4.4",
72
- "@equinor/fusion-framework-react-module-bookmark": "7.0.1",
73
- "@equinor/fusion-query": "7.0.5",
74
- "@equinor/fusion-observable": "9.2.3"
73
+ "@equinor/fusion-observable": "9.2.3",
74
+ "@equinor/fusion-query": "7.0.5"
75
75
  },
76
76
  "peerDependencies": {
77
- "@equinor/fusion-framework": "9.0.1",
78
- "@equinor/fusion-framework-app": "13.1.7",
79
77
  "@equinor/fusion-framework-dev-server": "2.1.7",
78
+ "@equinor/fusion-framework-app": "13.1.7",
80
79
  "@equinor/fusion-framework-module-ag-grid": "37.1.2",
80
+ "@equinor/fusion-framework-module-analytics": "3.1.7",
81
+ "@equinor/fusion-framework": "9.0.1",
81
82
  "@equinor/fusion-framework-module-app": "8.2.0",
82
- "@equinor/fusion-framework-module-bookmark": "4.1.2",
83
- "@equinor/fusion-framework-module-context": "9.0.1",
84
83
  "@equinor/fusion-framework-module-feature-flag": "2.1.1",
85
- "@equinor/fusion-framework-module-analytics": "3.1.7",
84
+ "@equinor/fusion-framework-module-bookmark": "4.1.2",
86
85
  "@equinor/fusion-framework-module-navigation": "7.0.10",
87
- "@equinor/fusion-framework-module-roles": "^0.3.0",
86
+ "@equinor/fusion-framework-module-context": "9.0.1",
88
87
  "@equinor/fusion-framework-module-services": "8.1.2",
89
88
  "@equinor/fusion-framework-module-telemetry": "7.1.2",
89
+ "@equinor/fusion-framework-module-roles": "^0.3.0",
90
90
  "@equinor/fusion-framework-plugin-context-navigation": "1.0.3",
91
91
  "@equinor/fusion-framework-react": "9.0.2",
92
- "@equinor/fusion-framework-react-components-bookmark": "2.0.5",
93
- "@equinor/fusion-framework-react-components-people-provider": "2.0.6",
94
- "@equinor/fusion-framework-react-components-roles": "^0.1.2",
95
- "@equinor/fusion-observable": "9.2.3",
92
+ "@equinor/fusion-framework-react-components-roles": "^0.2.0",
96
93
  "@equinor/fusion-framework-react-module-bookmark": "7.0.1",
94
+ "@equinor/fusion-observable": "9.2.3",
95
+ "@equinor/fusion-framework-react-components-people-provider": "2.0.6",
96
+ "@equinor/fusion-framework-react-components-bookmark": "2.0.5",
97
97
  "@equinor/fusion-query": "7.0.5"
98
98
  },
99
99
  "peerDependenciesMeta": {