@react-typed-forms/schemas-rn 2.2.0 → 2.2.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.
- package/lib/components/RNHtmlRenderer.d.ts +2 -1
- package/lib/index.cjs +10 -6
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +11 -7
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -571,7 +571,7 @@ function RNDateTimePicker(_ref) {
|
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
573
|
|
|
574
|
-
const _excluded$8 = ["className", "html", "style", "contentWidth"];
|
|
574
|
+
const _excluded$8 = ["className", "html", "style", "contentWidth", "noSelection"];
|
|
575
575
|
function RNHtmlRenderer(_ref) {
|
|
576
576
|
var _effect = useComponentTracking();
|
|
577
577
|
try {
|
|
@@ -579,7 +579,8 @@ function RNHtmlRenderer(_ref) {
|
|
|
579
579
|
className,
|
|
580
580
|
html,
|
|
581
581
|
style,
|
|
582
|
-
contentWidth
|
|
582
|
+
contentWidth,
|
|
583
|
+
noSelection
|
|
583
584
|
} = _ref,
|
|
584
585
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
585
586
|
if (!html) return;
|
|
@@ -591,7 +592,7 @@ function RNHtmlRenderer(_ref) {
|
|
|
591
592
|
className: className,
|
|
592
593
|
children: jsx(RenderHtml, _extends({
|
|
593
594
|
defaultTextProps: {
|
|
594
|
-
selectable:
|
|
595
|
+
selectable: !noSelection
|
|
595
596
|
},
|
|
596
597
|
contentWidth: contentWidth != null ? contentWidth : Dimensions.get("window").width,
|
|
597
598
|
source: source
|
|
@@ -1154,12 +1155,13 @@ function DefaultDisplay({
|
|
|
1154
1155
|
});
|
|
1155
1156
|
case DisplayDataType.Text:
|
|
1156
1157
|
const text = display ? coerceToString(display.value) : data.text;
|
|
1157
|
-
return jsx(
|
|
1158
|
+
return jsx(RNDiv, {
|
|
1158
1159
|
style: style,
|
|
1159
1160
|
className: rendererClass(className, options.textClassName),
|
|
1160
1161
|
textClass: rendererClass(textClass, options.textTextClass),
|
|
1161
1162
|
text: text,
|
|
1162
|
-
inline: displayProps.inline
|
|
1163
|
+
inline: displayProps.inline,
|
|
1164
|
+
noSelection: displayProps.noSelection
|
|
1163
1165
|
});
|
|
1164
1166
|
case DisplayDataType.Html:
|
|
1165
1167
|
const {
|
|
@@ -1169,6 +1171,7 @@ function DefaultDisplay({
|
|
|
1169
1171
|
return jsx(RNHtmlRenderer, _extends({
|
|
1170
1172
|
style: style,
|
|
1171
1173
|
className: rendererClass(className, htmlClassName),
|
|
1174
|
+
noSelection: displayProps.noSelection,
|
|
1172
1175
|
html: display ? coerceToString(display.value) : data.html
|
|
1173
1176
|
}, props));
|
|
1174
1177
|
case DisplayDataType.Custom:
|
|
@@ -2413,7 +2416,7 @@ function createDefaultDataRenderer(options = {}) {
|
|
|
2413
2416
|
inline: props.inline,
|
|
2414
2417
|
renderer: renderers,
|
|
2415
2418
|
emptyText: isDisplayOnlyRenderer(renderOptions) && renderOptions.emptyText ? renderOptions.emptyText : defaultEmptyText,
|
|
2416
|
-
noSelection:
|
|
2419
|
+
noSelection: props.definition.noSelection
|
|
2417
2420
|
})
|
|
2418
2421
|
});
|
|
2419
2422
|
};
|
|
@@ -2704,7 +2707,8 @@ function RNDiv(_ref4) {
|
|
|
2704
2707
|
props = _objectWithoutPropertiesLoose(_ref4, _excluded3);
|
|
2705
2708
|
if (html != null) {
|
|
2706
2709
|
return jsx(RNHtmlRenderer, _extends({}, props, {
|
|
2707
|
-
html: html
|
|
2710
|
+
html: html,
|
|
2711
|
+
noSelection: noSelection
|
|
2708
2712
|
}));
|
|
2709
2713
|
}
|
|
2710
2714
|
if (inline) {
|