Socket
Socket
Sign inDemoInstall

@native-html/table-plugin

Package Overview
Dependencies
544
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.3 to 5.0.0

docs/table-plugin.htmltablebaseprops.sourcebaseurl.md

19

CHANGELOG.md

@@ -0,1 +1,20 @@

# [5.0.0](https://github.com/native-html/plugins/compare/@native-html/table-plugin@4.0.3...@native-html/table-plugin@5.0.0) (2021-02-08)
### Features
* **table-plugin:** automatically handle relative URLs ([000b9b4](https://github.com/native-html/plugins/commit/000b9b44de3adb924901bee7fa131542af2b4bc4))
### 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](https://github.com/native-html/plugins/compare/@native-html/table-plugin@4.0.2...@native-html/table-plugin@4.0.3) (2021-02-07)

@@ -2,0 +21,0 @@

1

docs/table-plugin.htmltablebaseprops.md

@@ -23,3 +23,4 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. -->

| [onLinkPress?](./table-plugin.htmltablebaseprops.onlinkpress.md) | RenderHTMLPassedProps\['onLinkPress'\] | <i>(Optional)</i> Intercept links press. |
| [sourceBaseUrl?](./table-plugin.htmltablebaseprops.sourcebaseurl.md) | string | <i>(Optional)</i> The base to resolve relative URLs. |
| [WebView](./table-plugin.htmltablebaseprops.webview.md) | ComponentType&lt;any&gt; | The <code>WebView</code> Component you wish to use. |

1

docs/table-plugin.tableconfig.md

@@ -26,3 +26,2 @@ <!-- Do not edit this file. It is automatically generated by API Documenter. -->

| [maxScale?](./table-plugin.tableconfig.maxscale.md) | boolean | <i>(Optional)</i> Max zoom scale (must be greater than 1). |
| [sourceBaseUrl?](./table-plugin.tableconfig.sourcebaseurl.md) | string | <i>(Optional)</i> See https://git.io/JeCAG |
| [style?](./table-plugin.tableconfig.style.md) | StyleProp&lt;ViewStyle&gt; | <i>(Optional)</i> Container style. |

@@ -29,0 +28,0 @@ | [tableStyleSpecs?](./table-plugin.tableconfig.tablestylespecs.md) | [TableStyleSpecs](./table-plugin.tablestylespecs.md) | <i>(Optional)</i> Specs to generate css rules.<img src="https://raw.githubusercontent.com/native-html/table-plugin/master/images/TableStyleSpecs.png" /> |

@@ -48,2 +48,3 @@ "use strict";

const resolvedContentWidth = typeof contentWidth === 'number' ? contentWidth : _reactNative.Dimensions.get('window').width;
const documentBaseUrl = (0, _reactNativeRenderHtml.useDocumentMetadata)().baseUrl;
const availableWidth = (computeEmbeddedMaxWidth === null || computeEmbeddedMaxWidth === void 0 ? void 0 : computeEmbeddedMaxWidth.call(null, resolvedContentWidth, 'table')) || resolvedContentWidth;

@@ -69,2 +70,3 @@ const {

html,
sourceBaseUrl: documentBaseUrl,
style: composedStyles,

@@ -71,0 +73,0 @@ onLinkPress,

import { Dimensions } from 'react-native';
import { useSharedProps } from 'react-native-render-html';
import { useSharedProps, useDocumentMetadata } from 'react-native-render-html';
import extractHtmlAndStatsFromTableDomNode from './extractHtmlAndStatsFromTableDomNode';

@@ -37,2 +37,3 @@

const resolvedContentWidth = typeof contentWidth === 'number' ? contentWidth : Dimensions.get('window').width;
const documentBaseUrl = useDocumentMetadata().baseUrl;
const availableWidth = (computeEmbeddedMaxWidth === null || computeEmbeddedMaxWidth === void 0 ? void 0 : computeEmbeddedMaxWidth.call(null, resolvedContentWidth, 'table')) || resolvedContentWidth;

@@ -58,2 +59,3 @@ const {

html,
sourceBaseUrl: documentBaseUrl,
style: composedStyles,

@@ -60,0 +62,0 @@ onLinkPress,

@@ -227,6 +227,2 @@ import { ComponentType } from 'react';

/**
* See https://git.io/JeCAG
*/
sourceBaseUrl?: string;
/**
* Container style.

@@ -302,2 +298,6 @@ */

/**
* The base to resolve relative URLs.
*/
sourceBaseUrl?: string;
/**
* Intercept links press.

@@ -304,0 +304,0 @@ */

{
"name": "@native-html/table-plugin",
"version": "4.0.3",
"version": "5.0.0",
"description": "🔠 A WebView-based plugin to render tables in react-native-render-html",

@@ -60,3 +60,3 @@ "main": "lib/commonjs/index.js",

"react-native-builder-bob": "^0.17.1",
"react-native-render-html": "6.0.0-alpha.12",
"react-native-render-html": "6.0.0-alpha.13",
"react-native-webview": "11.0.0",

@@ -63,0 +63,0 @@ "react-test-renderer": "16.13.1",

@@ -1,2 +0,2 @@

> :warning: This documentation is for **react-native-render-html v6**. For v5 and below, [go here](https://github.com/native-html/plugins/tree/rnrh/5.x/packages/table-plugin#readme).
> :warning: This documentation is for **react-native-render-html v6** (@native-html/table-plugin@4.x). For v5 and below, [go here](https://github.com/native-html/plugins/tree/rnrh/5.x/packages/table-plugin#readme).

@@ -85,7 +85,7 @@ <h1 align="center">@native-html/table-plugin</h1>

| react-native-render-html | @native-html/table-plugin |
| ------------------------ | -------------------------------------------------------------------------------------------------------- |
| ≥ 4.2.1 &lt; 5.0.0 | 2.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/4.x#readme)) |
| ≥ 5.0.0 &lt; 6.0.0 | 3.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/5.x/packages/table-plugin#readme)) |
| ≥ 6.0.0 | 4.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/6.x/packages/table-plugin#readme)) |
| react-native-render-html | @native-html/table-plugin |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ≥ 4.2.1 &lt; 5.0.0 | 2.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/4.x#readme)) |
| ≥ 5.0.0 &lt; 6.0.0 | 3.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/5.x/packages/table-plugin#readme)) |
| ≥ 6.0.0 | 4.x ([documentation](https://github.com/native-html/plugins/tree/@native-html/table-plugin@4.0.3/packages/table-plugin#readme)) <br> 5.x ([documentation](https://github.com/native-html/plugins/tree/rnrh/6.x/packages/table-plugin#readme)) |

@@ -92,0 +92,0 @@ ## Minimal working example

@@ -243,7 +243,2 @@ import { ComponentType } from 'react';

/**
* See https://git.io/JeCAG
*/
sourceBaseUrl?: string;
/**
* Container style.

@@ -326,2 +321,7 @@ */

/**
* The base to resolve relative URLs.
*/
sourceBaseUrl?: string;
/**
* Intercept links press.

@@ -328,0 +328,0 @@ */

import { Dimensions } from 'react-native';
import {
CustomTagRendererProps,
useSharedProps
useSharedProps,
useDocumentMetadata
} from 'react-native-render-html';

@@ -44,2 +45,3 @@ import extractHtmlAndStatsFromTableDomNode from './extractHtmlAndStatsFromTableDomNode';

: Dimensions.get('window').width;
const documentBaseUrl = useDocumentMetadata().baseUrl;
const availableWidth =

@@ -70,2 +72,3 @@ computeEmbeddedMaxWidth?.call(null, resolvedContentWidth, 'table') ||

html,
sourceBaseUrl: documentBaseUrl,
style: composedStyles,

@@ -72,0 +75,0 @@ onLinkPress,

@@ -54,2 +54,6 @@ /// <reference types="react" />

/**
* The base to resolve relative URLs.
*/
sourceBaseUrl?: string;
/**
* Intercept links press.

@@ -199,6 +203,2 @@ */

/**
* See https://git.io/JeCAG
*/
sourceBaseUrl?: string;
/**
* Container style.

@@ -205,0 +205,0 @@ */

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc