@shoutem/ui 6.3.3-rc.0 → 6.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,10 +40,14 @@ class SimpleHtml extends PureComponent {
40
40
  const {
41
41
  style,
42
42
  body,
43
- customTagStyles,
44
43
  unsupportedVideoFormatMessage,
45
44
  attachments,
46
- domVisitors,
45
+ customDomVisitors,
46
+ customCustomRenderers,
47
+ customTagStyles,
48
+ customHtmlElementModels,
49
+ customIgnoredStyles,
50
+ customRendererProps,
47
51
  ...otherProps
48
52
  } = this.props;
49
53
 
@@ -79,6 +83,7 @@ class SimpleHtml extends PureComponent {
79
83
  />
80
84
  ),
81
85
  video: VideoRenderer,
86
+ ...customCustomRenderers,
82
87
  };
83
88
 
84
89
  const htmlProps = {
@@ -88,7 +93,12 @@ class SimpleHtml extends PureComponent {
88
93
  tagsStyles: _.omitBy(tagStyles, tagStyle => !tagStyle),
89
94
  systemFonts: [...defaultSystemFonts, style.baseFont.fontFamily],
90
95
  baseStyle: style.baseFont,
91
- ignoredStyles: ['fontFamily', 'letterSpacing', 'transform'],
96
+ ignoredStyles: [
97
+ 'fontFamily',
98
+ 'letterSpacing',
99
+ 'transform',
100
+ ...customIgnoredStyles,
101
+ ],
92
102
  renderers: customRenderers,
93
103
  renderersProps: {
94
104
  table: {
@@ -100,15 +110,17 @@ class SimpleHtml extends PureComponent {
100
110
  renderToHardwareTextureAndroid: true,
101
111
  },
102
112
  },
113
+ ...customRendererProps,
103
114
  },
104
115
  customHTMLElementModels: {
105
116
  table: tableModel,
106
117
  iframe: iframeModel,
107
118
  video: videoModel,
119
+ ...customHtmlElementModels,
108
120
  },
109
121
  WebView,
110
122
  ignoredTags: IGNORED_TAGS,
111
- domVisitors,
123
+ domVisitors: { onElement, ...customDomVisitors },
112
124
  };
113
125
 
114
126
  return (
@@ -123,8 +135,12 @@ SimpleHtml.propTypes = {
123
135
  style: PropTypes.object.isRequired,
124
136
  attachments: PropTypes.array,
125
137
  body: PropTypes.string,
126
- customAlterNode: PropTypes.func,
138
+ customCustomRenderers: PropTypes.object,
139
+ customDomVisitors: PropTypes.object,
127
140
  customHandleLinkPress: PropTypes.func,
141
+ customHtmlElementModels: PropTypes.object,
142
+ customIgnoredStyles: PropTypes.arrayOf(PropTypes.string),
143
+ customRendererProps: PropTypes.object,
128
144
  customTagStyles: PropTypes.object,
129
145
  domVisitors: PropTypes.object,
130
146
  unsupportedVideoFormatMessage: PropTypes.string,
@@ -133,11 +149,15 @@ SimpleHtml.propTypes = {
133
149
  SimpleHtml.defaultProps = {
134
150
  attachments: undefined,
135
151
  body: undefined,
136
- customAlterNode: undefined,
137
152
  customHandleLinkPress: undefined,
138
- customTagStyles: undefined,
153
+ customTagStyles: {},
139
154
  unsupportedVideoFormatMessage: undefined,
140
155
  domVisitors: { onElement },
156
+ customDomVisitors: {},
157
+ customCustomRenderers: {},
158
+ customHtmlElementModels: {},
159
+ customIgnoredStyles: [],
160
+ customRendererProps: {},
141
161
  };
142
162
 
143
163
  export default connectStyle('shoutem.ui.SimpleHtml')(SimpleHtml);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shoutem/ui",
3
- "version": "6.3.3-rc.0",
3
+ "version": "6.3.3",
4
4
  "description": "Styleable set of components for React Native applications",
5
5
  "scripts": {
6
6
  "lint": "eslint .",