Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
6da2937
STRIPES-861: Setup federation
mkuklis Apr 25, 2023
eac40b8
Cleanup
mkuklis Apr 26, 2023
b6aa8f9
Cache remote components
mkuklis Apr 26, 2023
ff5e9a3
Prefetch handlers
mkuklis Apr 26, 2023
5ab4837
Align stripes-shared-context correctly
mkuklis Apr 27, 2023
9fd0420
Update @folio/stripes-shared-context version
mkuklis Apr 27, 2023
3b4fca0
wrap Pluggable's rendered Child in suspense to isolate react-dom's hi…
JohnC-80 May 25, 2023
86b3273
STCOR-718 load remote translations (#1309)
zburke Jun 8, 2023
72cb6e6
STCOR-725 load remote icons (#1317)
zburke Jun 9, 2023
d67c351
STCOR-718 correctly set apps' localized displayName
zburke Aug 4, 2023
f66ad62
STCOR-725 correctly load multiple icons per app
zburke Aug 4, 2023
44bd6dd
refactor catch up
zburke Dec 4, 2024
98a6b0e
resolve conflicts
JohnC-80 Nov 3, 2025
72a3f54
add registry to token util's set of paths for creds
JohnC-80 Nov 14, 2025
3cf47fd
ship context out to stripes-shared-context
JohnC-80 Nov 14, 2025
21dd6ad
preload all the things
JohnC-80 Nov 14, 2025
3deb33c
go back to memo'd version
JohnC-80 Nov 14, 2025
c756333
clean up
JohnC-80 Nov 14, 2025
7dc0e1d
only import/re-export context/initial values from shared-context
JohnC-80 Nov 19, 2025
a3f0b49
module-federation logic is conditional on entitlementUrl from stripes…
JohnC-80 Dec 3, 2025
231e812
remove 'prefetch' comment
JohnC-80 Dec 3, 2025
17c42d2
sync changes to context with main branch
JohnC-80 Dec 3, 2025
6a2fffa
Merge branch 'main' into STRIPES-861-int
JohnC-80 Dec 3, 2025
aff4513
import order sync with main branch
JohnC-80 Dec 3, 2025
36a8ae8
inject remote modules into build-time modules
JohnC-80 Dec 3, 2025
4139c2f
re-add store icons to props on Root
JohnC-80 Dec 3, 2025
256e9f1
add setTranslations function to stripes
JohnC-80 Dec 5, 2025
2270e9f
sync okapiReducer
JohnC-80 Dec 5, 2025
d7d1024
okapi ranslations reducer should accumulate
JohnC-80 Dec 5, 2025
561160e
more sync with main, sonar guidance
JohnC-80 Dec 5, 2025
1b7d162
re-add init, remove bootstrap so that main branch of stripes-ui is okay
JohnC-80 Dec 5, 2025
c7c82c1
remove entitlement request from permissible in rtr logic
JohnC-80 Dec 5, 2025
5de79ed
add test for EntitlementLoader
JohnC-80 Dec 12, 2025
f74951d
Merge branch 'main' into STRIPES-861-int
JohnC-80 Dec 12, 2025
72131bd
add test for loadRemoteComponent
JohnC-80 Dec 15, 2025
c9c7984
Merge branch 'STRIPES-861-int' of github.com:folio-org/stripes-core i…
JohnC-80 Dec 15, 2025
5bfba3e
add icon to registry mock
JohnC-80 Dec 15, 2025
795ad2c
add test for loadEntitlement
JohnC-80 Dec 15, 2025
81125bd
modify test for setTranslations reducer to handle merge logic
JohnC-80 Dec 15, 2025
5d97590
correct okapiReducer test
JohnC-80 Dec 15, 2025
62bdaf4
merge config and remote modules at render so updates to configModules…
JohnC-80 Dec 16, 2025
bd10958
import icons from stripes-config if there are any
JohnC-80 Dec 16, 2025
680e259
combine app icons from configuration and props in Root
JohnC-80 Dec 16, 2025
0ea08b8
wrap expected errors in try/catch
JohnC-80 Dec 16, 2025
a8f3a6d
convert to async/await
JohnC-80 Dec 16, 2025
ceafdff
add test for ADD_ICON okapiReducer
JohnC-80 Dec 16, 2025
779b6ec
add error handling to loadRemoteComponent, update loadRemoteComponent…
JohnC-80 Dec 16, 2025
2cb6e5b
remove only from lrc test
JohnC-80 Dec 16, 2025
7a4ef26
split out more of the loadEntitlement logic from EntitlementLoader
JohnC-80 Dec 17, 2025
15c509b
Merge branch 'main' into STRIPES-861-int
JohnC-80 Jan 14, 2026
2a6dc51
loadRemoteComponent does script/src injection, translation loading pr…
JohnC-80 Jan 14, 2026
04e783e
Merge branch 'STRIPES-861-int' of github.com:folio-org/stripes-core i…
JohnC-80 Jan 14, 2026
16e460d
pull stripes-hub api info from localforage
JohnC-80 Jan 22, 2026
885cf5c
sync with actual entitlement response
JohnC-80 Jan 22, 2026
d9c47d8
add a constant for the name of stripes in the host app bundle, shape …
JohnC-80 Jan 22, 2026
fedb1cc
properly set up registry if fetched from the entitlement URL
JohnC-80 Jan 22, 2026
edfcca7
use AbortController for handling remote fetching in useEffect
JohnC-80 Jan 22, 2026
4268490
semicolon on entitlement request error handling
JohnC-80 Jan 22, 2026
4282ea8
braces on entitlementLoader useEffect
JohnC-80 Jan 22, 2026
62fb1ef
handle subdirectory hosting of ui-modules
JohnC-80 Jan 27, 2026
50469e7
fix tests for EntitlementLoader and LoadRemoteComponent
JohnC-80 Feb 1, 2026
a1130d1
add default mock for localforage/hostLocation (null), add test for lo…
JohnC-80 Feb 1, 2026
c8daff7
isolate localforage wrapper mocks and clean up after loadTranslations…
JohnC-80 Feb 2, 2026
1afb2c1
s/entitlementUrl/discoveryUrl/g
zburke Feb 3, 2026
ba9179c
logging clean-up, remove dangling space/test bother
JohnC-80 Feb 3, 2026
19e3276
Merge branch 'main' into STRIPES-861-int
JohnC-80 Feb 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 128 additions & 125 deletions src/RootWithIntl.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import StaleBundleWarning from './components/StaleBundleWarning';
import { StripesContext } from './StripesContext';
import { CalloutContext } from './CalloutContext';
import AuthnLogin from './components/AuthnLogin';
import EntitlementLoader from './components/EntitlementLoader';

const RootWithIntl = ({ stripes, token = '', isAuthenticated = false, disableAuth, history = {}, queryClient }) => {
const connect = connectFor('@folio/core', stripes.epics, stripes.logger);
Expand Down Expand Up @@ -72,132 +73,134 @@ const RootWithIntl = ({ stripes, token = '', isAuthenticated = false, disableAut
<StripesContext.Provider value={connectedStripes}>
<CalloutContext.Provider value={callout}>
<ModuleTranslator>
<TitleManager>
<HotKeys
keyMap={connectedStripes.bindings}
attach={document.body}
noWrapper
>
<Provider store={connectedStripes.store}>
<Router history={history}>
{isAuthenticated || token || disableAuth ?
<>
<QueryStateUpdater stripes={connectedStripes} queryClient={queryClient} />
<MainContainer>
<AppCtxMenuProvider>
<AppOrderProvider>
<MainNav stripes={connectedStripes} queryClient={queryClient} />
{typeof connectedStripes?.config?.staleBundleWarning === 'object' && <StaleBundleWarning />}
<HandlerManager
event={events.LOGIN}
stripes={connectedStripes}
/>
{(typeof connectedStripes.okapi !== 'object' || connectedStripes.discovery.isFinished) && (
<ModuleContainer id="content">
<OverlayContainer />
<SessionEventContainer history={history} queryClient={queryClient} />
<Switch>
<TitledRoute
name="home"
path="/"
key="root"
exact
component={<Front stripes={connectedStripes} />}
/>
<TitledRoute
name="ssoRedirect"
path="/sso-landing"
key="sso-landing"
component={<SSORedirect stripes={connectedStripes} />}
/>
<TitledRoute
name="oidcRedirect"
path="/oidc-landing"
key="oidc-landing"
component={<OIDCRedirect stripes={stripes} />}
/>
<TitledRoute
name="logoutTimeout"
path="/logout-timeout"
component={<Logout />}
/>
<TitledRoute
name="settings"
path="/settings"
component={<Settings stripes={connectedStripes} />}
/>
<TitledRoute
name="logout"
path="/logout"
component={<Logout />}
/>
<ModuleRoutes stripes={connectedStripes} />
</Switch>
</ModuleContainer>
)}
</AppOrderProvider>
</AppCtxMenuProvider>
</MainContainer>
<Callout ref={setCalloutDomRef} />
</> :
<Switch>
{/* The ? after :token makes that part of the path optional, so that token may optionally
<EntitlementLoader>
<TitleManager>
<HotKeys
keyMap={connectedStripes.bindings}
attach={document.body}
noWrapper
>
<Provider store={connectedStripes.store}>
<Router history={history}>
{isAuthenticated || token || disableAuth ?
<>
<QueryStateUpdater stripes={connectedStripes} queryClient={queryClient} />
<MainContainer>
<AppCtxMenuProvider>
<AppOrderProvider>
<MainNav stripes={connectedStripes} queryClient={queryClient} />
{typeof connectedStripes?.config?.staleBundleWarning === 'object' && <StaleBundleWarning />}
<HandlerManager
event={events.LOGIN}
stripes={connectedStripes}
/>
{(typeof connectedStripes.okapi !== 'object' || connectedStripes.discovery.isFinished) && (
<ModuleContainer id="content">
<OverlayContainer />
<SessionEventContainer history={history} queryClient={queryClient} />
<Switch>
<TitledRoute
name="home"
path="/"
key="root"
exact
component={<Front stripes={connectedStripes} />}
/>
<TitledRoute
name="ssoRedirect"
path="/sso-landing"
key="sso-landing"
component={<SSORedirect stripes={connectedStripes} />}
/>
<TitledRoute
name="oidcRedirect"
path="/oidc-landing"
key="oidc-landing"
component={<OIDCRedirect stripes={stripes} />}
/>
<TitledRoute
name="logoutTimeout"
path="/logout-timeout"
component={<Logout />}
/>
<TitledRoute
name="settings"
path="/settings"
component={<Settings stripes={connectedStripes} />}
/>
<TitledRoute
name="logout"
path="/logout"
component={<Logout />}
/>
<ModuleRoutes stripes={connectedStripes} />
</Switch>
</ModuleContainer>
)}
</AppOrderProvider>
</AppCtxMenuProvider>
</MainContainer>
<Callout ref={setCalloutDomRef} />
</> :
<Switch>
{/* The ? after :token makes that part of the path optional, so that token may optionally
be passed in via URL parameter to avoid length restrictions */}
<TitledRoute
name="CreateResetPassword"
path="/reset-password/:token?"
component={<CreateResetPassword stripes={connectedStripes} />}
/>
<TitledRoute
name="ssoLanding"
exact
path="/sso-landing"
component={<CookiesProvider><SSOLanding stripes={connectedStripes} /></CookiesProvider>}
key="sso-landing"
/>
<TitledRoute
name="oidcLanding"
exact
path="/oidc-landing"
component={<CookiesProvider><OIDCLanding stripes={stripes} /></CookiesProvider>}
key="oidc-landing"
/>
<TitledRoute
name="forgotPassword"
path="/forgot-password"
component={<ForgotPassword stripes={connectedStripes} />}
/>
<TitledRoute
name="forgotUsername"
path="/forgot-username"
component={<ForgotUserName stripes={connectedStripes} />}
/>
<TitledRoute
name="checkEmail"
path="/check-email"
component={<CheckEmailStatusPage />}
/>
<TitledRoute
name="logout"
path="/logout"
component={<Logout />}
/>
<TitledRoute
name="logoutTimeout"
path="/logout-timeout"
component={<Logout />}
/>
<TitledRoute
name="login"
path="*"
component={<AuthnLogin stripes={connectedStripes} />}
/>
</Switch>
}
</Router>
</Provider>
</HotKeys>
</TitleManager>
<TitledRoute
name="CreateResetPassword"
path="/reset-password/:token?"
component={<CreateResetPassword stripes={connectedStripes} />}
/>
<TitledRoute
name="ssoLanding"
exact
path="/sso-landing"
component={<CookiesProvider><SSOLanding stripes={connectedStripes} /></CookiesProvider>}
key="sso-landing"
/>
<TitledRoute
name="oidcLanding"
exact
path="/oidc-landing"
component={<CookiesProvider><OIDCLanding stripes={stripes} /></CookiesProvider>}
key="oidc-landing"
/>
<TitledRoute
name="forgotPassword"
path="/forgot-password"
component={<ForgotPassword stripes={connectedStripes} />}
/>
<TitledRoute
name="forgotUsername"
path="/forgot-username"
component={<ForgotUserName stripes={connectedStripes} />}
/>
<TitledRoute
name="checkEmail"
path="/check-email"
component={<CheckEmailStatusPage />}
/>
<TitledRoute
name="logout"
path="/logout"
component={<Logout />}
/>
<TitledRoute
name="logoutTimeout"
path="/logout-timeout"
component={<Logout />}
/>
<TitledRoute
name="login"
path="*"
component={<AuthnLogin stripes={connectedStripes} />}
/>
</Switch>
}
</Router>
</Provider>
</HotKeys>
</TitleManager>
</EntitlementLoader>
</ModuleTranslator>
</CalloutContext.Provider>
</StripesContext.Provider>
Expand Down
Loading
Loading