@goapptiv-code/bluedart-tracking-web-component
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

GoApptiv Bluedart Tracking Web Component

Bluedart Tracking Component is a web component to track blue dart shipment using the cloud function API.

Installation

Install the web component using npm

npm i @goapptiv-code/bluedart-tracking-web-component

Add the following keys to your environment variables. You can deploy your own cloud function and add the url

GOAPPTIV_BLUEDART_TRACKING_API=

Bluedart Tracking JSON API Cloud Function

Usage

You can directly start using the web component. Just pass the tracking number in the properties.

This web component takes care of loading and invalid details also.

Checkpoints are optional.

<bluedart-tracking-component tracking-number="75484923054" checkpoints="true" />

Screenshot

Screenshot

Screenshot

Integration with ReactJS

With an application built using the create-react-app script the easiest way to include the component library is to call defineCustomElements() from the index.js file. Note that in this scenario applyPolyfills is needed if you are targeting Edge or IE11.

import React from "react";
import ReactDOM from "react-dom";
import "./index.css";

// Add the below import
import {
  applyPolyfills,
  defineCustomElements,
} from "@goapptiv-code/bluedart-tracking-web-component/loader";

...

applyPolyfills().then(() => {
  defineCustomElements();
});

Stencil JS React Integration Guide

Dependencies (3)

Dev Dependencies (10)

Package Sidebar

Install

npm i @goapptiv-code/bluedart-tracking-web-component

Weekly Downloads

1

Version

1.0.6

License

MIT

Unpacked Size

566 kB

Total Files

74

Last publish

Collaborators

  • jay-gothi
  • sagar-goapptiv
  • abhishek.nayakal25