@treelab/revogrid
TypeScript icon, indicating that this package has built-in type declarations

3.6.9 • Public • Published

Treelab Revogrid

Grid component written using Stencil for Treelab Client. While highly customized, original code was branched from the open source Revogrid library.

Structure

All of the components are located in src folder.

Development

Setup

  1. git clone <this repo>
  2. yarn install
  3. yarn serve

Linking to this package directly from treelab-client

First build this project

  1. cd ..../treelab-revogrid
  2. yarn build

Then link into treelab-client

  1. cd ..../treelab-revogrid
  2. yarn link
  3. cd ..../treelab-client
  4. yarn link @treelab/revogrid

Restart treelab-client in order for the linked package to be properly included in the build.

Testing

Currently we don't do any automated/unit testing.

Publishing

All published versions can be found on npmjs.com

Latest code can be built and published as an npm package using the Create new release and publish to npm GitHub action. Please carefully choose a semantic version when executing Run workflow such that it is higher than the previous version published.

i18n

  • Add locale info in src/locales/[lang].json
  • usage
    • import i18nState, such as import { i18nState } from '../../locales/i18n.store';
    • i18nState.i18nStore.Intl?.formatMessage({ id: 'can.not.add.row.reminder' })
  • customize locale data
    • optionally pass the locale data with the customizedMessage property of revogrid to overwrite defaults
    • the customize localed data that must have the ids inclueded in default src/locales/[lang].json like something below,
    const customizedMessage = {
      zh: { 'can.not.add.row.reminder': '同步表暂不支持添加行' },
      en: { 'can.not.add.row.reminder': 'Can not add row in sync table temporarily' },
    };

Readme

Keywords

none

Package Sidebar

Install

npm i @treelab/revogrid

Weekly Downloads

748

Version

3.6.9

License

UNLICENSED

Unpacked Size

3.69 MB

Total Files

401

Last publish

Collaborators

  • weih.cao
  • rickytyho
  • treelab-official
  • derekchan916
  • treelab-will
  • peterl348
  • simon.shi