@hero-design/rn 8.109.1 → 8.109.2

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.
@@ -1,4 +1,4 @@
1
- (node:3341) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
1
+ (node:3312) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
2
2
  (Use `node --trace-warnings ...` to show where the warning was created)
3
3
  
4
4
  src/index.ts → lib/index.js, es/index.js...
@@ -9,9 +9,9 @@ node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/sr
9
9
  ...and 12 more
10
10
  (!) [plugin replace] @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
11
11
  (!) [plugin node-resolve] preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.
12
- created lib/index.js, es/index.js in 1m 12.6s
12
+ created lib/index.js, es/index.js in 1m 11.5s
13
13
  
14
14
  /home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_AU.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_CA.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/index.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/types.ts → ., ....
15
15
  (!) Generated empty chunks
16
16
  "locales/types" and "locales/types"
17
- created ., . in 21.1s
17
+ created ., . in 20.2s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.109.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4237](https://github.com/Thinkei/hero-design/pull/4237) [`746100e1369da6411eb771a0f153da6ac9a6dcf9`](https://github.com/Thinkei/hero-design/commit/746100e1369da6411eb771a0f153da6ac9a6dcf9) Thanks [@ngvuthanhnhan-eh-hi](https://github.com/ngvuthanhnhan-eh-hi)! - [Toolbar.Message] Fix the shrinkage issue on iPad
8
+
9
+ - [#4241](https://github.com/Thinkei/hero-design/pull/4241) [`c901f282aa0d46d38f03470c823696e87632d9ef`](https://github.com/Thinkei/hero-design/commit/c901f282aa0d46d38f03470c823696e87632d9ef) Thanks [@khoaddtran](https://github.com/khoaddtran)! - [RichTextEditor] Fix rich text editor is reset when height changed on Android
10
+
3
11
  ## 8.109.1
4
12
 
5
13
  ### Patch Changes
package/es/index.js CHANGED
@@ -7283,7 +7283,7 @@ var getToolbarTheme = function getToolbarTheme(theme) {
7283
7283
  var sizes = {
7284
7284
  itemWrapperHeight: scale(64),
7285
7285
  messageWrapperHeight: scale(64),
7286
- messageInputHeight: 40
7286
+ messageInputHeight: scale(40)
7287
7287
  };
7288
7288
  var radii = {
7289
7289
  iconButtonWrapperBorderRadius: theme.radii.xxxlarge,
@@ -47511,13 +47511,20 @@ var BaseRichTextEditor = function BaseRichTextEditor(_ref) {
47511
47511
  break;
47512
47512
  }
47513
47513
  }, [onFocus, onBlur]);
47514
- return /*#__PURE__*/React__default.createElement(TouchableWithoutFeedback, {
47514
+ return /*#__PURE__*/React__default.createElement(View, {
47515
+ testID: "webViewWrapper",
47516
+ style: {
47517
+ height: webviewHeight,
47518
+ width: '100%'
47519
+ }
47520
+ }, /*#__PURE__*/React__default.createElement(TouchableWithoutFeedback, {
47515
47521
  onPress: function onPress(e) {
47516
47522
  return e.stopPropagation();
47517
47523
  }
47518
47524
  }, /*#__PURE__*/React__default.createElement(StyledWebView, {
47519
47525
  hideKeyboardAccessoryView: true,
47520
47526
  ref: webview,
47527
+ style: style,
47521
47528
  testID: testID,
47522
47529
  source: {
47523
47530
  html: html
@@ -47525,11 +47532,9 @@ var BaseRichTextEditor = function BaseRichTextEditor(_ref) {
47525
47532
  onMessage: onMessage,
47526
47533
  scrollEnabled: false,
47527
47534
  originWhitelist: ['*'],
47528
- keyboardDisplayRequiresUserAction: false,
47529
- style: StyleSheet$1.flatten([style, {
47530
- height: webviewHeight
47531
- }])
47532
- }));
47535
+ showsVerticalScrollIndicator: false,
47536
+ keyboardDisplayRequiresUserAction: false
47537
+ })));
47533
47538
  };
47534
47539
 
47535
47540
  var defaultValue = [{
@@ -47651,9 +47656,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
47651
47656
  }, /*#__PURE__*/React__default.createElement(StyledBorderBackDrop, {
47652
47657
  themeState: state,
47653
47658
  themeFocused: isFocused
47654
- }), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, {
47655
- testID: "webViewWrapper"
47656
- }, /*#__PURE__*/React__default.createElement(BaseRichTextEditor, {
47659
+ }), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, /*#__PURE__*/React__default.createElement(BaseRichTextEditor, {
47657
47660
  name: name,
47658
47661
  value: value,
47659
47662
  style: [style, {
package/lib/index.js CHANGED
@@ -7312,7 +7312,7 @@ var getToolbarTheme = function getToolbarTheme(theme) {
7312
7312
  var sizes = {
7313
7313
  itemWrapperHeight: scale(64),
7314
7314
  messageWrapperHeight: scale(64),
7315
- messageInputHeight: 40
7315
+ messageInputHeight: scale(40)
7316
7316
  };
7317
7317
  var radii = {
7318
7318
  iconButtonWrapperBorderRadius: theme.radii.xxxlarge,
@@ -47540,13 +47540,20 @@ var BaseRichTextEditor = function BaseRichTextEditor(_ref) {
47540
47540
  break;
47541
47541
  }
47542
47542
  }, [onFocus, onBlur]);
47543
- return /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableWithoutFeedback, {
47543
+ return /*#__PURE__*/React__namespace.default.createElement(reactNative.View, {
47544
+ testID: "webViewWrapper",
47545
+ style: {
47546
+ height: webviewHeight,
47547
+ width: '100%'
47548
+ }
47549
+ }, /*#__PURE__*/React__namespace.default.createElement(reactNative.TouchableWithoutFeedback, {
47544
47550
  onPress: function onPress(e) {
47545
47551
  return e.stopPropagation();
47546
47552
  }
47547
47553
  }, /*#__PURE__*/React__namespace.default.createElement(StyledWebView, {
47548
47554
  hideKeyboardAccessoryView: true,
47549
47555
  ref: webview,
47556
+ style: style,
47550
47557
  testID: testID,
47551
47558
  source: {
47552
47559
  html: html
@@ -47554,11 +47561,9 @@ var BaseRichTextEditor = function BaseRichTextEditor(_ref) {
47554
47561
  onMessage: onMessage,
47555
47562
  scrollEnabled: false,
47556
47563
  originWhitelist: ['*'],
47557
- keyboardDisplayRequiresUserAction: false,
47558
- style: reactNative.StyleSheet.flatten([style, {
47559
- height: webviewHeight
47560
- }])
47561
- }));
47564
+ showsVerticalScrollIndicator: false,
47565
+ keyboardDisplayRequiresUserAction: false
47566
+ })));
47562
47567
  };
47563
47568
 
47564
47569
  var defaultValue = [{
@@ -47680,9 +47685,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
47680
47685
  }, /*#__PURE__*/React__namespace.default.createElement(StyledBorderBackDrop, {
47681
47686
  themeState: state,
47682
47687
  themeFocused: isFocused
47683
- }), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, {
47684
- testID: "webViewWrapper"
47685
- }, /*#__PURE__*/React__namespace.default.createElement(BaseRichTextEditor, {
47688
+ }), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, null, /*#__PURE__*/React__namespace.default.createElement(BaseRichTextEditor, {
47686
47689
  name: name,
47687
47690
  value: value,
47688
47691
  style: [style, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.109.1",
3
+ "version": "8.109.2",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -7,7 +7,7 @@ import React, {
7
7
  useState,
8
8
  } from 'react';
9
9
 
10
- import { TouchableWithoutFeedback, StyleSheet } from 'react-native';
10
+ import { TouchableWithoutFeedback, View } from 'react-native';
11
11
  import type { WebView } from 'react-native-webview';
12
12
  import type { ReactElement, Ref } from 'react';
13
13
  import type { StyleProp, ViewStyle } from 'react-native';
@@ -282,19 +282,25 @@ const BaseRichTextEditor = ({
282
282
  );
283
283
 
284
284
  return (
285
- <TouchableWithoutFeedback onPress={(e) => e.stopPropagation()}>
286
- <StyledWebView
287
- hideKeyboardAccessoryView
288
- ref={webview}
289
- testID={testID}
290
- source={{ html }}
291
- onMessage={onMessage}
292
- scrollEnabled={false}
293
- originWhitelist={['*']}
294
- keyboardDisplayRequiresUserAction={false}
295
- style={StyleSheet.flatten([style, { height: webviewHeight }])}
296
- />
297
- </TouchableWithoutFeedback>
285
+ <View
286
+ testID="webViewWrapper"
287
+ style={{ height: webviewHeight, width: '100%' }}
288
+ >
289
+ <TouchableWithoutFeedback onPress={(e) => e.stopPropagation()}>
290
+ <StyledWebView
291
+ hideKeyboardAccessoryView
292
+ ref={webview}
293
+ style={style}
294
+ testID={testID}
295
+ source={{ html }}
296
+ onMessage={onMessage}
297
+ scrollEnabled={false}
298
+ originWhitelist={['*']}
299
+ showsVerticalScrollIndicator={false}
300
+ keyboardDisplayRequiresUserAction={false}
301
+ />
302
+ </TouchableWithoutFeedback>
303
+ </View>
298
304
  );
299
305
  };
300
306
 
@@ -188,7 +188,7 @@ const RichTextEditor = ({
188
188
  <StyledTextInputContainer onLayout={onLayout}>
189
189
  <StyledBorderBackDrop themeState={state} themeFocused={isFocused} />
190
190
 
191
- <StyledTextInputAndLabelContainer testID="webViewWrapper">
191
+ <StyledTextInputAndLabelContainer>
192
192
  <BaseRichTextEditor
193
193
  name={name}
194
194
  value={value}
@@ -201,7 +201,7 @@ describe('RichTextEditor', () => {
201
201
  );
202
202
 
203
203
  expect(wrapper.toJSON()).toMatchSnapshot();
204
- expect(wrapper.getByTestId('webview')).toHaveStyle({
204
+ expect(wrapper.getByTestId('webViewWrapper')).toHaveStyle({
205
205
  height: 480,
206
206
  });
207
207
  });
@@ -135,38 +135,47 @@ exports[`RichTextEditor onMessage received event editor-layout should update hei
135
135
  undefined,
136
136
  ]
137
137
  }
138
- testID="webViewWrapper"
139
138
  >
140
- <WebView
141
- accessibilityState={
139
+ <View
140
+ style={
142
141
  {
143
- "busy": undefined,
144
- "checked": undefined,
145
- "disabled": undefined,
146
- "expanded": undefined,
147
- "selected": undefined,
142
+ "height": 480,
143
+ "width": "100%",
148
144
  }
149
145
  }
150
- accessible={true}
151
- focusable={true}
152
- hideKeyboardAccessoryView={true}
153
- keyboardDisplayRequiresUserAction={false}
154
- onClick={[Function]}
155
- onResponderGrant={[Function]}
156
- onResponderMove={[Function]}
157
- onResponderRelease={[Function]}
158
- onResponderTerminate={[Function]}
159
- onResponderTerminationRequest={[Function]}
160
- onStartShouldSetResponder={[Function]}
161
- originWhitelist={
162
- [
163
- "*",
164
- ]
165
- }
166
- scrollEnabled={false}
167
- source={
168
- {
169
- "html": "
146
+ testID="webViewWrapper"
147
+ >
148
+ <WebView
149
+ accessibilityState={
150
+ {
151
+ "busy": undefined,
152
+ "checked": undefined,
153
+ "disabled": undefined,
154
+ "expanded": undefined,
155
+ "selected": undefined,
156
+ }
157
+ }
158
+ accessible={true}
159
+ focusable={true}
160
+ hideKeyboardAccessoryView={true}
161
+ keyboardDisplayRequiresUserAction={false}
162
+ onClick={[Function]}
163
+ onResponderGrant={[Function]}
164
+ onResponderMove={[Function]}
165
+ onResponderRelease={[Function]}
166
+ onResponderTerminate={[Function]}
167
+ onResponderTerminationRequest={[Function]}
168
+ onStartShouldSetResponder={[Function]}
169
+ originWhitelist={
170
+ [
171
+ "*",
172
+ ]
173
+ }
174
+ scrollEnabled={false}
175
+ showsVerticalScrollIndicator={false}
176
+ source={
177
+ {
178
+ "html": "
170
179
  <!DOCTYPE html>
171
180
  <html>
172
181
  <head>
@@ -197,25 +206,29 @@ exports[`RichTextEditor onMessage received event editor-layout should update hei
197
206
  </body>
198
207
  </html>
199
208
  ",
209
+ }
200
210
  }
201
- }
202
- style={
203
- [
204
- {
205
- "backgroundColor": "transparent",
206
- "fontSize": 16,
207
- "minHeight": 24,
208
- "textAlignVertical": "center",
209
- },
210
- {
211
- "backgroundColor": "yellow",
212
- "height": 480,
213
- "marginHorizontal": 8,
214
- },
215
- ]
216
- }
217
- testID="webview"
218
- />
211
+ style={
212
+ [
213
+ {
214
+ "backgroundColor": "transparent",
215
+ "fontSize": 16,
216
+ "minHeight": 24,
217
+ "textAlignVertical": "center",
218
+ },
219
+ [
220
+ {
221
+ "backgroundColor": "yellow",
222
+ },
223
+ {
224
+ "marginHorizontal": 8,
225
+ },
226
+ ],
227
+ ]
228
+ }
229
+ testID="webview"
230
+ />
231
+ </View>
219
232
  </View>
220
233
  </View>
221
234
  <View
@@ -460,38 +473,47 @@ exports[`RichTextEditor should render correctly 1`] = `
460
473
  undefined,
461
474
  ]
462
475
  }
463
- testID="webViewWrapper"
464
476
  >
465
- <WebView
466
- accessibilityState={
477
+ <View
478
+ style={
467
479
  {
468
- "busy": undefined,
469
- "checked": undefined,
470
- "disabled": undefined,
471
- "expanded": undefined,
472
- "selected": undefined,
480
+ "height": undefined,
481
+ "width": "100%",
473
482
  }
474
483
  }
475
- accessible={true}
476
- focusable={true}
477
- hideKeyboardAccessoryView={true}
478
- keyboardDisplayRequiresUserAction={false}
479
- onClick={[Function]}
480
- onResponderGrant={[Function]}
481
- onResponderMove={[Function]}
482
- onResponderRelease={[Function]}
483
- onResponderTerminate={[Function]}
484
- onResponderTerminationRequest={[Function]}
485
- onStartShouldSetResponder={[Function]}
486
- originWhitelist={
487
- [
488
- "*",
489
- ]
490
- }
491
- scrollEnabled={false}
492
- source={
493
- {
494
- "html": "
484
+ testID="webViewWrapper"
485
+ >
486
+ <WebView
487
+ accessibilityState={
488
+ {
489
+ "busy": undefined,
490
+ "checked": undefined,
491
+ "disabled": undefined,
492
+ "expanded": undefined,
493
+ "selected": undefined,
494
+ }
495
+ }
496
+ accessible={true}
497
+ focusable={true}
498
+ hideKeyboardAccessoryView={true}
499
+ keyboardDisplayRequiresUserAction={false}
500
+ onClick={[Function]}
501
+ onResponderGrant={[Function]}
502
+ onResponderMove={[Function]}
503
+ onResponderRelease={[Function]}
504
+ onResponderTerminate={[Function]}
505
+ onResponderTerminationRequest={[Function]}
506
+ onStartShouldSetResponder={[Function]}
507
+ originWhitelist={
508
+ [
509
+ "*",
510
+ ]
511
+ }
512
+ scrollEnabled={false}
513
+ showsVerticalScrollIndicator={false}
514
+ source={
515
+ {
516
+ "html": "
495
517
  <!DOCTYPE html>
496
518
  <html>
497
519
  <head>
@@ -522,25 +544,29 @@ exports[`RichTextEditor should render correctly 1`] = `
522
544
  </body>
523
545
  </html>
524
546
  ",
547
+ }
525
548
  }
526
- }
527
- style={
528
- [
529
- {
530
- "backgroundColor": "transparent",
531
- "fontSize": 16,
532
- "minHeight": 24,
533
- "textAlignVertical": "center",
534
- },
535
- {
536
- "backgroundColor": "yellow",
537
- "height": undefined,
538
- "marginHorizontal": 8,
539
- },
540
- ]
541
- }
542
- testID="webview"
543
- />
549
+ style={
550
+ [
551
+ {
552
+ "backgroundColor": "transparent",
553
+ "fontSize": 16,
554
+ "minHeight": 24,
555
+ "textAlignVertical": "center",
556
+ },
557
+ [
558
+ {
559
+ "backgroundColor": "yellow",
560
+ },
561
+ {
562
+ "marginHorizontal": 8,
563
+ },
564
+ ],
565
+ ]
566
+ }
567
+ testID="webview"
568
+ />
569
+ </View>
544
570
  </View>
545
571
  </View>
546
572
  <View
@@ -37,7 +37,7 @@ const getToolbarTheme = (theme: GlobalTheme) => {
37
37
  const sizes = {
38
38
  itemWrapperHeight: scale(64),
39
39
  messageWrapperHeight: scale(64),
40
- messageInputHeight: 40,
40
+ messageInputHeight: scale(40),
41
41
  };
42
42
 
43
43
  const radii = {