@hero-design/rn-work-uikit 1.4.0 → 1.6.0
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.
- package/CHANGELOG.md +27 -0
- package/lib/index.js +870 -639
- package/package.json +2 -2
- package/src/components/DatePicker/__tests__/__snapshots__/index.spec.tsx.snap +36 -3
- package/src/components/FormGroup/__tests__/__snapshots__/index.spec.tsx.snap +26 -3
- package/src/components/FormGroup/__tests__/index.spec.tsx +143 -3
- package/src/components/FormGroup/index.tsx +16 -7
- package/src/components/RichTextEditor/RichTextEditor.tsx +15 -24
- package/src/components/RichTextEditor/RichTextEditorInput.tsx +17 -11
- package/src/components/RichTextEditor/StyledRichTextEditor.tsx +10 -7
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +81 -0
- package/src/components/RichTextEditor/index.tsx +2 -4
- package/src/components/RichTextEditor/types.ts +12 -1
- package/src/components/Select/__tests__/__snapshots__/index.spec.tsx.snap +24 -2
- package/src/components/Select/index.tsx +11 -10
- package/src/components/TextInput/Group/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/TextInput/Group/index.tsx +6 -1
- package/src/components/TextInput/StyledTextInput.tsx +3 -3
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +17 -17
- package/src/components/TextInput/index.tsx +2 -2
- package/src/components/TextInput/types.ts +1 -1
- package/src/index.ts +2 -1
- package/src/utils/hooks.ts +10 -0
- package/stats/1.6.0/rn-work-uikit-stats.html +4844 -0
- package/testUtils/setup.tsx +19 -1
- package/src/components/RichTextEditor/__mocks__/hero-editor.js +0 -3
- package/stats/1.4.0/rn-work-uikit-stats.html +0 -4844
package/testUtils/setup.tsx
CHANGED
|
@@ -400,6 +400,24 @@ jest.mock('react-native/Libraries/Utilities/BackHandler', () => ({
|
|
|
400
400
|
}));
|
|
401
401
|
|
|
402
402
|
// Mock hero-editor
|
|
403
|
-
jest.mock(
|
|
403
|
+
jest.mock(
|
|
404
|
+
'hero-editor',
|
|
405
|
+
() => ({
|
|
406
|
+
plainSerializer: (value: unknown[]) => {
|
|
407
|
+
if (!value || !Array.isArray(value)) return '';
|
|
408
|
+
return value
|
|
409
|
+
.map((node: unknown) =>
|
|
410
|
+
(node as { children?: unknown[] })?.children &&
|
|
411
|
+
Array.isArray((node as { children?: unknown[] }).children)
|
|
412
|
+
? (node as { children: { text?: string }[] }).children
|
|
413
|
+
.map((child: { text?: string }) => child.text || '')
|
|
414
|
+
.join('')
|
|
415
|
+
: ''
|
|
416
|
+
)
|
|
417
|
+
.join('\n');
|
|
418
|
+
},
|
|
419
|
+
}),
|
|
420
|
+
{ virtual: true }
|
|
421
|
+
);
|
|
404
422
|
|
|
405
423
|
export {};
|