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

@decoloop/planner

v1.2.4

Published

The Sieval Dedicated Solutions decoloop planner widget

Downloads

1,178

Readme

Releases

1.2.4

  • fix only hidden articles on validation

1.2.3

  • add custom translations for 'datepicker'
  • 'datepicker' validations
  • hide summaries in 'all steps'

1.2.2

  • add submit validation for 'all steps' modus
  • fix to change an address

1.2.1

  • Fix hidden articles

1.2.0

  • new flow to show all steps at once.
  • new option to apply selected quantity to all active articles (shared articles)
  • new option to show calendar (datepicker)
  • new way to visualize customer step (grid)
  • improved styling

Activity logging

Inline custom events like 'activity' are not supported in HTML. JavaScript event listeners are needed to handle the 'activity' event.

<decoloop-planner id="widget"/>

<script>
	document
        .getElementById("widget")
        .addEventListener("activity", e => { console.log(e.detail) });
</script>
button name="dlpButtonLoader" id="widget-button">[text]</button>

<script>
	document
        .getElementById("widget-button")
        .addEventListener("activity", e => { console.log(e.detail) });
</script>

Example logging object

{
    "details": {
        "skillCode": "OTHER.MEASURE.PIECES",
        "active": true
    },
    "hasErrors": false,
    "errors": [],
    "kind": 0,
    "action": "toggle"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | kind | int | Widget step | | action | string | Action within the step | | details | object or null | based on action | | hasErrors | boolean | true when the errors list has values | | errors | string[] | list of errors |

Widget step: Articles

Kind = 0

Action: toggle

{
    "details": {
        "skillCode": "OTHER.MEASURE.PIECES",
        "active": true
    },
    "hasErrors": false,
    "errors": [],
    "kind": 0,
    "action": "toggle"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | skillCode | string | selected article | | active | boolean | selected or deselected |

Action: change

{
    "details": {
        "skillCode": "OTHER.MEASURE.PIECES",
        "quantity": "5"
    },
    "kind": 0,
    "hasErrors": false,
    "errors": [],
    "action": "change"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | skillCode | string | selected article | | quantity | int | selected quantity |

Action: submit

{
    "details": {
        "articles": [
            {
                "code": "OTHER.MEASURE.PIECES",
                "quantity": 5
            }
        ]
    },
    "kind": 0,
    "hasErrors": false,
    "errors": [],
    "action": "submit"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | articles | object[] | list of selected articles | | articles[].code | string | code | | articles[].quantity | int | quantity |

Possible errors that can occur:

  • error.session.session_expired
  • error.articles.articles_requires_at_least_1_item
  • error.articles.article_invalid
  • error.employees.no_valid_skills"

Widget step: Address

Kind = 1

Action: autocomplete

  • Works only on dutch addresses.
  • Non-blocking action, full address fields are visible in case of invalid address
{
    "details": {
        "request": {
            "streetNumber": "51",
            "zip": "8011CA"
        },
        "response": {
            "address": {
                "streetName": "Westerlaan",
                "streetNumber": "51",
                "addition": null,
                "zipCode": "8011CA",
                "cityName": "Zwolle",
                "country_ISO3166_1_2": "NL",
            },
            "isValid": true
        }
    },
    "kind": 1,
    "hasErrors": false,
    "errors": [],
    "action": "autocomplete"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | request | object | inserted address info | | request.streetNumber | string | streetNumber | | request.zip | string | zip | | response | object or null | received info | | response.address.isValid | boolean | if address can be found | | response.address | object or null | address info, null when isValid is false | | response.address.streetName | string | street name| | response.address.streetNumber | string | street number | | response.address.addition | string | addition | | response.address.zipCode | string | zip | | response.address.cityName | string | city | | response.address.country_ISO3166_1_2 | string | country code |

Possible errors that can occur:

  • error.session.session_expired
  • error.address.address_invalid

Action: branch

{
    "details": {
        "licenseeId": 999
    },
    "kind": 1,
    "hasErrors": false,
    "errors": [],
    "action": "branch"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | licenseeId | int | branch id |

Action: submit

{
    "details": {
        "request": {
            "streetNumber": "51",
            "zip": "8011",
            "streetName": "Westerlaan",
            "city": "Zwolle",
            "licenseeId": null
        },
        "response": {
            "streetName": "Westerlaan",
            "streetNumber": "51",
            "addition": null,
            "zipCode": "8011 CA",
            "cityName": "Zwolle",
            "country_ISO3166_1_2": "nl"
        }
    },
    "kind": 1,
    "hasErrors": false,
    "errors": [],
    "action": "submit"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | request | object | inserted address info | | request.streetNumber | string | street number | | request.streetName | string | street name | | request.zip | string | zip | | request.city | string | city | | request.licenseeId | int or null | branch id | | response | object or null | received info | | response.streetName | string | street name| | response.streetNumber | string | street number | | response.addition | string | addition | | response.zipCode | string | zip | | response.cityName | string | city | | response.country_ISO3166_1_2 | string | country code |

Possible errors that can occur:

  • error.session.session_expired
  • error.address.address_invalid
  • error.address.address_difference_detection
  • error.address.address_difference_detection.zip
  • error.address.address_difference_detection.street_name
  • error.address.address_difference_detection.street_number
  • error.address.address_difference_detection.city
  • error.worklocation.none_in_area
  • error.worklocation.none_in_max_distance

Widget step: Schedule

Kind = 3

Action: set_time

{
    "details": {
        "time": "2022-12-28T12:00:00Z"
    },
    "kind": 2,
    "hasErrors": false,
    "errors": [],
    "action": "set_time"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | time | DateTime | selected date and time |

Action: next_range

{
    "details": null,
    "kind": 2,
    "hasErrors": false,
    "errors": [],
    "action": "next_range"
}

Action: previous_range

{
    "details": null,
    "kind": 2,
    "hasErrors": false,
    "errors": [],
    "action": "previous_range"
}

Action: submit

{
    "details": {
        "firstName": "John",
        "middleName": "",
        "lastName": "Doe",
        "emailAddress": "[email protected]",
        "phoneNumber": "0612345678",
        "mobilePhoneNumber": "",
        "languageAbbreviation": "nl",
        "remark": "Extra info"
    },
    "kind": 3,
    "hasErrors": false,
    "errors": [],
    "action": "submit"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | firstName | string | | | middleName | string | | | lastName | string | | | emailAddress | string | | | phoneNumber | string | | | mobilePhoneNumber | string | | | languageAbbreviation | string | | | remark | string | |

Widget step: Confirm

Kind = 4

Action: submit

{
    "details": {
        "reference": "1010.00125"
    },
    "kind": 4,
    "hasErrors": false,
    "errors": [],
    "action": "submit"
}

| Parameter | Type | Description | | --------- | -------- | -------------------------- | | reference | string | received reference number |

Possible errors that can occur:

  • error.session_expired
  • error.dateslot.invalid_timeslot
  • error.unknown.unknown

Generic action: previous

Available in each step

{
    "details": null,
    "kind": 1,
    "hasErrors": false,
    "errors": [],
    "action": "previous"
}