0.0.32 • Published 4 years ago

@finlexlabs/file-manager v0.0.32

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

FinlexFileManager (@finlexlabs/file-manager)

Library Name: finlex-file-manager Package Name: @finlexlabs/file-manager Repo Name: fx-ng-components


Steps to Build & Publish Library

Package Renaming

Go to src/finlex-file-manager/package.json Rename package name from finlex-file-manager to @finlexlabs/file-manager

Build

npm run build:file-manager

It will build finlex-file-manager using ng-packagr. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with npm run build:file-manager, go to the dist folder cd dist/finlex-file-manager and run npm publish.

--

Finlex File Manager

Input bindings for component

  1. fileManagerBaseUrl (type: string, required: true) -> File Manager endpoint with GET, POST and PUT, DELETE methods.
  2. componentType: (type: string, required: true) -> The entity name and path
  3. componentId: (type: string, required: true) -> The entity id
  4. componentIds: (type: Array, required: false) -> List of entity ids
  5. editMode: (type: boolean, required: false) -> Show the file uploader when edit mode is true.
  6. useOldRoutes: (type: boolean, required: false) ->
    • true: use routes of file-manager inside contract-manager
    • false/default: use new routes under s3-integration-service
  7. additionalReferences (type: Array, required: false) -> To pass aditional references for the same file.
  8. displayConfig (type: FileManagerDisplayConfig, required: false) -> To change the default look and feel behavior of the files list.
  9. defaultFileCategory (type: string, required: false) -> To save file category name with the file and file reference.
  10. showLatestFileOnly (type: boolean, required: false) -> To show only the latest file (1 only).

Display config

The display config has the following properties which can be used to hide specific elements:

  • informationBar -> The information bar including the cagtegory filter and total file sizes.
  • category -> The category name next in the files list.
  • viewButton -> The view button in the files list.
  • downloadButton -> The download button in the files list.
  • deleteButton -> The delete button in the files list.
  • fileSize -> The individual file size below the file name in the files list.

Additionally following properties can also be passed to change the look and feel

  • disableHoverMode -> The overall hover mode gets disabled which includes the show and hide of view, download, and delete button.
  • fileIcon -> The file icon before the file name in the files list. A mat icon name is required here.
  • themeColor -> The color in hex format.
  • filesListPosition -> 4 possibilities to show the files list: TOP, BOTTOM, LEFT, RIGHT. Default is Right.

An example of display config.

  fileManagerDisplayConfig: FileManagerDisplayConfig = {
    hide: {
      informationBar: true,
      fileSize: true,
      category: true,
      deleteButton: true,
    },
    disableHoverMode: true,
    fileIcon: 'picture_as_pdf',
    themeColor: '#FF0000',
  }
0.0.30

4 years ago

0.0.31

4 years ago

0.0.32

4 years ago

0.0.28

4 years ago

0.0.29

4 years ago

0.0.27

4 years ago

0.0.22

4 years ago

0.0.23

4 years ago

0.0.24

4 years ago

0.0.25

4 years ago

0.0.26

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.18

4 years ago

0.0.19

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago