@smartbit4all/document-explorer
TypeScript icon, indicating that this package has built-in type declarations

3.3.8 • Public • Published

SmartDocuStoreExplorer

How to setup

  1. Create a project-specific subclass from the DocuStoreExplorerPageApi interface and its implementation.
public interface YourDocuExplorerPageApi extends DocuStoreExplorerPageApi {}

public class YourDocuExplorerPageApiImpl extends DocuStoreExplorerPageApiImpl
    implements YourDocuExplorerPageApi{}
  1. Create a project-specific subclass from the DocuStoreFolderPageApi interface and its implementation.
public interface YourDocuFolderPageApi extends DocuStoreFolderPageApi {}

public class YourDocuFolderPageApiImpl extends DocuStoreFolderPageApiImpl
    implements YourDocuFolderPageApi {
  1. Create project-specific view names that you provide in the @ViewApi annotations.
@ViewApi(value = YourViewNames.YOUR_DOCU_EXPLORER,
    parent = YourViewNames.SOME_PARENT)
public interface MebitDocuExplorerPageApi extends DocuStoreExplorerPageApi {}

@ViewApi(value = YourViewNames.YOUR_DOCU_FOLDER,
    parent = YourViewNames.YOUR_DOCU_EXPLORER)
public interface YourDocuFolderPageApi extends DocuStoreFolderPageApi {}
  1. In your project's UI configuration, use the @Bean annotation to define your derived interfaces and implementations.
  @Bean
  public DocuStoreFolderPageApi folderPageApi() {
    return new YourDocuFolderPageApiImpl();
  }

  @Override
  @Bean
  public DocuStoreExplorerPageApi docuStoreExplorerPageApi() {
    return new YourDocuExplorerPageApiImpl();
  }
  1. Install the @smartbit4all/document-explorer npm package into your Angular project. @smartbit4all/document-explorer
  2. In the Pages.ts file, specify the names of the new pages.
export enum Pages {
    ...
    YOUR_DOCU_EXPLORER = 'YourDocuExplorer',
    YOUR_DOCU_FOLDER = 'YourDocuFolder',
}
  1. In the viewHandlers.ts file, assign the URLs corresponding to the view names.
export const viewContextHandlers: SmartViewHandlerModel[] = [
    ...
    {
    name: Pages.YOUR_DOCU_EXPLORER,
    route: 'your/route/for the component',
  },
  {
    name: Pages.YOUR_DOCU_FOLDER,
    route: 'your/route/for the component',
  },
  1. Configure the Angular routing according to your needs.

  2. In the app.module.ts provide the DocuStoreExplorer viewname and the project AuthenticationService like this:

providers: [
    ...
    {
      provide: 'AuthenticationService',
      useClass: AuthenticationService,
    },
    {
      provide: 'pageName',
      useValue: Pages.SUBSTANCE_DOCU_EXPLORER,
    },
  ],

Readme

Keywords

none

Package Sidebar

Install

npm i @smartbit4all/document-explorer

Weekly Downloads

106

Version

3.3.8

License

none

Unpacked Size

3.47 MB

Total Files

363

Last publish

Collaborators

  • szabolcs_bazil_papp
  • lipcseizs
  • hbalazs11
  • zoltan.suller
  • attila.mate