react-native-enriched 0.2.1 → 0.4.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/README.md +21 -16
- package/android/build.gradle +77 -72
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerDelegate.java +21 -0
- package/android/generated/java/com/facebook/react/viewmanagers/EnrichedTextInputViewManagerInterface.java +7 -0
- package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ComponentDescriptors.cpp +1 -1
- package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ComponentDescriptors.h +1 -1
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.cpp +276 -0
- package/android/generated/jni/react/renderer/components/ReactNativeEnrichedSpec/EventEmitters.h +239 -0
- package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/Props.cpp +10 -0
- package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/Props.h +251 -0
- package/android/gradle.properties +5 -5
- package/android/lint.gradle +70 -0
- package/android/src/main/java/com/swmansion/enriched/{EnrichedTextInputViewPackage.kt → ReactNativeEnrichedPackage.kt} +4 -5
- package/android/src/main/java/com/swmansion/enriched/{utils → common}/AsyncDrawable.kt +50 -15
- package/android/src/main/java/com/swmansion/enriched/common/CheckboxDrawable.kt +81 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedConstants.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/common/EnrichedStyle.kt +57 -0
- package/android/src/main/java/com/swmansion/enriched/{spans/utils → common}/ForceRedrawSpan.kt +3 -2
- package/android/src/main/java/com/swmansion/enriched/common/MentionStyle.kt +7 -0
- package/android/src/main/java/com/swmansion/enriched/{utils → common}/ResourceManager.kt +1 -1
- package/android/src/main/java/com/swmansion/enriched/{utils → common/parser}/EnrichedParser.java +228 -160
- package/android/src/main/java/com/swmansion/enriched/common/parser/EnrichedSpanFactory.kt +79 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedBlockQuoteSpan.kt +53 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedBoldSpan.kt +12 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedCheckboxListSpan.kt +91 -0
- package/android/src/main/java/com/swmansion/enriched/{spans → common/spans}/EnrichedCodeBlockSpan.kt +12 -14
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH1Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH2Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH3Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH4Span.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH5Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedH6Span.kt +20 -0
- package/android/src/main/java/com/swmansion/enriched/{spans → common/spans}/EnrichedImageSpan.kt +68 -51
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedInlineCodeSpan.kt +24 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedItalicSpan.kt +12 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedLinkSpan.kt +26 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedMentionSpan.kt +35 -0
- package/android/src/main/java/com/swmansion/enriched/{spans → common/spans}/EnrichedOrderedListSpan.kt +21 -29
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedStrikeThroughSpan.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/EnrichedUnderlineSpan.kt +11 -0
- package/android/src/main/java/com/swmansion/enriched/{spans → common/spans}/EnrichedUnorderedListSpan.kt +13 -17
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedBlockSpan.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedHeadingSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedInlineSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedParagraphSpan.kt +5 -0
- package/android/src/main/java/com/swmansion/enriched/common/spans/interfaces/EnrichedSpan.kt +3 -0
- package/android/src/main/java/com/swmansion/enriched/{spans → common/spans}/interfaces/EnrichedZeroWidthSpaceSpan.kt +2 -3
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputConnectionWrapper.kt +140 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputSpannableFactory.kt +83 -0
- package/android/src/main/java/com/swmansion/enriched/{EnrichedTextInputView.kt → textinput/EnrichedTextInputView.kt} +322 -157
- package/android/src/main/java/com/swmansion/enriched/{EnrichedTextInputViewLayoutManager.kt → textinput/EnrichedTextInputViewLayoutManager.kt} +4 -2
- package/android/src/main/java/com/swmansion/enriched/{EnrichedTextInputViewManager.kt → textinput/EnrichedTextInputViewManager.kt} +182 -66
- package/android/src/main/java/com/swmansion/enriched/{MeasurementStore.kt → textinput/MeasurementStore.kt} +75 -25
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/MentionHandler.kt +22 -12
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeHtmlEvent.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/OnChangeSelectionEvent.kt +11 -10
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeStateEvent.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnChangeTextEvent.kt +30 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputBlurEvent.kt +25 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputFocusEvent.kt +25 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnInputKeyPressEvent.kt +27 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnLinkDetectedEvent.kt +32 -0
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/OnMentionDetectedEvent.kt +11 -10
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/OnMentionEvent.kt +10 -9
- package/android/src/main/java/com/swmansion/enriched/textinput/events/OnPasteImagesEvent.kt +47 -0
- package/android/src/main/java/com/swmansion/enriched/{events → textinput/events}/OnRequestHtmlResultEvent.kt +2 -3
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputBlockQuoteSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputBoldSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputCheckboxListSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputCodeBlockSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH1Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH2Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH3Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH4Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH5Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputH6Span.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputImageSpan.kt +36 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputInlineCodeSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputItalicSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputLinkSpan.kt +15 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputMentionSpan.kt +18 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputOrderedListSpan.kt +21 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputStrikeThroughSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputUnderlineSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedInputUnorderedListSpan.kt +14 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/EnrichedSpans.kt +241 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/spans/interfaces/EnrichedInputSpan.kt +10 -0
- package/android/src/main/java/com/swmansion/enriched/{styles → textinput/styles}/HtmlStyle.kt +129 -57
- package/android/src/main/java/com/swmansion/enriched/{styles → textinput/styles}/InlineStyles.kt +30 -13
- package/android/src/main/java/com/swmansion/enriched/textinput/styles/ListStyles.kt +263 -0
- package/android/src/main/java/com/swmansion/enriched/{styles → textinput/styles}/ParagraphStyles.kt +94 -34
- package/android/src/main/java/com/swmansion/enriched/{styles → textinput/styles}/ParametrizedStyles.kt +143 -67
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedEditableFactory.kt +17 -0
- package/android/src/main/java/com/swmansion/enriched/{utils → textinput/utils}/EnrichedSelection.kt +84 -54
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpanState.kt +304 -0
- package/android/src/main/java/com/swmansion/enriched/{utils/Utils.kt → textinput/utils/EnrichedSpannable.kt} +22 -31
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/EnrichedSpannableStringBuilder.kt +16 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/RichContentReceiver.kt +127 -0
- package/android/src/main/java/com/swmansion/enriched/textinput/utils/Utils.kt +106 -0
- package/android/src/main/java/com/swmansion/enriched/{watchers → textinput/watchers}/EnrichedSpanWatcher.kt +56 -24
- package/android/src/main/java/com/swmansion/enriched/{watchers → textinput/watchers}/EnrichedTextWatcher.kt +37 -14
- package/android/src/main/new_arch/CMakeLists.txt +7 -1
- package/android/src/main/new_arch/ReactNativeEnrichedSpec.cpp +11 -0
- package/android/src/main/new_arch/ReactNativeEnrichedSpec.h +15 -0
- package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputMeasurementManager.h +1 -1
- package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputShadowNode.h +2 -2
- package/android/src/main/new_arch/react/renderer/components/ReactNativeEnrichedSpec/conversions.h +46 -0
- package/ios/EnrichedTextInputView.h +2 -1
- package/ios/EnrichedTextInputView.mm +603 -60
- package/ios/config/InputConfig.h +28 -0
- package/ios/config/InputConfig.mm +237 -8
- package/ios/extensions/ImageExtension.h +35 -0
- package/ios/extensions/ImageExtension.mm +156 -0
- package/ios/{utils → extensions}/LayoutManagerExtension.mm +115 -95
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ComponentDescriptors.cpp +1 -1
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ComponentDescriptors.h +1 -1
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.cpp +276 -0
- package/ios/generated/ReactNativeEnrichedSpec/EventEmitters.h +239 -0
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/Props.cpp +10 -0
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/Props.h +251 -0
- package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/RCTComponentViewHelpers.h +95 -0
- package/ios/inputParser/InputParser.mm +218 -18
- package/ios/inputTextView/InputTextView.mm +118 -0
- package/ios/{attachments → interfaces}/ImageAttachment.h +1 -0
- package/ios/interfaces/ImageAttachment.mm +46 -0
- package/ios/interfaces/LinkRegexConfig.h +19 -0
- package/ios/interfaces/LinkRegexConfig.mm +37 -0
- package/ios/{utils → interfaces}/MentionStyleProps.mm +2 -2
- package/ios/{utils → interfaces}/StyleHeaders.h +22 -1
- package/ios/{utils → interfaces}/StyleTypeEnum.h +4 -0
- package/ios/internals/EnrichedTextInputViewState.cpp +6 -6
- package/ios/styles/BlockQuoteStyle.mm +5 -5
- package/ios/styles/BoldStyle.mm +21 -6
- package/ios/styles/CheckboxListStyle.mm +321 -0
- package/ios/styles/CodeBlockStyle.mm +5 -5
- package/ios/styles/H1Style.mm +3 -0
- package/ios/styles/H2Style.mm +3 -0
- package/ios/styles/H3Style.mm +3 -0
- package/ios/styles/H4Style.mm +20 -0
- package/ios/styles/H5Style.mm +20 -0
- package/ios/styles/H6Style.mm +20 -0
- package/ios/styles/HeadingStyleBase.mm +161 -72
- package/ios/styles/ImageStyle.mm +5 -5
- package/ios/styles/InlineCodeStyle.mm +30 -19
- package/ios/styles/ItalicStyle.mm +5 -5
- package/ios/styles/LinkStyle.mm +98 -40
- package/ios/styles/MentionStyle.mm +4 -4
- package/ios/styles/OrderedListStyle.mm +5 -5
- package/ios/styles/StrikethroughStyle.mm +5 -5
- package/ios/styles/UnderlineStyle.mm +5 -5
- package/ios/styles/UnorderedListStyle.mm +5 -5
- package/ios/utils/CheckboxHitTestUtils.h +10 -0
- package/ios/utils/CheckboxHitTestUtils.mm +123 -0
- package/ios/utils/ParagraphAttributesUtils.h +4 -0
- package/ios/utils/ParagraphAttributesUtils.mm +142 -45
- package/ios/utils/ParagraphsUtils.mm +4 -4
- package/ios/utils/TextBlockTapGestureRecognizer.h +17 -0
- package/ios/utils/TextBlockTapGestureRecognizer.mm +56 -0
- package/ios/utils/ZeroWidthSpaceUtils.mm +14 -3
- package/lib/module/EnrichedTextInput.js +57 -11
- package/lib/module/EnrichedTextInput.js.map +1 -1
- package/lib/module/{EnrichedTextInputNativeComponent.ts → spec/EnrichedTextInputNativeComponent.ts} +175 -18
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/{normalizeHtmlStyle.js → utils/normalizeHtmlStyle.js} +18 -0
- package/lib/module/utils/normalizeHtmlStyle.js.map +1 -0
- package/lib/module/utils/nullthrows.js +9 -0
- package/lib/module/utils/nullthrows.js.map +1 -0
- package/lib/module/utils/regexParser.js +46 -0
- package/lib/module/utils/regexParser.js.map +1 -0
- package/lib/typescript/src/EnrichedTextInput.d.ts +20 -51
- package/lib/typescript/src/EnrichedTextInput.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/{EnrichedTextInputNativeComponent.d.ts → spec/EnrichedTextInputNativeComponent.d.ts} +154 -18
- package/lib/typescript/src/spec/EnrichedTextInputNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +58 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/utils/normalizeHtmlStyle.d.ts +4 -0
- package/lib/typescript/src/utils/normalizeHtmlStyle.d.ts.map +1 -0
- package/lib/typescript/src/utils/nullthrows.d.ts +2 -0
- package/lib/typescript/src/utils/nullthrows.d.ts.map +1 -0
- package/lib/typescript/src/utils/regexParser.d.ts +3 -0
- package/lib/typescript/src/utils/regexParser.d.ts.map +1 -0
- package/package.json +13 -9
- package/src/EnrichedTextInput.tsx +88 -63
- package/src/index.tsx +5 -1
- package/src/{EnrichedTextInputNativeComponent.ts → spec/EnrichedTextInputNativeComponent.ts} +175 -18
- package/src/types.ts +59 -0
- package/src/{normalizeHtmlStyle.ts → utils/normalizeHtmlStyle.ts} +20 -5
- package/src/utils/nullthrows.ts +7 -0
- package/src/utils/regexParser.ts +56 -0
- package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/EventEmitters.cpp +0 -128
- package/android/generated/jni/react/renderer/components/RNEnrichedTextInputViewSpec/EventEmitters.h +0 -102
- package/android/src/main/java/com/swmansion/enriched/events/OnChangeHtmlEvent.kt +0 -28
- package/android/src/main/java/com/swmansion/enriched/events/OnChangeStateEvent.kt +0 -24
- package/android/src/main/java/com/swmansion/enriched/events/OnChangeTextEvent.kt +0 -30
- package/android/src/main/java/com/swmansion/enriched/events/OnInputBlurEvent.kt +0 -27
- package/android/src/main/java/com/swmansion/enriched/events/OnInputFocusEvent.kt +0 -27
- package/android/src/main/java/com/swmansion/enriched/events/OnLinkDetectedEvent.kt +0 -30
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedBlockQuoteSpan.kt +0 -44
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedBoldSpan.kt +0 -16
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH1Span.kt +0 -23
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH2Span.kt +0 -23
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedH3Span.kt +0 -23
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedInlineCodeSpan.kt +0 -27
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedItalicSpan.kt +0 -15
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedLinkSpan.kt +0 -30
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedMentionSpan.kt +0 -42
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedSpans.kt +0 -136
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedStrikeThroughSpan.kt +0 -14
- package/android/src/main/java/com/swmansion/enriched/spans/EnrichedUnderlineSpan.kt +0 -14
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedBlockSpan.kt +0 -4
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedHeadingSpan.kt +0 -4
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedInlineSpan.kt +0 -4
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedParagraphSpan.kt +0 -4
- package/android/src/main/java/com/swmansion/enriched/spans/interfaces/EnrichedSpan.kt +0 -8
- package/android/src/main/java/com/swmansion/enriched/styles/ListStyles.kt +0 -172
- package/android/src/main/java/com/swmansion/enriched/utils/EnrichedSpanState.kt +0 -204
- package/android/src/main/new_arch/RNEnrichedTextInputViewSpec.cpp +0 -22
- package/android/src/main/new_arch/RNEnrichedTextInputViewSpec.h +0 -26
- package/android/src/main/new_arch/react/renderer/components/RNEnrichedTextInputViewSpec/conversions.h +0 -26
- package/ios/attachments/ImageAttachment.mm +0 -34
- package/ios/generated/RNEnrichedTextInputViewSpec/EventEmitters.cpp +0 -128
- package/ios/generated/RNEnrichedTextInputViewSpec/EventEmitters.h +0 -102
- package/lib/module/normalizeHtmlStyle.js.map +0 -1
- package/lib/typescript/src/EnrichedTextInputNativeComponent.d.ts.map +0 -1
- package/lib/typescript/src/normalizeHtmlStyle.d.ts +0 -4
- package/lib/typescript/src/normalizeHtmlStyle.d.ts.map +0 -1
- /package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ShadowNodes.cpp +0 -0
- /package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ShadowNodes.h +0 -0
- /package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/States.cpp +0 -0
- /package/android/generated/jni/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/States.h +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputComponentDescriptor.h +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputMeasurementManager.cpp +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputShadowNode.cpp +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputState.cpp +0 -0
- /package/android/src/main/new_arch/react/renderer/components/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/EnrichedTextInputState.h +0 -0
- /package/ios/{utils → extensions}/ColorExtension.h +0 -0
- /package/ios/{utils → extensions}/ColorExtension.mm +0 -0
- /package/ios/{utils → extensions}/FontExtension.h +0 -0
- /package/ios/{utils → extensions}/FontExtension.mm +0 -0
- /package/ios/{utils → extensions}/LayoutManagerExtension.h +0 -0
- /package/ios/{utils → extensions}/StringExtension.h +0 -0
- /package/ios/{utils → extensions}/StringExtension.mm +0 -0
- /package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ShadowNodes.cpp +0 -0
- /package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/ShadowNodes.h +0 -0
- /package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/States.cpp +0 -0
- /package/ios/generated/{RNEnrichedTextInputViewSpec → ReactNativeEnrichedSpec}/States.h +0 -0
- /package/ios/{utils → interfaces}/BaseStyleProtocol.h +0 -0
- /package/ios/{utils → interfaces}/ImageData.h +0 -0
- /package/ios/{utils → interfaces}/ImageData.mm +0 -0
- /package/ios/{utils → interfaces}/LinkData.h +0 -0
- /package/ios/{utils → interfaces}/LinkData.mm +0 -0
- /package/ios/{attachments → interfaces}/MediaAttachment.h +0 -0
- /package/ios/{attachments → interfaces}/MediaAttachment.mm +0 -0
- /package/ios/{utils → interfaces}/MentionParams.h +0 -0
- /package/ios/{utils → interfaces}/MentionParams.mm +0 -0
- /package/ios/{utils → interfaces}/MentionStyleProps.h +0 -0
- /package/ios/{utils → interfaces}/StylePair.h +0 -0
- /package/ios/{utils → interfaces}/StylePair.mm +0 -0
- /package/ios/{utils → interfaces}/TextDecorationLineEnum.h +0 -0
- /package/ios/{utils → interfaces}/TextDecorationLineEnum.mm +0 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
+
#include <folly/dynamic.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook::react {
|
|
16
|
+
class EnrichedTextInputViewEventEmitter : public ViewEventEmitter {
|
|
17
|
+
public:
|
|
18
|
+
using ViewEventEmitter::ViewEventEmitter;
|
|
19
|
+
|
|
20
|
+
struct OnInputFocus {
|
|
21
|
+
int target;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
struct OnInputBlur {
|
|
25
|
+
int target;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
struct OnChangeText {
|
|
29
|
+
std::string value;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
struct OnChangeHtml {
|
|
33
|
+
std::string value;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
struct OnChangeStateBold {
|
|
37
|
+
bool isActive;
|
|
38
|
+
bool isConflicting;
|
|
39
|
+
bool isBlocking;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
struct OnChangeStateItalic {
|
|
43
|
+
bool isActive;
|
|
44
|
+
bool isConflicting;
|
|
45
|
+
bool isBlocking;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
struct OnChangeStateUnderline {
|
|
49
|
+
bool isActive;
|
|
50
|
+
bool isConflicting;
|
|
51
|
+
bool isBlocking;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
struct OnChangeStateStrikeThrough {
|
|
55
|
+
bool isActive;
|
|
56
|
+
bool isConflicting;
|
|
57
|
+
bool isBlocking;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
struct OnChangeStateInlineCode {
|
|
61
|
+
bool isActive;
|
|
62
|
+
bool isConflicting;
|
|
63
|
+
bool isBlocking;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
struct OnChangeStateH1 {
|
|
67
|
+
bool isActive;
|
|
68
|
+
bool isConflicting;
|
|
69
|
+
bool isBlocking;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
struct OnChangeStateH2 {
|
|
73
|
+
bool isActive;
|
|
74
|
+
bool isConflicting;
|
|
75
|
+
bool isBlocking;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
struct OnChangeStateH3 {
|
|
79
|
+
bool isActive;
|
|
80
|
+
bool isConflicting;
|
|
81
|
+
bool isBlocking;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
struct OnChangeStateH4 {
|
|
85
|
+
bool isActive;
|
|
86
|
+
bool isConflicting;
|
|
87
|
+
bool isBlocking;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
struct OnChangeStateH5 {
|
|
91
|
+
bool isActive;
|
|
92
|
+
bool isConflicting;
|
|
93
|
+
bool isBlocking;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
struct OnChangeStateH6 {
|
|
97
|
+
bool isActive;
|
|
98
|
+
bool isConflicting;
|
|
99
|
+
bool isBlocking;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
struct OnChangeStateCodeBlock {
|
|
103
|
+
bool isActive;
|
|
104
|
+
bool isConflicting;
|
|
105
|
+
bool isBlocking;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
struct OnChangeStateBlockQuote {
|
|
109
|
+
bool isActive;
|
|
110
|
+
bool isConflicting;
|
|
111
|
+
bool isBlocking;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
struct OnChangeStateOrderedList {
|
|
115
|
+
bool isActive;
|
|
116
|
+
bool isConflicting;
|
|
117
|
+
bool isBlocking;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
struct OnChangeStateUnorderedList {
|
|
121
|
+
bool isActive;
|
|
122
|
+
bool isConflicting;
|
|
123
|
+
bool isBlocking;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
struct OnChangeStateLink {
|
|
127
|
+
bool isActive;
|
|
128
|
+
bool isConflicting;
|
|
129
|
+
bool isBlocking;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
struct OnChangeStateImage {
|
|
133
|
+
bool isActive;
|
|
134
|
+
bool isConflicting;
|
|
135
|
+
bool isBlocking;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
struct OnChangeStateMention {
|
|
139
|
+
bool isActive;
|
|
140
|
+
bool isConflicting;
|
|
141
|
+
bool isBlocking;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
struct OnChangeStateCheckboxList {
|
|
145
|
+
bool isActive;
|
|
146
|
+
bool isConflicting;
|
|
147
|
+
bool isBlocking;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
struct OnChangeState {
|
|
151
|
+
OnChangeStateBold bold;
|
|
152
|
+
OnChangeStateItalic italic;
|
|
153
|
+
OnChangeStateUnderline underline;
|
|
154
|
+
OnChangeStateStrikeThrough strikeThrough;
|
|
155
|
+
OnChangeStateInlineCode inlineCode;
|
|
156
|
+
OnChangeStateH1 h1;
|
|
157
|
+
OnChangeStateH2 h2;
|
|
158
|
+
OnChangeStateH3 h3;
|
|
159
|
+
OnChangeStateH4 h4;
|
|
160
|
+
OnChangeStateH5 h5;
|
|
161
|
+
OnChangeStateH6 h6;
|
|
162
|
+
OnChangeStateCodeBlock codeBlock;
|
|
163
|
+
OnChangeStateBlockQuote blockQuote;
|
|
164
|
+
OnChangeStateOrderedList orderedList;
|
|
165
|
+
OnChangeStateUnorderedList unorderedList;
|
|
166
|
+
OnChangeStateLink link;
|
|
167
|
+
OnChangeStateImage image;
|
|
168
|
+
OnChangeStateMention mention;
|
|
169
|
+
OnChangeStateCheckboxList checkboxList;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
struct OnLinkDetected {
|
|
173
|
+
std::string text;
|
|
174
|
+
std::string url;
|
|
175
|
+
int start;
|
|
176
|
+
int end;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
struct OnMentionDetected {
|
|
180
|
+
std::string text;
|
|
181
|
+
std::string indicator;
|
|
182
|
+
std::string payload;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
struct OnMention {
|
|
186
|
+
std::string indicator;
|
|
187
|
+
folly::dynamic text;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
struct OnChangeSelection {
|
|
191
|
+
int start;
|
|
192
|
+
int end;
|
|
193
|
+
std::string text;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
struct OnRequestHtmlResult {
|
|
197
|
+
int requestId;
|
|
198
|
+
folly::dynamic html;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
struct OnInputKeyPress {
|
|
202
|
+
std::string key;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
struct OnPasteImagesImages {
|
|
206
|
+
std::string uri;
|
|
207
|
+
std::string type;
|
|
208
|
+
Float width;
|
|
209
|
+
Float height;
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
struct OnPasteImages {
|
|
213
|
+
std::vector<OnPasteImagesImages> images;
|
|
214
|
+
};
|
|
215
|
+
void onInputFocus(OnInputFocus value) const;
|
|
216
|
+
|
|
217
|
+
void onInputBlur(OnInputBlur value) const;
|
|
218
|
+
|
|
219
|
+
void onChangeText(OnChangeText value) const;
|
|
220
|
+
|
|
221
|
+
void onChangeHtml(OnChangeHtml value) const;
|
|
222
|
+
|
|
223
|
+
void onChangeState(OnChangeState value) const;
|
|
224
|
+
|
|
225
|
+
void onLinkDetected(OnLinkDetected value) const;
|
|
226
|
+
|
|
227
|
+
void onMentionDetected(OnMentionDetected value) const;
|
|
228
|
+
|
|
229
|
+
void onMention(OnMention value) const;
|
|
230
|
+
|
|
231
|
+
void onChangeSelection(OnChangeSelection value) const;
|
|
232
|
+
|
|
233
|
+
void onRequestHtmlResult(OnRequestHtmlResult value) const;
|
|
234
|
+
|
|
235
|
+
void onInputKeyPress(OnInputKeyPress value) const;
|
|
236
|
+
|
|
237
|
+
void onPasteImages(OnPasteImages value) const;
|
|
238
|
+
};
|
|
239
|
+
} // namespace facebook::react
|
|
@@ -31,12 +31,14 @@ EnrichedTextInputViewProps::EnrichedTextInputViewProps(
|
|
|
31
31
|
autoCapitalize(convertRawProp(context, rawProps, "autoCapitalize", sourceProps.autoCapitalize, {})),
|
|
32
32
|
htmlStyle(convertRawProp(context, rawProps, "htmlStyle", sourceProps.htmlStyle, {})),
|
|
33
33
|
scrollEnabled(convertRawProp(context, rawProps, "scrollEnabled", sourceProps.scrollEnabled, {false})),
|
|
34
|
+
linkRegex(convertRawProp(context, rawProps, "linkRegex", sourceProps.linkRegex, {})),
|
|
34
35
|
color(convertRawProp(context, rawProps, "color", sourceProps.color, {})),
|
|
35
36
|
fontSize(convertRawProp(context, rawProps, "fontSize", sourceProps.fontSize, {0.0})),
|
|
36
37
|
fontFamily(convertRawProp(context, rawProps, "fontFamily", sourceProps.fontFamily, {})),
|
|
37
38
|
fontWeight(convertRawProp(context, rawProps, "fontWeight", sourceProps.fontWeight, {})),
|
|
38
39
|
fontStyle(convertRawProp(context, rawProps, "fontStyle", sourceProps.fontStyle, {})),
|
|
39
40
|
isOnChangeHtmlSet(convertRawProp(context, rawProps, "isOnChangeHtmlSet", sourceProps.isOnChangeHtmlSet, {false})),
|
|
41
|
+
isOnChangeTextSet(convertRawProp(context, rawProps, "isOnChangeTextSet", sourceProps.isOnChangeTextSet, {false})),
|
|
40
42
|
androidExperimentalSynchronousEvents(convertRawProp(context, rawProps, "androidExperimentalSynchronousEvents", sourceProps.androidExperimentalSynchronousEvents, {false})) {}
|
|
41
43
|
|
|
42
44
|
#ifdef RN_SERIALIZABLE_STATE
|
|
@@ -99,6 +101,10 @@ folly::dynamic EnrichedTextInputViewProps::getDiffProps(
|
|
|
99
101
|
result["scrollEnabled"] = scrollEnabled;
|
|
100
102
|
}
|
|
101
103
|
|
|
104
|
+
if (linkRegex != oldProps->linkRegex) {
|
|
105
|
+
result["linkRegex"] = toDynamic(linkRegex);
|
|
106
|
+
}
|
|
107
|
+
|
|
102
108
|
if (color != oldProps->color) {
|
|
103
109
|
result["color"] = *color;
|
|
104
110
|
}
|
|
@@ -123,6 +129,10 @@ folly::dynamic EnrichedTextInputViewProps::getDiffProps(
|
|
|
123
129
|
result["isOnChangeHtmlSet"] = isOnChangeHtmlSet;
|
|
124
130
|
}
|
|
125
131
|
|
|
132
|
+
if (isOnChangeTextSet != oldProps->isOnChangeTextSet) {
|
|
133
|
+
result["isOnChangeTextSet"] = isOnChangeTextSet;
|
|
134
|
+
}
|
|
135
|
+
|
|
126
136
|
if (androidExperimentalSynchronousEvents != oldProps->androidExperimentalSynchronousEvents) {
|
|
127
137
|
result["androidExperimentalSynchronousEvents"] = androidExperimentalSynchronousEvents;
|
|
128
138
|
}
|
|
@@ -135,6 +135,123 @@ static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH3Str
|
|
|
135
135
|
}
|
|
136
136
|
#endif
|
|
137
137
|
|
|
138
|
+
struct EnrichedTextInputViewHtmlStyleH4Struct {
|
|
139
|
+
Float fontSize{0.0};
|
|
140
|
+
bool bold{false};
|
|
141
|
+
|
|
142
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
143
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH4Struct&) const = default;
|
|
144
|
+
|
|
145
|
+
folly::dynamic toDynamic() const {
|
|
146
|
+
folly::dynamic result = folly::dynamic::object();
|
|
147
|
+
result["fontSize"] = fontSize;
|
|
148
|
+
result["bold"] = bold;
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
#endif
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH4Struct &result) {
|
|
155
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
156
|
+
|
|
157
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
158
|
+
if (tmp_fontSize != map.end()) {
|
|
159
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
160
|
+
}
|
|
161
|
+
auto tmp_bold = map.find("bold");
|
|
162
|
+
if (tmp_bold != map.end()) {
|
|
163
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH4Struct &value) {
|
|
168
|
+
return "[Object EnrichedTextInputViewHtmlStyleH4Struct]";
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
172
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH4Struct &value) {
|
|
173
|
+
return value.toDynamic();
|
|
174
|
+
}
|
|
175
|
+
#endif
|
|
176
|
+
|
|
177
|
+
struct EnrichedTextInputViewHtmlStyleH5Struct {
|
|
178
|
+
Float fontSize{0.0};
|
|
179
|
+
bool bold{false};
|
|
180
|
+
|
|
181
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
182
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH5Struct&) const = default;
|
|
183
|
+
|
|
184
|
+
folly::dynamic toDynamic() const {
|
|
185
|
+
folly::dynamic result = folly::dynamic::object();
|
|
186
|
+
result["fontSize"] = fontSize;
|
|
187
|
+
result["bold"] = bold;
|
|
188
|
+
return result;
|
|
189
|
+
}
|
|
190
|
+
#endif
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH5Struct &result) {
|
|
194
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
195
|
+
|
|
196
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
197
|
+
if (tmp_fontSize != map.end()) {
|
|
198
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
199
|
+
}
|
|
200
|
+
auto tmp_bold = map.find("bold");
|
|
201
|
+
if (tmp_bold != map.end()) {
|
|
202
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH5Struct &value) {
|
|
207
|
+
return "[Object EnrichedTextInputViewHtmlStyleH5Struct]";
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
211
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH5Struct &value) {
|
|
212
|
+
return value.toDynamic();
|
|
213
|
+
}
|
|
214
|
+
#endif
|
|
215
|
+
|
|
216
|
+
struct EnrichedTextInputViewHtmlStyleH6Struct {
|
|
217
|
+
Float fontSize{0.0};
|
|
218
|
+
bool bold{false};
|
|
219
|
+
|
|
220
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
221
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleH6Struct&) const = default;
|
|
222
|
+
|
|
223
|
+
folly::dynamic toDynamic() const {
|
|
224
|
+
folly::dynamic result = folly::dynamic::object();
|
|
225
|
+
result["fontSize"] = fontSize;
|
|
226
|
+
result["bold"] = bold;
|
|
227
|
+
return result;
|
|
228
|
+
}
|
|
229
|
+
#endif
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleH6Struct &result) {
|
|
233
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
234
|
+
|
|
235
|
+
auto tmp_fontSize = map.find("fontSize");
|
|
236
|
+
if (tmp_fontSize != map.end()) {
|
|
237
|
+
fromRawValue(context, tmp_fontSize->second, result.fontSize);
|
|
238
|
+
}
|
|
239
|
+
auto tmp_bold = map.find("bold");
|
|
240
|
+
if (tmp_bold != map.end()) {
|
|
241
|
+
fromRawValue(context, tmp_bold->second, result.bold);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleH6Struct &value) {
|
|
246
|
+
return "[Object EnrichedTextInputViewHtmlStyleH6Struct]";
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
250
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleH6Struct &value) {
|
|
251
|
+
return value.toDynamic();
|
|
252
|
+
}
|
|
253
|
+
#endif
|
|
254
|
+
|
|
138
255
|
struct EnrichedTextInputViewHtmlStyleBlockquoteStruct {
|
|
139
256
|
SharedColor borderColor{};
|
|
140
257
|
Float borderWidth{0.0};
|
|
@@ -411,10 +528,64 @@ static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleUlStr
|
|
|
411
528
|
}
|
|
412
529
|
#endif
|
|
413
530
|
|
|
531
|
+
struct EnrichedTextInputViewHtmlStyleUlCheckboxStruct {
|
|
532
|
+
Float gapWidth{0.0};
|
|
533
|
+
Float boxSize{0.0};
|
|
534
|
+
Float marginLeft{0.0};
|
|
535
|
+
SharedColor boxColor{};
|
|
536
|
+
|
|
537
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
538
|
+
bool operator==(const EnrichedTextInputViewHtmlStyleUlCheckboxStruct&) const = default;
|
|
539
|
+
|
|
540
|
+
folly::dynamic toDynamic() const {
|
|
541
|
+
folly::dynamic result = folly::dynamic::object();
|
|
542
|
+
result["gapWidth"] = gapWidth;
|
|
543
|
+
result["boxSize"] = boxSize;
|
|
544
|
+
result["marginLeft"] = marginLeft;
|
|
545
|
+
result["boxColor"] = ::facebook::react::toDynamic(boxColor);
|
|
546
|
+
return result;
|
|
547
|
+
}
|
|
548
|
+
#endif
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewHtmlStyleUlCheckboxStruct &result) {
|
|
552
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
553
|
+
|
|
554
|
+
auto tmp_gapWidth = map.find("gapWidth");
|
|
555
|
+
if (tmp_gapWidth != map.end()) {
|
|
556
|
+
fromRawValue(context, tmp_gapWidth->second, result.gapWidth);
|
|
557
|
+
}
|
|
558
|
+
auto tmp_boxSize = map.find("boxSize");
|
|
559
|
+
if (tmp_boxSize != map.end()) {
|
|
560
|
+
fromRawValue(context, tmp_boxSize->second, result.boxSize);
|
|
561
|
+
}
|
|
562
|
+
auto tmp_marginLeft = map.find("marginLeft");
|
|
563
|
+
if (tmp_marginLeft != map.end()) {
|
|
564
|
+
fromRawValue(context, tmp_marginLeft->second, result.marginLeft);
|
|
565
|
+
}
|
|
566
|
+
auto tmp_boxColor = map.find("boxColor");
|
|
567
|
+
if (tmp_boxColor != map.end()) {
|
|
568
|
+
fromRawValue(context, tmp_boxColor->second, result.boxColor);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
static inline std::string toString(const EnrichedTextInputViewHtmlStyleUlCheckboxStruct &value) {
|
|
573
|
+
return "[Object EnrichedTextInputViewHtmlStyleUlCheckboxStruct]";
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
577
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleUlCheckboxStruct &value) {
|
|
578
|
+
return value.toDynamic();
|
|
579
|
+
}
|
|
580
|
+
#endif
|
|
581
|
+
|
|
414
582
|
struct EnrichedTextInputViewHtmlStyleStruct {
|
|
415
583
|
EnrichedTextInputViewHtmlStyleH1Struct h1{};
|
|
416
584
|
EnrichedTextInputViewHtmlStyleH2Struct h2{};
|
|
417
585
|
EnrichedTextInputViewHtmlStyleH3Struct h3{};
|
|
586
|
+
EnrichedTextInputViewHtmlStyleH4Struct h4{};
|
|
587
|
+
EnrichedTextInputViewHtmlStyleH5Struct h5{};
|
|
588
|
+
EnrichedTextInputViewHtmlStyleH6Struct h6{};
|
|
418
589
|
EnrichedTextInputViewHtmlStyleBlockquoteStruct blockquote{};
|
|
419
590
|
EnrichedTextInputViewHtmlStyleCodeblockStruct codeblock{};
|
|
420
591
|
EnrichedTextInputViewHtmlStyleCodeStruct code{};
|
|
@@ -422,6 +593,7 @@ struct EnrichedTextInputViewHtmlStyleStruct {
|
|
|
422
593
|
folly::dynamic mention{};
|
|
423
594
|
EnrichedTextInputViewHtmlStyleOlStruct ol{};
|
|
424
595
|
EnrichedTextInputViewHtmlStyleUlStruct ul{};
|
|
596
|
+
EnrichedTextInputViewHtmlStyleUlCheckboxStruct ulCheckbox{};
|
|
425
597
|
|
|
426
598
|
#ifdef RN_SERIALIZABLE_STATE
|
|
427
599
|
bool operator==(const EnrichedTextInputViewHtmlStyleStruct&) const = default;
|
|
@@ -431,6 +603,9 @@ struct EnrichedTextInputViewHtmlStyleStruct {
|
|
|
431
603
|
result["h1"] = ::facebook::react::toDynamic(h1);
|
|
432
604
|
result["h2"] = ::facebook::react::toDynamic(h2);
|
|
433
605
|
result["h3"] = ::facebook::react::toDynamic(h3);
|
|
606
|
+
result["h4"] = ::facebook::react::toDynamic(h4);
|
|
607
|
+
result["h5"] = ::facebook::react::toDynamic(h5);
|
|
608
|
+
result["h6"] = ::facebook::react::toDynamic(h6);
|
|
434
609
|
result["blockquote"] = ::facebook::react::toDynamic(blockquote);
|
|
435
610
|
result["codeblock"] = ::facebook::react::toDynamic(codeblock);
|
|
436
611
|
result["code"] = ::facebook::react::toDynamic(code);
|
|
@@ -438,6 +613,7 @@ struct EnrichedTextInputViewHtmlStyleStruct {
|
|
|
438
613
|
result["mention"] = mention;
|
|
439
614
|
result["ol"] = ::facebook::react::toDynamic(ol);
|
|
440
615
|
result["ul"] = ::facebook::react::toDynamic(ul);
|
|
616
|
+
result["ulCheckbox"] = ::facebook::react::toDynamic(ulCheckbox);
|
|
441
617
|
return result;
|
|
442
618
|
}
|
|
443
619
|
#endif
|
|
@@ -458,6 +634,18 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
458
634
|
if (tmp_h3 != map.end()) {
|
|
459
635
|
fromRawValue(context, tmp_h3->second, result.h3);
|
|
460
636
|
}
|
|
637
|
+
auto tmp_h4 = map.find("h4");
|
|
638
|
+
if (tmp_h4 != map.end()) {
|
|
639
|
+
fromRawValue(context, tmp_h4->second, result.h4);
|
|
640
|
+
}
|
|
641
|
+
auto tmp_h5 = map.find("h5");
|
|
642
|
+
if (tmp_h5 != map.end()) {
|
|
643
|
+
fromRawValue(context, tmp_h5->second, result.h5);
|
|
644
|
+
}
|
|
645
|
+
auto tmp_h6 = map.find("h6");
|
|
646
|
+
if (tmp_h6 != map.end()) {
|
|
647
|
+
fromRawValue(context, tmp_h6->second, result.h6);
|
|
648
|
+
}
|
|
461
649
|
auto tmp_blockquote = map.find("blockquote");
|
|
462
650
|
if (tmp_blockquote != map.end()) {
|
|
463
651
|
fromRawValue(context, tmp_blockquote->second, result.blockquote);
|
|
@@ -486,6 +674,10 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
486
674
|
if (tmp_ul != map.end()) {
|
|
487
675
|
fromRawValue(context, tmp_ul->second, result.ul);
|
|
488
676
|
}
|
|
677
|
+
auto tmp_ulCheckbox = map.find("ulCheckbox");
|
|
678
|
+
if (tmp_ulCheckbox != map.end()) {
|
|
679
|
+
fromRawValue(context, tmp_ulCheckbox->second, result.ulCheckbox);
|
|
680
|
+
}
|
|
489
681
|
}
|
|
490
682
|
|
|
491
683
|
static inline std::string toString(const EnrichedTextInputViewHtmlStyleStruct &value) {
|
|
@@ -497,6 +689,63 @@ static inline folly::dynamic toDynamic(const EnrichedTextInputViewHtmlStyleStruc
|
|
|
497
689
|
return value.toDynamic();
|
|
498
690
|
}
|
|
499
691
|
#endif
|
|
692
|
+
|
|
693
|
+
struct EnrichedTextInputViewLinkRegexStruct {
|
|
694
|
+
std::string pattern{};
|
|
695
|
+
bool caseInsensitive{false};
|
|
696
|
+
bool dotAll{false};
|
|
697
|
+
bool isDisabled{false};
|
|
698
|
+
bool isDefault{false};
|
|
699
|
+
|
|
700
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
701
|
+
bool operator==(const EnrichedTextInputViewLinkRegexStruct&) const = default;
|
|
702
|
+
|
|
703
|
+
folly::dynamic toDynamic() const {
|
|
704
|
+
folly::dynamic result = folly::dynamic::object();
|
|
705
|
+
result["pattern"] = pattern;
|
|
706
|
+
result["caseInsensitive"] = caseInsensitive;
|
|
707
|
+
result["dotAll"] = dotAll;
|
|
708
|
+
result["isDisabled"] = isDisabled;
|
|
709
|
+
result["isDefault"] = isDefault;
|
|
710
|
+
return result;
|
|
711
|
+
}
|
|
712
|
+
#endif
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnrichedTextInputViewLinkRegexStruct &result) {
|
|
716
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
717
|
+
|
|
718
|
+
auto tmp_pattern = map.find("pattern");
|
|
719
|
+
if (tmp_pattern != map.end()) {
|
|
720
|
+
fromRawValue(context, tmp_pattern->second, result.pattern);
|
|
721
|
+
}
|
|
722
|
+
auto tmp_caseInsensitive = map.find("caseInsensitive");
|
|
723
|
+
if (tmp_caseInsensitive != map.end()) {
|
|
724
|
+
fromRawValue(context, tmp_caseInsensitive->second, result.caseInsensitive);
|
|
725
|
+
}
|
|
726
|
+
auto tmp_dotAll = map.find("dotAll");
|
|
727
|
+
if (tmp_dotAll != map.end()) {
|
|
728
|
+
fromRawValue(context, tmp_dotAll->second, result.dotAll);
|
|
729
|
+
}
|
|
730
|
+
auto tmp_isDisabled = map.find("isDisabled");
|
|
731
|
+
if (tmp_isDisabled != map.end()) {
|
|
732
|
+
fromRawValue(context, tmp_isDisabled->second, result.isDisabled);
|
|
733
|
+
}
|
|
734
|
+
auto tmp_isDefault = map.find("isDefault");
|
|
735
|
+
if (tmp_isDefault != map.end()) {
|
|
736
|
+
fromRawValue(context, tmp_isDefault->second, result.isDefault);
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
static inline std::string toString(const EnrichedTextInputViewLinkRegexStruct &value) {
|
|
741
|
+
return "[Object EnrichedTextInputViewLinkRegexStruct]";
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
745
|
+
static inline folly::dynamic toDynamic(const EnrichedTextInputViewLinkRegexStruct &value) {
|
|
746
|
+
return value.toDynamic();
|
|
747
|
+
}
|
|
748
|
+
#endif
|
|
500
749
|
class EnrichedTextInputViewProps final : public ViewProps {
|
|
501
750
|
public:
|
|
502
751
|
EnrichedTextInputViewProps() = default;
|
|
@@ -515,12 +764,14 @@ class EnrichedTextInputViewProps final : public ViewProps {
|
|
|
515
764
|
std::string autoCapitalize{};
|
|
516
765
|
EnrichedTextInputViewHtmlStyleStruct htmlStyle{};
|
|
517
766
|
bool scrollEnabled{false};
|
|
767
|
+
EnrichedTextInputViewLinkRegexStruct linkRegex{};
|
|
518
768
|
SharedColor color{};
|
|
519
769
|
Float fontSize{0.0};
|
|
520
770
|
std::string fontFamily{};
|
|
521
771
|
std::string fontWeight{};
|
|
522
772
|
std::string fontStyle{};
|
|
523
773
|
bool isOnChangeHtmlSet{false};
|
|
774
|
+
bool isOnChangeTextSet{false};
|
|
524
775
|
bool androidExperimentalSynchronousEvents{false};
|
|
525
776
|
|
|
526
777
|
#ifdef RN_SERIALIZABLE_STATE
|