Skip to content

Latest commit

 

History

History
353 lines (206 loc) · 14.6 KB

CHANGELOG.md

File metadata and controls

353 lines (206 loc) · 14.6 KB

5.3.1 (2021-10-13)

Bug Fixes

  • remove null from useHtmlTableProps return signature (dead condition) (52888c5)

5.3.0 (2021-06-08)

Features

5.2.0 (2021-05-21)

Features

5.1.0 (2021-04-17)

Features

5.0.3 (2021-04-17)

Bug Fixes

  • restrict to react-native-render-html < 6.0.0-alpha.23 (3a8d9f8)

5.0.2 (2021-04-17)

Bug Fixes

  • restrict compatible versions of react-native-render-html (032c4ed)

5.0.1 (2021-02-18)

Bug Fixes

  • replace outdated type import RenderHTMLPassedProps (872bc96)

5.0.0 (2021-02-08)

Features

  • table-plugin: automatically handle relative URLs (000b9b4)

BREAKING CHANGES

  • table-plugin: sourceBaseUrl has been moved from TableConfig to HTMLTableBaseProps. It means you cannot override this value with renderersProps.table.sourceBaseUrl anymore. Use a custom renderer with useHtmlTableProps hook and HTMLTable component to override this value manually, but you probably shouldn't since the new foundry engines allows it automatically. If your html source is inline, use source.baseUrl instead, so that every relative URL will be normalized against this base. Read https://git.io/JtwG0 for a detailed description.

4.0.3 (2021-02-07)

4.0.2 (2021-02-07)

4.0.1 (2021-02-07)

Bug Fixes

  • table-plugin: default htmlAttribs would cause infinite re-renders (cb23e01)
  • table-plugin: pass anchor attributes and target to onLinkPress (0e45cde)
  • table-plugin: upgrade webshell to v2.3.0 fixing potential infinite re-renders (ffd8343)

4.0.0 (2021-02-06)

Bug Fixes

  • table-plugin: mark displayMode field as optional (b395a49)

Features

  • table-plugin: support react-native-render-html 6.x (1526efe)

BREAKING CHANGES

  • table-plugin: - extractHtmlTableProps has been dropped in favor of useHtmlTableProps hook for reusability.
  • IGNORED_TAGS is not exported anymore, and not necessary.
  • requires react-native 0.63.x and above
  • new tableModel export for the new custom renderers API

3.1.0 (2020-12-05)

Features

  • table-plugin: add new tableConfig argument to extractHtmlTableProps (366c156)
  • table-plugin: new displayMode value, "embedded" (0ec4937)

3.0.1 (2020-12-05)

Misc

  • Rework version range for react-native-render-html

3.0.0 (2020-12-05)

This release requires react-native-render-html ≥ 5.0.0! Be aware, its API has changed a little:

import React from 'react';
import { ScrollView } from 'react-native';
import HTML from 'react-native-render-html';
import table, { IGNORED_TAGS } from '@native-html/table-plugin';
import WebView from 'react-native-webview';

const html = `
<table>
  <tr>
    <th>Entry Header 1</th>
    <th>Entry Header 2</th>
  </tr>
  <tr>
    <td>Entry First Line 1</td>
    <td>Entry First Line 2</td>
  </tr>
</table>
`;

const htmlProps = {
  WebView,
  renderers: {
    table
  },
  ignoredTags: IGNORED_TAGS,
  renderersProps: {
    table: {
      // Put the table config here (previously,
      // the first argument of makeTableRenderer)
    }
  }
};

export const Example = () => (
  <ScrollView>
    <HTML source={{ html }} {...htmlProps} />
  </ScrollView>
);

Features

  • table-plugin: new lightweight API for react-native-render-html v5.0 (a7fa70a)
  • table-plugin: new displayMode prop and compliance with RFC001 (1de3df0)
  • table-plugin: the component now inherits from tagsStyles and classesStyles when matched

BREAKING CHANGES

  • table-plugin: makeTableRenderer and makeCustomTableRenderer have been dropped in favor of the default table renderer export and extractHtmlTableProp function for custom renderers. This release takes advantage of the availability of domNode in custom renderers and the new domNodeToHTMLString utility available in react-native-render-html. Configuration for the table renderer is now read from renderersProps.table prop of the HTML component.

2.1.4 (2020-10-08)

