diff --git a/packages/ui/src/ui/containers/ACL/index.tsx b/packages/ui/src/ui/containers/ACL/index.tsx new file mode 100644 index 000000000..94ccd004d --- /dev/null +++ b/packages/ui/src/ui/containers/ACL/index.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import withLazyLoading from '../../hocs/withLazyLoading'; + +function importAcl() { + return import(/* webpackChunkName: "acl" */ './ACL-connect-helpers'); +} + +export const AccessContentAcl = withLazyLoading( + React.lazy(async () => { + return {default: (await importAcl()).AccessContentAcl}; + }), +); + +export const NavigationAcl = withLazyLoading( + React.lazy(async () => { + return {default: (await importAcl()).NavigationAcl}; + }), +); + +export const PoolAclPanel = withLazyLoading( + React.lazy(async () => { + return {default: (await importAcl()).PoolAclPanel}; + }), +); + +export const AccountsAcl = withLazyLoading( + React.lazy(async () => { + return {default: (await importAcl()).AccountsAcl}; + }), +); + +export const BundleAcl = withLazyLoading( + React.lazy(async () => { + return {default: (await importAcl()).BundleAcl}; + }), +); diff --git a/packages/ui/src/ui/pages/accounts/tabs/acl/AccountsAclTab.js b/packages/ui/src/ui/pages/accounts/tabs/acl/AccountsAclTab.js index 97e043744..073ddf321 100644 --- a/packages/ui/src/ui/pages/accounts/tabs/acl/AccountsAclTab.js +++ b/packages/ui/src/ui/pages/accounts/tabs/acl/AccountsAclTab.js @@ -7,7 +7,7 @@ import AccountsNoContent from '../../../../pages/accounts/AccountsNoContent'; import {getActiveAccount} from '../../../../store/selectors/accounts/accounts'; import {fetchAccounts} from '../../../../store/actions/accounts/accounts'; import {loadUsers} from '../../../../store/actions/accounts/editor'; -import {AccountsAcl} from '../../../../containers/ACL/ACL-connect-helpers'; +import {AccountsAcl} from '../../../../containers/ACL'; AccountsAclTab.propTypes = { activeAccount: PropTypes.string, diff --git a/packages/ui/src/ui/pages/chyt/ChytPageClique/ChytPageCliqueAcl.tsx b/packages/ui/src/ui/pages/chyt/ChytPageClique/ChytPageCliqueAcl.tsx index c0ddfe431..3b92012df 100644 --- a/packages/ui/src/ui/pages/chyt/ChytPageClique/ChytPageCliqueAcl.tsx +++ b/packages/ui/src/ui/pages/chyt/ChytPageClique/ChytPageCliqueAcl.tsx @@ -2,7 +2,7 @@ import React from 'react'; import {useSelector} from 'react-redux'; import {getChytCurrentAlias} from '../../../store/selectors/chyt'; -import {AccessContentAcl} from '../../../containers/ACL/ACL-connect-helpers'; +import {AccessContentAcl} from '../../../containers/ACL'; export function ChytPageCliqueAcl() { const alias = useSelector(getChytCurrentAlias); diff --git a/packages/ui/src/ui/pages/navigation/tabs/ACL/ACL.js b/packages/ui/src/ui/pages/navigation/tabs/ACL/ACL.js index eb09b1f79..19f87b56b 100644 --- a/packages/ui/src/ui/pages/navigation/tabs/ACL/ACL.js +++ b/packages/ui/src/ui/pages/navigation/tabs/ACL/ACL.js @@ -1,7 +1,7 @@ import React from 'react'; import {connect} from 'react-redux'; -import {AccessContentAcl, NavigationAcl} from '../../../../containers/ACL/ACL-connect-helpers'; +import {AccessContentAcl, NavigationAcl} from '../../../../containers/ACL'; import {getAclLoadState} from '../../../../store/selectors/acl'; import {getAttributes, getRawPath} from '../../../../store/selectors/navigation'; import {IdmObjectType} from '../../../../constants/acl'; diff --git a/packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAcl/PoolAcl.js b/packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAcl/PoolAcl.js index e539df57f..5eca04da1 100644 --- a/packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAcl/PoolAcl.js +++ b/packages/ui/src/ui/pages/scheduling/Content/tabs/PoolAcl/PoolAcl.js @@ -10,7 +10,7 @@ import { getPools, getTree, } from '../../../../../store/selectors/scheduling/scheduling'; -import {PoolAclPanel} from '../../../../../containers/ACL/ACL-connect-helpers'; +import {PoolAclPanel} from '../../../../../containers/ACL'; import {RumMeasureTypes} from '../../../../../rum/rum-measure-types'; import {useRumMeasureStop} from '../../../../../rum/RumUiContext'; import {isFinalLoadingStatus} from '../../../../../utils/utils'; diff --git a/packages/ui/src/ui/pages/tablet_cell_bundles/bundle/BundleAclTab.tsx b/packages/ui/src/ui/pages/tablet_cell_bundles/bundle/BundleAclTab.tsx index de6a3247c..6d77f0992 100644 --- a/packages/ui/src/ui/pages/tablet_cell_bundles/bundle/BundleAclTab.tsx +++ b/packages/ui/src/ui/pages/tablet_cell_bundles/bundle/BundleAclTab.tsx @@ -4,7 +4,7 @@ import ErrorBoundary from '../../../components/ErrorBoundary/ErrorBoundary'; import {getTabletsActiveBundle} from '../../../store/selectors/tablet_cell_bundles'; import {isPoolAclAllowed} from '../../../store/selectors/scheduling/scheduling'; import {NoContent} from '../../../components/NoContent/NoContent'; -import {BundleAcl} from '../../../containers/ACL/ACL-connect-helpers'; +import {BundleAcl} from '../../../containers/ACL'; export default function BundleAclTab() { const activeBundle = useSelector(getTabletsActiveBundle);