sp-list-formatter
v1.0.2
Published
__*Format SharePoint lists with ease*__ #### Motivation Styling SharePoint forms, columns and views by writing plain JSON is a pain, and it's easy to make mistakes. This library aims to make it easier to create list formatters.
Downloads
4
Readme
sp-list-formatter
Format SharePoint lists with ease
Motivation
Styling SharePoint forms, columns and views by writing plain JSON is a pain, and it's easy to make mistakes. This library aims to make it easier to create list formatters.
Just use the fluent builder API to create your formatting with type safety, or even better, convert your HTML to the SharePoint JSON schema.
Installation
Works both on node and browser
npm install sp-list-formatter
# or
yarn add sp-list-formatter
# or
pnpm add sp-list-formatter
Documentation and examples
Changelog
Please see CHANGELOG for more information about what has changed recently.
Roadmap
- [ ] Create an easy way to write complex expressions (
operands
andoperators
), probably with aExpressions
class and a proposalcreateStateMachine
function. - [ ] Create a playground to test the library and see the results in real time, also with a code editor for
HtmlToListParser
- [ ] Create more examples, since all the examples from the docs are in the tests, it would nice to have pnp calculator example.
Known issues
ListFormatterBuilder
init
method exposes some internal implementation details from the class, please note that onlyaddElement
oraddChildren
should be called after init.- This happens because of some unknown type narrowing issue in TypeScript with the
InitialState
interface. If you have any ideas on how to fix this, please open an issue or a PR.
- This happens because of some unknown type narrowing issue in TypeScript with the