react-rx 2.1.0 → 2.1.1

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.
Files changed (54) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -0
  3. package/dist/cjs/__tests__/strictmode.test.d.ts +1 -0
  4. package/dist/cjs/__tests__/strictmode.test.js +111 -0
  5. package/dist/cjs/__tests__/useAsObservable.test.d.ts +1 -0
  6. package/dist/cjs/__tests__/useAsObservable.test.js +77 -0
  7. package/dist/cjs/__tests__/useObservable.test.d.ts +1 -0
  8. package/dist/cjs/__tests__/useObservable.test.js +116 -0
  9. package/dist/cjs/displayName.js +1 -0
  10. package/dist/cjs/reactiveComponent.js +2 -0
  11. package/dist/cjs/utils.js +5 -0
  12. package/dist/es2015/__tests__/strictmode.test.d.ts +1 -0
  13. package/dist/es2015/__tests__/strictmode.test.js +69 -0
  14. package/dist/es2015/__tests__/useAsObservable.test.d.ts +1 -0
  15. package/dist/es2015/__tests__/useAsObservable.test.js +72 -0
  16. package/dist/es2015/__tests__/useObservable.test.d.ts +1 -0
  17. package/dist/es2015/__tests__/useObservable.test.js +110 -0
  18. package/dist/es2015/displayName.js +1 -0
  19. package/dist/es2015/reactiveComponent.js +2 -0
  20. package/dist/es2015/utils.js +5 -0
  21. package/dist/esm/__tests__/strictmode.test.d.ts +1 -0
  22. package/dist/esm/__tests__/strictmode.test.js +109 -0
  23. package/dist/esm/__tests__/useAsObservable.test.d.ts +1 -0
  24. package/dist/esm/__tests__/useAsObservable.test.js +72 -0
  25. package/dist/esm/__tests__/useObservable.test.d.ts +1 -0
  26. package/dist/esm/__tests__/useObservable.test.js +114 -0
  27. package/dist/esm/displayName.js +1 -0
  28. package/dist/esm/reactiveComponent.js +2 -0
  29. package/dist/esm/utils.js +5 -0
  30. package/package.json +106 -24
  31. package/src/__tests__/strictmode.test.ts +79 -0
  32. package/src/__tests__/useAsObservable.test.tsx +94 -0
  33. package/src/__tests__/useObservable.test.tsx +145 -0
  34. package/src/displayName.ts +1 -0
  35. package/src/reactiveComponent.ts +3 -0
  36. package/src/useWithObservable.ts +1 -0
  37. package/src/utils.ts +5 -0
  38. package/.eslintrc.json +0 -13
  39. package/.idea/codeStyles/Project.xml +0 -113
  40. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  41. package/.idea/compiler.xml +0 -6
  42. package/.idea/encodings.xml +0 -4
  43. package/.idea/inspectionProfiles/Project_Default.xml +0 -7
  44. package/.idea/jsonSchemas.xml +0 -25
  45. package/.idea/markdown-navigator-enh.xml +0 -29
  46. package/.idea/markdown-navigator.xml +0 -55
  47. package/.idea/markdown.xml +0 -9
  48. package/.idea/misc.xml +0 -0
  49. package/.idea/modules.xml +0 -8
  50. package/.idea/react-rx.iml +0 -17
  51. package/.idea/vcs.xml +0 -6
  52. package/.prettierrc +0 -8
  53. package/jest.config.ts +0 -14
  54. package/tsconfig.json +0 -12
