@react-typed-forms/schemas-rn 2.1.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/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;
|
|
@@ -590,6 +591,9 @@ function RNHtmlRenderer(_ref) {
|
|
|
590
591
|
style: style,
|
|
591
592
|
className: className,
|
|
592
593
|
children: jsx(RenderHtml, _extends({
|
|
594
|
+
defaultTextProps: {
|
|
595
|
+
selectable: !noSelection
|
|
596
|
+
},
|
|
593
597
|
contentWidth: contentWidth != null ? contentWidth : Dimensions.get("window").width,
|
|
594
598
|
source: source
|
|
595
599
|
}, props))
|
|
@@ -1151,12 +1155,13 @@ function DefaultDisplay({
|
|
|
1151
1155
|
});
|
|
1152
1156
|
case DisplayDataType.Text:
|
|
1153
1157
|
const text = display ? coerceToString(display.value) : data.text;
|
|
1154
|
-
return jsx(
|
|
1158
|
+
return jsx(RNDiv, {
|
|
1155
1159
|
style: style,
|
|
1156
1160
|
className: rendererClass(className, options.textClassName),
|
|
1157
1161
|
textClass: rendererClass(textClass, options.textTextClass),
|
|
1158
1162
|
text: text,
|
|
1159
|
-
inline: displayProps.inline
|
|
1163
|
+
inline: displayProps.inline,
|
|
1164
|
+
noSelection: displayProps.noSelection
|
|
1160
1165
|
});
|
|
1161
1166
|
case DisplayDataType.Html:
|
|
1162
1167
|
const {
|
|
@@ -1166,6 +1171,7 @@ function DefaultDisplay({
|
|
|
1166
1171
|
return jsx(RNHtmlRenderer, _extends({
|
|
1167
1172
|
style: style,
|
|
1168
1173
|
className: rendererClass(className, htmlClassName),
|
|
1174
|
+
noSelection: displayProps.noSelection,
|
|
1169
1175
|
html: display ? coerceToString(display.value) : data.html
|
|
1170
1176
|
}, props));
|
|
1171
1177
|
case DisplayDataType.Custom:
|
|
@@ -1348,6 +1354,7 @@ function DefaultDisplayOnly({
|
|
|
1348
1354
|
dataNode,
|
|
1349
1355
|
className,
|
|
1350
1356
|
emptyText,
|
|
1357
|
+
noSelection,
|
|
1351
1358
|
schemaInterface,
|
|
1352
1359
|
style,
|
|
1353
1360
|
renderer,
|
|
@@ -1362,15 +1369,13 @@ function DefaultDisplayOnly({
|
|
|
1362
1369
|
display
|
|
1363
1370
|
} = state.resolved;
|
|
1364
1371
|
const text = display != null ? display : (_ref = schemaInterface.isEmptyValue(dataNode.schema.field, dataNode.control.value) ? emptyText : schemaInterface.textValueForData(dataNode)) != null ? _ref : "";
|
|
1365
|
-
|
|
1366
|
-
Div
|
|
1367
|
-
} = renderer.html;
|
|
1368
|
-
return jsx(Div, {
|
|
1372
|
+
return jsx(RNDiv, {
|
|
1369
1373
|
style: style,
|
|
1370
1374
|
className: className,
|
|
1371
1375
|
textClass: textClass,
|
|
1372
1376
|
text: text,
|
|
1373
|
-
inline: inline
|
|
1377
|
+
inline: inline,
|
|
1378
|
+
noSelection: noSelection
|
|
1374
1379
|
});
|
|
1375
1380
|
} finally {
|
|
1376
1381
|
_effect();
|
|
@@ -2351,7 +2356,7 @@ function createButtonActionRenderer(actionId, options = {}) {
|
|
|
2351
2356
|
|
|
2352
2357
|
const _excluded = ["inline", "textClass", "children", "notWrapInText", "androidRippleColor", "nonTextContent", "onClick"],
|
|
2353
2358
|
_excluded2 = ["className", "html", "children", "textClass", "text", "style", "inline", "role"],
|
|
2354
|
-
_excluded3 = ["className", "html", "children", "textClass", "text", "style", "inline", "role"],
|
|
2359
|
+
_excluded3 = ["className", "html", "children", "textClass", "text", "style", "inline", "role", "noSelection"],
|
|
2355
2360
|
_excluded4 = ["id", "type", "onChangeValue", "onChangeChecked", "checked", "value"];
|
|
2356
2361
|
function createDefaultDataRenderer(options = {}) {
|
|
2357
2362
|
var _options$checkboxOpti, _options$checkboxOpti2, _options$radioOptions, _options$checkListOpt;
|
|
@@ -2410,7 +2415,8 @@ function createDefaultDataRenderer(options = {}) {
|
|
|
2410
2415
|
style: props.style,
|
|
2411
2416
|
inline: props.inline,
|
|
2412
2417
|
renderer: renderers,
|
|
2413
|
-
emptyText: isDisplayOnlyRenderer(renderOptions) && renderOptions.emptyText ? renderOptions.emptyText : defaultEmptyText
|
|
2418
|
+
emptyText: isDisplayOnlyRenderer(renderOptions) && renderOptions.emptyText ? renderOptions.emptyText : defaultEmptyText,
|
|
2419
|
+
noSelection: props.definition.noSelection
|
|
2414
2420
|
})
|
|
2415
2421
|
});
|
|
2416
2422
|
};
|
|
@@ -2695,18 +2701,21 @@ function RNDiv(_ref4) {
|
|
|
2695
2701
|
text,
|
|
2696
2702
|
style,
|
|
2697
2703
|
inline,
|
|
2698
|
-
role
|
|
2704
|
+
role,
|
|
2705
|
+
noSelection
|
|
2699
2706
|
} = _ref4,
|
|
2700
2707
|
props = _objectWithoutPropertiesLoose(_ref4, _excluded3);
|
|
2701
2708
|
if (html != null) {
|
|
2702
2709
|
return jsx(RNHtmlRenderer, _extends({}, props, {
|
|
2703
|
-
html: html
|
|
2710
|
+
html: html,
|
|
2711
|
+
noSelection: noSelection
|
|
2704
2712
|
}));
|
|
2705
2713
|
}
|
|
2706
2714
|
if (inline) {
|
|
2707
2715
|
return jsx(Text, {
|
|
2708
2716
|
style: style,
|
|
2709
2717
|
className: textClass,
|
|
2718
|
+
selectable: !noSelection,
|
|
2710
2719
|
children: text != null ? text : children
|
|
2711
2720
|
});
|
|
2712
2721
|
}
|
|
@@ -2718,6 +2727,7 @@ function RNDiv(_ref4) {
|
|
|
2718
2727
|
}, props, {
|
|
2719
2728
|
children: jsx(Text, {
|
|
2720
2729
|
className: textClass,
|
|
2730
|
+
selectable: !noSelection,
|
|
2721
2731
|
children: text
|
|
2722
2732
|
})
|
|
2723
2733
|
}));
|
|
@@ -2812,5 +2822,5 @@ function isNodeEmpty(node) {
|
|
|
2812
2822
|
return false;
|
|
2813
2823
|
}
|
|
2814
2824
|
|
|
2815
|
-
export { DefaultBoolOptions, Dialog, DialogClose, DialogContent, DialogPortal, DialogTitle, DialogTrigger, Icon, RNButton$1 as RNButton, RNCheckbox, RNDialog, RNHtmlRenderer, RNRadioItem, RNSelectRenderer, RNText, RNTextInput, ReactNativeHtmlComponents, TextClassContext, buttonTextVariants, buttonVariants, createButtonActionRenderer, createDefaultAdornmentRenderer, createDefaultDataRenderer, createDefaultLabelRenderer, createDefaultRenderers, createRNCheckboxRenderer, createRNDateTimePickerRenderer, createRNScrollListRenderer, createRNSelectRenderer, createRNTextInputRenderer, createSelectConversion, defaultRnTailwindTheme, defaultTailwindTheme };
|
|
2825
|
+
export { DefaultBoolOptions, Dialog, DialogClose, DialogContent, DialogPortal, DialogTitle, DialogTrigger, Icon, RNButton$1 as RNButton, RNCheckbox, RNDialog, RNDiv, RNHtmlRenderer, RNRadioItem, RNSelectRenderer, RNText, RNTextInput, ReactNativeHtmlComponents, TextClassContext, buttonTextVariants, buttonVariants, createButtonActionRenderer, createDefaultAdornmentRenderer, createDefaultDataRenderer, createDefaultLabelRenderer, createDefaultRenderers, createRNCheckboxRenderer, createRNDateTimePickerRenderer, createRNScrollListRenderer, createRNSelectRenderer, createRNTextInputRenderer, createSelectConversion, defaultRnTailwindTheme, defaultTailwindTheme };
|
|
2816
2826
|
//# sourceMappingURL=index.js.map
|