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

@rainbow-d9/thai-plan-selection

v1.2.0

Published

Plans selection, thailand

Downloads

1,030

Readme

Static Badge

License GitHub Release GitHub Release Date GitHub last commit (by committer)

npm (scoped) npm

Depends Depends Depends

Module Formats

d9-thai-plan-selection

Plan selection for Thai Cloud.

| Attribute Name | Type | Description | |-----------------------------|-------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | columns | number | max plans count in one page, default is 3. set tp <=0 value to represent no limit, which means show horizontal scrollbar and column width and line header width are in pixels (number). | | columnWidth | number, text | plan column width | | lineHeaderWidth | number, text | first column width, default use columns and columnWidth to compute | | maxHeight | number, text | max body height, plan header and footer are not included | | defs | PlanDefs, PlanDefsFunc | plan candidate definitions | | valuesInit | PlanValuesInitFunc | initialize plan values, invoked after defs first initialized | | valuesClear | PlanValuesClearFunc | clear plan values, invoked after defs reloaded | | currencySymbol | string, ReactNode | currency symbol | | premiumDescription | string, ReactNode | premium description | | buyText | string, ReactNode | buy button text | | buy | ButtonClick | buy button click handler | | planTitle | PlanTitleFunc | plan header title | | planSubTitle | PlanSubTitleFunc | plan header subtitle | | elementTitle | PlanElementTitleFunc | plan element title, level starts from 0 | | elementFixedValue | PlanElementFixedValueFunc | plan element fixed value | | elementOptionsValue | PlanElementOptionsValueFunc | plan element options value | | elementNumberValue | PlanElementNumberValueFunc | plan element number value | | elementNumberValueValidator | PlanElementNumberValueValidatorFunc | plan element number value validator | | planOperators | PlanOperatorsFunc | plan operators | | calculationDelay | number | default 1s | | calculate | PlanCalculateFunc | do calculation |

Force Reload Plan Definitions

Sometimes, the definition of the available options for a plan needs to be reloaded. In such cases, you can force a plan reload by sending a custom event to the component. It is important to note that reloading the plan definition may result in a mismatch between the memory data associated with the current plan and the newly loaded plan. In this scenario, you can perform appropriate cleanup by using the valuesClear method. If the valuesClear parameter is not specified, the component will not operate on the model after reloading the plan definition. Here is an example of sending an event:

import {useSimpleCustomGlobalEvent} from '@rainbow-d9/n2';

// useSimpleCustomGlobalEvent is same as useCustomGlobalEvent, but it is a simple version, which will build parameter key inside.
const fireCustomEvent = useSimpleCustomGlobalEvent();
// marker is required, it is used to identify the plan selection widget even there is only one exists.
// should be same as the marker declared in PlanSelectionDef.
const marker = 'plan-unique-marker';
// model is based on where to fire this event, not model of plan selection.
fireCustomEvent(PlanSelectionGlobalEventPrefix.RELOAD_DEFS, marker, {root, model});

A sample

- PlanSelect::::plans
	- defs: @ext.defs
	- currencySymbol: ฿
	- premiumDescription: After Tax
	- buy: @ext.buy
	- calculationDelay: 3
	- calculate: @ext.calculate