@@ -1,113 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <code_scheme name="Project" version="173">
3
- <option name="OTHER_INDENT_OPTIONS">
4
- <value>
5
- <option name="INDENT_SIZE" value="2" />
6
- <option name="TAB_SIZE" value="2" />
7
- </value>
8
- </option>
9
- <HTMLCodeStyleSettings>
10
- <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
11
- <option name="HTML_ENFORCE_QUOTES" value="true" />
12
- </HTMLCodeStyleSettings>
13
- <JSCodeStyleSettings version="0">
14
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
15
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
16
- <option name="FORCE_QUOTE_STYlE" value="true" />
17
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
18
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
19
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
20
- </JSCodeStyleSettings>
21
- <MarkdownNavigatorCodeStyleSettings>
22
- <option name="RIGHT_MARGIN" value="72" />
23
- </MarkdownNavigatorCodeStyleSettings>
24
- <TypeScriptCodeStyleSettings version="0">
25
- <option name="FORCE_SEMICOLON_STYLE" value="true" />
26
- <option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
27
- <option name="FORCE_QUOTE_STYlE" value="true" />
28
- <option name="ENFORCE_TRAILING_COMMA" value="Remove" />
29
- <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
30
- <option name="SPACES_WITHIN_IMPORTS" value="true" />
31
- </TypeScriptCodeStyleSettings>
32
- <VueCodeStyleSettings>
33
- <option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
34
- <option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
35
- </VueCodeStyleSettings>
36
- <XML>
37
- <option name="XML_SPACE_INSIDE_EMPTY_TAG" value="true" />
38
- <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
39
- </XML>
40
- <codeStyleSettings language="CSS">
41
- <indentOptions>
42
- <option name="INDENT_SIZE" value="2" />
43
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
44
- <option name="TAB_SIZE" value="2" />
45
- </indentOptions>
46
- </codeStyleSettings>
47
- <codeStyleSettings language="HTML">
48
- <option name="SOFT_MARGINS" value="80" />
49
- <indentOptions>
50
- <option name="INDENT_SIZE" value="2" />
51
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
52
- <option name="TAB_SIZE" value="2" />
53
- </indentOptions>
54
- </codeStyleSettings>
55
- <codeStyleSettings language="JSON">
56
- <indentOptions>
57
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
58
- <option name="TAB_SIZE" value="2" />
59
- </indentOptions>
60
- </codeStyleSettings>
61
- <codeStyleSettings language="Jade">
62
- <indentOptions>
63
- <option name="INDENT_SIZE" value="2" />
64
- <option name="TAB_SIZE" value="2" />
65
- </indentOptions>
66
- </codeStyleSettings>
67
- <codeStyleSettings language="JavaScript">
68
- <option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
69
- <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
70
- <option name="KEEP_SIMPLE_BLOCKS_IN_ONE_LINE" value="true" />
71
- <option name="KEEP_SIMPLE_METHODS_IN_ONE_LINE" value="true" />
72
- <option name="SOFT_MARGINS" value="80" />
73
- <indentOptions>
74
- <option name="INDENT_SIZE" value="2" />
75
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
76
- <option name="TAB_SIZE" value="2" />
77
- </indentOptions>
78
- </codeStyleSettings>
79
- <codeStyleSettings language="LESS">
80
- <indentOptions>
81
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
82
- <option name="TAB_SIZE" value="2" />
83
- </indentOptions>
84
- </codeStyleSettings>
85
- <codeStyleSettings language="SASS">
86
- <indentOptions>
87
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
88
- <option name="TAB_SIZE" value="2" />
89
- </indentOptions>
90
- </codeStyleSettings>
91
- <codeStyleSettings language="SCSS">
92
- <indentOptions>
93
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
94
- <option name="TAB_SIZE" value="2" />
95
- </indentOptions>
96
- </codeStyleSettings>
97
- <codeStyleSettings language="TypeScript">
98
- <option name="SOFT_MARGINS" value="80" />
99
- <indentOptions>
100
- <option name="INDENT_SIZE" value="2" />
101
- <option name="CONTINUATION_INDENT_SIZE" value="2" />
102
- <option name="TAB_SIZE" value="2" />
103
- </indentOptions>
104
- </codeStyleSettings>
105
- <codeStyleSettings language="XML">
106
- <indentOptions>
107
- <option name="INDENT_SIZE" value="2" />
108
- <option name="CONTINUATION_INDENT_SIZE" value="4" />
109
- <option name="TAB_SIZE" value="2" />
110
- </indentOptions>
111
- </codeStyleSettings>
112
- </code_scheme>
113
- </component>
@@ -1,5 +0,0 @@
1
- <component name="ProjectCodeStyleConfiguration">
2
- <state>
3
- <option name="USE_PER_PROJECT_SETTINGS" value="true" />
4
- </state>
5
- </component>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="TypeScriptCompiler">
4
- <option name="nodeInterpreterTextField" value="node" />
5
- </component>
6
- </project>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding" addBOMForNewFiles="with NO BOM" />
4
- </project>
@@ -1,7 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- <inspection_tool class="TypescriptExplicitMemberType" enabled="false" level="INFORMATION" enabled_by_default="false" />
6
- </profile>
7
- </component>
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="JsonSchemaMappingsProjectConfiguration">
4
- <state>
5
- <map>
6
- <entry key="package">
7
- <value>
8
- <SchemaInfo>
9
- <option name="name" value="package" />
10
- <option name="relativePathToSchema" value="http://json.schemastore.org/package" />
11
- <option name="applicationDefined" value="true" />
12
- <option name="patterns">
13
- <list>
14
- <Item>
15
- <option name="path" value="package.json" />
16
- </Item>
17
- </list>
18
- </option>
19
- </SchemaInfo>
20
- </value>
21
- </entry>
22
- </map>
23
- </state>
24
- </component>
25
- </project>
@@ -1,29 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="MarkdownEnhProjectSettings">
4
- <AnnotatorSettings targetHasSpaces="true" linkCaseMismatch="true" wikiCaseMismatch="true" wikiLinkHasDashes="true" notUnderWikiHome="true" targetNotWikiPageExt="true" notUnderSourceWikiHome="true" targetNameHasAnchor="true" targetPathHasAnchor="true" wikiLinkHasSlash="true" wikiLinkHasSubdir="true" wikiLinkHasOnlyAnchor="true" linkTargetsWikiHasExt="true" linkTargetsWikiHasBadExt="true" notUnderSameRepo="true" targetNotUnderVcs="false" linkNeedsExt="true" linkHasBadExt="true" linkTargetNeedsExt="true" linkTargetHasBadExt="true" wikiLinkNotInWiki="true" imageTargetNotInRaw="true" repoRelativeAcrossVcsRoots="true" multipleWikiTargetsMatch="true" unresolvedLinkReference="true" linkIsIgnored="true" anchorIsIgnored="true" anchorIsUnresolved="true" anchorLineReferenceIsUnresolved="true" anchorLineReferenceFormat="true" anchorHasDuplicates="true" abbreviationDuplicates="true" abbreviationNotUsed="true" attributeIdDuplicateDefinition="true" attributeIdNotUsed="true" footnoteDuplicateDefinition="true" footnoteUnresolved="true" footnoteDuplicates="true" footnoteNotUsed="true" macroDuplicateDefinition="true" macroUnresolved="true" macroDuplicates="true" macroNotUsed="true" referenceDuplicateDefinition="true" referenceUnresolved="true" referenceDuplicates="true" referenceNotUsed="true" referenceUnresolvedNumericId="true" enumRefDuplicateDefinition="true" enumRefUnresolved="true" enumRefDuplicates="true" enumRefNotUsed="true" enumRefLinkUnresolved="true" enumRefLinkDuplicates="true" simTocUpdateNeeded="true" simTocTitleSpaceNeeded="true" />
5
- <HtmlExportSettings updateOnSave="false" parentDir="" targetDir="" cssDir="css" scriptDir="js" plainHtml="false" imageDir="" copyLinkedImages="false" imagePathType="0" targetPathType="2" targetExt="" useTargetExt="false" noCssNoScripts="false" useElementStyleAttribute="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" linkFormatType="HTTP_ABSOLUTE" />
6
- <LinkMapSettings>
7
- <textMaps />
8
- </LinkMapSettings>
9
- </component>
10
- <component name="MarkdownNavigatorHistory">
11
- <PasteImageHistory checkeredTransparentBackground="false" filename="image" directory="" onPasteImageTargetRef="3" onPasteLinkText="0" onPasteImageElement="1" onPasteLinkElement="1" onPasteReferenceElement="2" cornerRadius="20" borderColor="0" transparentColor="16777215" borderWidth="1" trimTop="0" trimBottom="0" trimLeft="0" trimRight="0" transparent="false" roundCorners="false" showPreview="true" bordered="false" scaled="false" cropped="false" hideInapplicableOperations="false" preserveLinkFormat="false" scale="50" scalingInterpolation="1" transparentTolerance="0" saveAsDefaultOnOK="false" linkFormat="0" addHighlights="false" showHighlightCoordinates="true" showHighlights="false" mouseSelectionAddsHighlight="false" outerFilled="false" outerFillColor="0" outerFillTransparent="true" outerFillAlpha="30">
12
- <highlightList />
13
- <directories />
14
- <filenames />
15
- </PasteImageHistory>
16
- <CopyImageHistory checkeredTransparentBackground="false" filename="image" directory="" onPasteImageTargetRef="3" onPasteLinkText="0" onPasteImageElement="1" onPasteLinkElement="1" onPasteReferenceElement="2" cornerRadius="20" borderColor="0" transparentColor="16777215" borderWidth="1" trimTop="0" trimBottom="0" trimLeft="0" trimRight="0" transparent="false" roundCorners="false" showPreview="true" bordered="false" scaled="false" cropped="false" hideInapplicableOperations="false" preserveLinkFormat="false" scale="50" scalingInterpolation="1" transparentTolerance="0" saveAsDefaultOnOK="false" linkFormat="0" addHighlights="false" showHighlightCoordinates="true" showHighlights="false" mouseSelectionAddsHighlight="false" outerFilled="false" outerFillColor="0" outerFillTransparent="true" outerFillAlpha="30">
17
- <highlightList />
18
- <directories />
19
- <filenames />
20
- </CopyImageHistory>
21
- <PasteLinkHistory onPasteImageTargetRef="3" onPasteTargetRef="1" onPasteLinkText="0" onPasteImageElement="1" onPasteLinkElement="1" onPasteWikiElement="2" onPasteReferenceElement="2" hideInapplicableOperations="false" preserveLinkFormat="false" useHeadingForLinkText="false" linkFormat="0" saveAsDefaultOnOK="false" />
22
- <TableToJsonHistory>
23
- <entries />
24
- </TableToJsonHistory>
25
- <TableSortHistory>
26
- <entries />
27
- </TableSortHistory>
28
- </component>
29
- </project>
@@ -1,55 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="FlexmarkProjectSettings">
4
- <FlexmarkHtmlSettings flexmarkSpecExampleRendering="0" flexmarkSpecExampleRenderHtml="false">
5
- <flexmarkSectionLanguages>
6
- <option name="1" value="Markdown" />
7
- <option name="2" value="HTML" />
8
- <option name="3" value="flexmark-ast:1" />
9
- </flexmarkSectionLanguages>
10
- </FlexmarkHtmlSettings>
11
- </component>
12
- <component name="MarkdownProjectSettings">
13
- <PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" synchronizePreviewPosition="true" highlightPreviewType="LINE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="true" showSelectionInPreview="true" lastLayoutSetsDefault="false">
14
- <PanelProvider>
15
- <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
16
- </PanelProvider>
17
- </PreviewSettings>
18
- <ParserSettings gitHubSyntaxChange="false" correctedInvalidSettings="false" emojiShortcuts="1" emojiImages="0">
19
- <PegdownExtensions>
20
- <option name="ANCHORLINKS" value="true" />
21
- <option name="ATXHEADERSPACE" value="true" />
22
- <option name="FENCED_CODE_BLOCKS" value="true" />
23
- <option name="INTELLIJ_DUMMY_IDENTIFIER" value="true" />
24
- <option name="RELAXEDHRULES" value="true" />
25
- <option name="STRIKETHROUGH" value="true" />
26
- <option name="TABLES" value="true" />
27
- <option name="TASKLISTITEMS" value="true" />
28
- </PegdownExtensions>
29
- <ParserOptions>
30
- <option name="COMMONMARK_LISTS" value="true" />
31
- <option name="EMOJI_SHORTCUTS" value="true" />
32
- <option name="GFM_TABLE_RENDERING" value="true" />
33
- <option name="PRODUCTION_SPEC_PARSER" value="true" />
34
- <option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
35
- </ParserOptions>
36
- </ParserSettings>
37
- <HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" addPageHeader="false" imageUriSerials="false" addDocTypeHtml="true" noParaTags="false" plantUmlConversion="0">
38
- <GeneratorProvider>
39
- <provider providerId="com.vladsch.idea.multimarkdown.editor.text.html.generator" providerName="Unmodified HTML Generator" />
40
- </GeneratorProvider>
41
- <headerTop />
42
- <headerBottom />
43
- <bodyTop />
44
- <bodyBottom />
45
- </HtmlSettings>
46
- <CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssUriSerial="true" isCssTextEnabled="false" isDynamicPageWidth="true">
47
- <StylesheetProvider>
48
- <provider providerId="com.vladsch.idea.multimarkdown.editor.text.html.css" providerName="No Stylesheet" />
49
- </StylesheetProvider>
50
- <ScriptProviders />
51
- <cssText />
52
- <cssUriHistory />
53
- </CssSettings>
54
- </component>
55
- </project>
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="MarkdownSettings">
4
- <enabledExtensions>
5
- <entry key="MermaidLanguageExtension" value="false" />
6
- <entry key="PlantUMLLanguageExtension" value="false" />
7
- </enabledExtensions>
8
- </component>
9
- </project>
package/.idea/misc.xml DELETED
File without changes
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/react-rx.iml" filepath="$PROJECT_DIR$/.idea/react-rx.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,17 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/.build-examples" />
6
- <excludeFolder url="file://$MODULE_DIR$/.cache" />
7
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
8
- <excludeFolder url="file://$MODULE_DIR$/build" />
9
- <excludeFolder url="file://$MODULE_DIR$/build-web" />
10
- <excludeFolder url="file://$MODULE_DIR$/dist" />
11
- <excludeFolder url="file://$MODULE_DIR$/temp" />
12
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
13
- </content>
14
- <orderEntry type="inheritedJdk" />
15
- <orderEntry type="sourceFolder" forTests="false" />
16
- </component>
17
- </module>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
package/.prettierrc DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "semi": false,
3
- "arrowParens": "avoid",
4
- "printWidth": 100,
5
- "bracketSpacing": false,
6
- "singleQuote": true,
7
- "trailingComma": "all"
8
- }
package/jest.config.ts DELETED
@@ -1,14 +0,0 @@
1
- export default {
2
- preset: 'ts-jest',
3
- // verbose: true,
4
- testEnvironment: 'jsdom',
5
- testEnvironmentOptions: {
6
- url: 'http://localhost/',
7
- },
8
- globals: {
9
- 'ts-jest': {
10
- warnOnly: true,
11
- },
12
- },
13
- rootDir: 'src',
14
- }
package/tsconfig.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "include": ["src/**/*"],
3
- "compilerOptions": {
4
- "target": "ES2015",
5
- "strict": true,
6
- "outDir": "dist",
7
- "jsx": "react",
8
- "declaration": true,
9
- "esModuleInterop": true,
10
- "moduleResolution": "node"
11
- }
12
- }