Misc

  • Ornamental changes (README)

2.1.3 (2020-10-08)

Misc

  • Ornamental changes (README)

2.1.2 (2020-10-08)

Enhancements

  • Add README.MD in bundle

2.1.1 (2020-10-08)

Dependencies

  • Upgrade @formidable-webview/* dependencies

2.1.0 (2020-10-03)

Features

  • add TableConfig.maxScale option to allow zooming in tables (6338296)

2.0.1 (2020-10-01)

Dependencies

  • Upgrade @formidable-webview/webshell (ef53677).

2.0.0 (2020-09-28)

Code Refactoring

Features

Performance Improvements

  • avoid rerendering caused by onDOMLinkPress (1fe9f77)
  • limit number of rendering cycles (312e648)

BREAKING CHANGES

  • removed TableStyleSpecs.borderWidthPx in favor of rowsBorderWidthPx, columnsBorderWidthPx and outerBorderWidthPx
  • This plugin now requires React Native 0.59+ because it uses hooks internally.

1.0.4 (2020-08-20)

1.0.3 (2020-08-20)

Bug Fixes

  • deps: move metro-react-native-babel-transformer to devDependencies (c64e4c0)

1.0.2 (2020-08-19)

Chore

Fix misconfigured repository field in package.json, responsible for bad relative links resolutions in npmjs and changelog generators.

1.0.0 (2020-08-19)

Code Refactoring

  • restructure source files and comply with api-extractor (644e2ff)

Features

  • new TableConfig API to configure height computation (07264fb)

BREAKING CHANGES

  • WebViewComponent config field has been renamed to WebView.
  • autoheight, maxHeight and defaultHeight have been dropped in favour of computeContainerHeight. This function gives more flexibility to library users, providing a way to set height at different steps of the component lifecycle. Also, useLayoutAnimation has been dropped in favour of animationType, giving the opportunity to completely switch off animations. Moreover, a new prop, computeHeuristicContentHeight, allows even more fine-grain control on the height computation logic and more specifically, when the accurate content height is not yet available. Finally, animationDuration now replaces transitionDuration to make the semantic link with animationType more explicit.
  • remove export of domToHTML

0.6.1 (2020-07-03)

Bug Fixes

  • merge default table style specs to user-provided tableStyleSpecs (f2b9d82)

0.6.0 (2020-07-03)

Bug Fixes

  • empty 'cssRules' prop is ignored (469ec9a)
  • script injection resulting in syntax error (875f18f)
  • table borders correctly rendered left and bottom (14422f8)

Features

  • fontSizePx attribute in tableStyleSpecs (104bcab)
  • split fitContainer prop in fitContainerHeight and fitContainerWidth (2bdb077)

BREAKING CHANGES

  • fitContainer attribute of tableStyleSpecs config has been split into fitContainerWidth and fitContainerHeight.
  • TypeScript definitions for react-native-render-html are not embedded anymore. Please upgrade to [email protected].

0.5.3

  • restrict react-native-render-html peer version

0.5.2

  • add renderersProps to HTMLTable and custom tables.

0.5.1 (2019-11-20)

  • include table border attribute when computing table's height (5fe4a94), closes #8

0.5.0

  • rename androidSourceBaseUrl prop to sourceBaseUrl (692190e)

BREAKING CHANGES

  • rename androidSourceBaseUrl prop to sourceBaseUrl.

0.4.1

  • Fix HTML.onLinkPress does not get fired if link contains html elements, #5
  • Use const TABLE_TAGS for IGNORED_TAGS, #1 by @donni106

0.4.0

  • Get rid of deprecated componentWillUpdate method in HTMLTable component;
  • Fix inconsistent odd/even rules;
  • Run injected javascript in a closure, #4;
  • Add new TableStyleSpecs properties:
    • Add cellPaddingEm, borderWidthPx, thOddBackground, thOddColor;
    • BREAKING remove thBackground and thColor;
    • Add thEvenBackground and thEvenColor.

0.3.1

  • Add selectableText field in tableStyleSpecs config option;
  • Export cssRulesFromSpecs and defaultTableStylesSpecs;
  • Add FAQ to readme;
  • Added numOfRows, numOfColumns and numOfChars to HTMLTable props, which can help trigger rendering logic depending on table stats;
  • Export makeCustomTableRenderer to customize table component;
  • Added a new example with custom complex table.