npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dhl-parcel/dhl-parcel-data-importer

v0.2.2

Published

DHL Data Importer

Downloads

2

Readme

dhl-upload-form

This module exposes a simple form component that handles the upload and parsing of CSV files, with the option to map the parsed data to a predefined structure.

Install

npm i --save dhl-parcel-upload-form

Impression

Upload | Schema :----------------------------------:|:----------------------------------: |

Available Scripts

In the project directory, you can run:

npm run build

Builds the app for production to the build folder. It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes. Your app is ready to be deployed!

npm run flow

Check all flow types in the application for possible errors.

npm run lint

Perform a linting operation to check for possible errors.

npm run watch

Run continuous iterations of the build process for development.

API

Schema props

| name | description | type | default | |----------|----------------|-----------|------------| |type | a unique name for the component, allows for multiple instances of the component | string| 'import' | |category | used to name and filter schema types, can differ from type, see according parameter in postSchemas | string | 'import' | |fields | (optional) names of the fields | Array<string>| [] | |mandatoryFields | required names of the fields, the component will validate on this | Array<string> | [] | |depends | fields with names that equal to a key of this prop will be disabled unless first the field that corresponds to the value of this prop is selected| {[string]: string} | {} | |setMapping | function that will be called with the result of the parsed and mapped file| (result: {[string]: any}) => void | | |normalize | function that will be used to properly format/ trim a value before persisting.| (string, string, string) => string | (field: string, depends: string, val: string) => val | |getRegexForField | function that will be called to return the regex rules for validation of a field name, the second parameter is usally used to pass a countryCode on wich the regex rule should be based | (string, string) => RegExp | () => null | |showToastMessage | function that will be called to display a message and action string| (string, string) => void | | |getSchemas | Promise that will resolve to a schema array used for presets, see the mapping param in postSchemas for details on this array| Promise | | |postSchemas | Promise that wil resolve to a Response, it should be used to post 'preset schemes' that need to be persisted, type and category are used to filter and tag the preset | (schemes: Array< {id: string, category: string, name: string, matches: {[string]: string}}>, mapping: Array<any>, name: string, category: string)=> Promise | Promise.resolve | |tr | function that will be called to display a translated value. It will be passed a translation key that can to be mapped to a value, locale is not passed.| str => str | |getTranslationMapping | function that will be called by tr callback to allow for for the translation key used in the component to be mapped, this is usefull if you can't modify your translation file, or if it has prefixed keys. | string => string | (str: string) => str |