0.0.1 • Published 4 years ago

@contezza/documentlist v0.0.1

Weekly downloads
1
License
-
Repository
-
Last release
4 years ago

Contezza Documentlist Library

Installing library in default angular project steps:

  • add "@contezza/documentlist": "0.0.1" to dependency in package.json of use npm install @contezza/documentlist
  • add assets in angular.json:
  { "glob": "**/*", "input": "node_modules/@alfresco/adf-core/prebuilt-themes", "output": "/assets/prebuilt-themes"},
  { "glob": "**/*", "input": "node_modules/@alfresco/adf-core/bundles/assets", "output": "/assets" },
  { "glob": "**/*", "input": "node_modules/@alfresco/adf-content-services/bundles/assets", "output": "/assets" },
  { "glob": "pdf.worker.js", "input": "node_modules/pdfjs-dist/build", "output": "/" },
  { "glob": "pdf.worker.min.js", "input": "node_modules/pdfjs-dist/build", "output": "/" }
  • create a file next to projects package.json call it proxy.conf.json with the following content:
  {
  "/ecm": {
    "target": {
      "host": "0.0.0.0",
      "protocol": "http:",
      "port": 8080
    },
    "pathRewrite": {
      "^/ecm": ""
    },
    "secure": false,
    "changeOrigin": true
  }
}
  • run the following command to start the server with the proxy configuration: ng serve --proxy-config proxy.conf.json --open‍‍‍‍‍‍ of define config in angular.json with:
  "port": 4200,
  "host": "0.0.0.0",
  "open": true,
  "proxyConfig": "proxy.conf.json"
  • import 'hammerjs' to main.js file: import 'hammerjs';

  • be sure that angular theming is imported in styles.scss file: @import '~@alfresco/adf-core/prebuilt-themes/adf-blue-orange.css';

  • import DocumentlistModule in your 'APP' module from '@contezza/documentlist';

  • use documentlist in template:

  <contezza-documentlist 
    [username]="'admin'" 
    [password]="'admin'">
  </contezza-documentlist>