forked from rucio/webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sdk: fix next.js dynamic imports for feature loading
- Loading branch information
Showing
4 changed files
with
116 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,47 @@ | ||
import DIDGatewayOutputPort from "@/lib/core/port/secondary/did-gateway-output-port"; | ||
import { ListDIDsError, ListDIDsRequest, ListDIDsResponse } from "@/lib/core/usecase-models/list-dids-usecase-models"; | ||
import { ListDIDsControllerParameters } from "@/lib/infrastructure/controller/list-dids-controller"; | ||
import { ListDIDsViewModel } from "@/lib/infrastructure/data/view-model/list-did"; | ||
import { BaseStreamableFeature, IOCSymbols } from "@/lib/sdk/ioc-helpers"; | ||
import GATEWAYS from "@/lib/infrastructure/ioc/ioc-symbols-gateway"; | ||
import CONTROLLERS from "@/lib/infrastructure/ioc/ioc-symbols-controllers"; | ||
import INPUT_PORT from "@/lib/infrastructure/ioc/ioc-symbols-input-port"; | ||
import USECASE_FACTORY from "@/lib/infrastructure/ioc/ioc-symbols-usecase-factory"; | ||
import { Container } from "inversify"; | ||
import ListDIDsController from "@/lib/infrastructure/controller/list-dids-controller"; | ||
import ListDIDsUseCase from "@/lib/core/use-case/list-dids-usecase"; | ||
import ListDIDsPresenter from "../../presenter/list-dids-presenter"; | ||
|
||
import DIDGatewayOutputPort from '@/lib/core/port/secondary/did-gateway-output-port' | ||
import { | ||
ListDIDsError, | ||
ListDIDsRequest, | ||
ListDIDsResponse, | ||
} from '@/lib/core/usecase-models/list-dids-usecase-models' | ||
import { ListDIDsControllerParameters } from '@/lib/infrastructure/controller/list-dids-controller' | ||
import { ListDIDsViewModel } from '@/lib/infrastructure/data/view-model/list-did' | ||
import { | ||
BaseStreamableFeature, | ||
IFeature, | ||
IOCSymbols, | ||
} from '@/lib/sdk/ioc-helpers' | ||
import GATEWAYS from '@/lib/infrastructure/ioc/ioc-symbols-gateway' | ||
import CONTROLLERS from '@/lib/infrastructure/ioc/ioc-symbols-controllers' | ||
import INPUT_PORT from '@/lib/infrastructure/ioc/ioc-symbols-input-port' | ||
import USECASE_FACTORY from '@/lib/infrastructure/ioc/ioc-symbols-usecase-factory' | ||
import { Container } from 'inversify' | ||
import ListDIDsController from '@/lib/infrastructure/controller/list-dids-controller' | ||
import ListDIDsUseCase from '@/lib/core/use-case/list-dids-usecase' | ||
import ListDIDsPresenter from '../../presenter/list-dids-presenter' | ||
|
||
export default class ListDidsFeature extends BaseStreamableFeature< | ||
ListDIDsControllerParameters, | ||
ListDIDsRequest, | ||
ListDIDsResponse, | ||
ListDIDsError, | ||
ListDIDsViewModel> { | ||
constructor( appContainer: Container ) { | ||
const didGateway = appContainer.get<DIDGatewayOutputPort>(GATEWAYS.DID) | ||
const symbols: IOCSymbols = { | ||
CONTROLLER: CONTROLLERS.LIST_DIDS, | ||
USECASE_FACTORY: USECASE_FACTORY.LIST_DIDS, | ||
INPUT_PORT: INPUT_PORT.LIST_DIDS, | ||
} | ||
ListDIDsViewModel | ||
> { | ||
constructor(appContainer: Container) { | ||
const didGateway = appContainer.get<DIDGatewayOutputPort>(GATEWAYS.DID) | ||
const symbols: IOCSymbols = { | ||
CONTROLLER: CONTROLLERS.LIST_DIDS, | ||
USECASE_FACTORY: USECASE_FACTORY.LIST_DIDS, | ||
INPUT_PORT: INPUT_PORT.LIST_DIDS, | ||
} | ||
super( | ||
appContainer, | ||
'ListDIDs', | ||
ListDIDsController, | ||
ListDIDsUseCase, | ||
[ | ||
didGateway, | ||
], | ||
[didGateway], | ||
ListDIDsPresenter, | ||
false, | ||
symbols | ||
symbols, | ||
) | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters