@draftbit/core 46.6.9-b29a3c.2 → 46.7.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/commonjs/components/Carousel.js +2 -1
- package/lib/commonjs/components/Config.js +3 -3
- package/lib/commonjs/components/DatePicker/DatePicker.js +3 -3
- package/lib/commonjs/components/Picker/Picker.js +3 -3
- package/lib/commonjs/components/Picker/PickerComponent.android.js +2 -2
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +2 -2
- package/lib/commonjs/components/Picker/PickerComponent.web.js +2 -2
- package/lib/commonjs/components/RadioButton/RadioButton.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/commonjs/components/StepIndicator.js +1 -1
- package/lib/commonjs/components/Stepper.js +1 -2
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/hooks.js +2 -1
- package/lib/commonjs/mappings/DatePicker.js +1 -1
- package/lib/commonjs/mappings/FlashList.js +9 -3
- package/lib/commonjs/mappings/FlatList.js +3 -2
- package/lib/commonjs/mappings/TextField.js +2 -2
- package/lib/commonjs/utilities.js +1 -1
- package/lib/module/components/Accordion/AccordionItem.js +25 -4
- package/lib/module/components/Carousel.js +2 -1
- package/lib/module/components/Config.js +3 -3
- package/lib/module/components/DatePicker/DatePicker.js +3 -3
- package/lib/module/components/Picker/Picker.js +3 -3
- package/lib/module/components/Picker/PickerComponent.android.js +2 -2
- package/lib/module/components/Picker/PickerComponent.ios.js +2 -2
- package/lib/module/components/Picker/PickerComponent.web.js +2 -2
- package/lib/module/components/RadioButton/RadioButton.js +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/module/components/StepIndicator.js +1 -1
- package/lib/module/components/Stepper.js +1 -4
- package/lib/module/mappings/DatePicker.js +1 -1
- package/lib/module/mappings/FlashList.js +9 -3
- package/lib/module/mappings/FlatList.js +3 -2
- package/lib/module/mappings/TextField.js +2 -2
- package/lib/module/utilities.js +1 -1
- package/lib/typescript/src/mappings/DatePicker.d.ts +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +15 -4
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +3 -2
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/mappings/DatePicker.js +1 -1
- package/src/mappings/DatePicker.ts +1 -1
- package/src/mappings/FlashList.js +9 -3
- package/src/mappings/FlashList.ts +9 -4
- package/src/mappings/FlatList.js +3 -2
- package/src/mappings/FlatList.ts +3 -2
- package/src/mappings/TextField.js +2 -2
- package/src/mappings/TextField.ts +2 -2
|
@@ -39,6 +39,7 @@ function Pager(_ref) {
|
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
41
|
function Carousel(_ref2) {
|
|
42
|
+
var _data$length;
|
|
42
43
|
let {
|
|
43
44
|
data,
|
|
44
45
|
children,
|
|
@@ -48,7 +49,7 @@ function Carousel(_ref2) {
|
|
|
48
49
|
} = _ref2;
|
|
49
50
|
const [index, setIndex] = React.useState(0);
|
|
50
51
|
const length = React.Children.count(children);
|
|
51
|
-
const itemsLength = ((data === null || data === void 0 ? void 0 : data.length)
|
|
52
|
+
const itemsLength = ((_data$length = data === null || data === void 0 ? void 0 : data.length) !== null && _data$length !== void 0 ? _data$length : 0) + length;
|
|
52
53
|
const slides = Array.isArray(data) ? data : [];
|
|
53
54
|
const {
|
|
54
55
|
width,
|
|
@@ -25,13 +25,13 @@ const getFilters = options => {
|
|
|
25
25
|
height
|
|
26
26
|
} = options;
|
|
27
27
|
const filters = ["c_scale", "q_auto", "dpr_auto"];
|
|
28
|
-
if (width) filters.push(
|
|
29
|
-
if (height) filters.push(
|
|
28
|
+
if (width) filters.push("w_".concat(width));
|
|
29
|
+
if (height) filters.push("h_".concat(height));
|
|
30
30
|
return filters.join(",");
|
|
31
31
|
};
|
|
32
32
|
const buildImageUrl = (options, name) => {
|
|
33
33
|
const filters = getFilters(options);
|
|
34
|
-
return ["https://res.cloudinary.com/altos/image/upload", filters,
|
|
34
|
+
return ["https://res.cloudinary.com/altos/image/upload", filters, "".concat(name, ".png")].join("/");
|
|
35
35
|
};
|
|
36
36
|
const getExtension = () => {
|
|
37
37
|
return _reactNative.Platform.OS === "web" ? ".svg" : ".png";
|
|
@@ -79,12 +79,12 @@ const DatePicker = _ref => {
|
|
|
79
79
|
let newDate = getValidDate();
|
|
80
80
|
if (format) return (0, _dateformat.default)(newDate, format);
|
|
81
81
|
if (mode === "time") {
|
|
82
|
-
return
|
|
82
|
+
return "".concat(newDate.toLocaleTimeString());
|
|
83
83
|
}
|
|
84
84
|
if (mode === "datetime") {
|
|
85
|
-
return
|
|
85
|
+
return "".concat(newDate.toLocaleString());
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return "".concat(MONTHS[newDate.getMonth()], " ").concat(newDate.getDate(), ", ").concat(newDate.getFullYear());
|
|
88
88
|
};
|
|
89
89
|
const toggleVisibility = async () => {
|
|
90
90
|
setPickerVisible(!pickerVisible);
|
|
@@ -46,7 +46,7 @@ const unstyledColor = "rgba(165, 173, 183, 1)";
|
|
|
46
46
|
const disabledColor = "rgb(240, 240, 240)";
|
|
47
47
|
const errorColor = "rgba(255, 69, 100, 1)";
|
|
48
48
|
const Picker = _ref => {
|
|
49
|
-
var _find;
|
|
49
|
+
var _find$label, _find;
|
|
50
50
|
let {
|
|
51
51
|
error,
|
|
52
52
|
options = [],
|
|
@@ -137,7 +137,7 @@ const Picker = _ref => {
|
|
|
137
137
|
...extractedMarginStyles
|
|
138
138
|
};
|
|
139
139
|
const stylesWithoutBordersAndMargins = (0, _lodash.omit)(viewStyles, [..._utilities.borderStyleNames, ..._utilities.marginStyleNames, ...additionalBorderStyles, ...additionalMarginStyles]);
|
|
140
|
-
const selectedLabel = internalValue && (((_find = pickerOptions.find(option => option.value === internalValue)) === null || _find === void 0 ? void 0 : _find.label)
|
|
140
|
+
const selectedLabel = internalValue && ((_find$label = (_find = pickerOptions.find(option => option.value === internalValue)) === null || _find === void 0 ? void 0 : _find.label) !== null && _find$label !== void 0 ? _find$label : internalValue);
|
|
141
141
|
const labelText = label ? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
142
142
|
style: {
|
|
143
143
|
textAlign: textStyles.textAlign,
|
|
@@ -220,7 +220,7 @@ const Picker = _ref => {
|
|
|
220
220
|
style: styles.primaryTextContainer
|
|
221
221
|
}, labelText, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
222
222
|
style: primaryTextStyle
|
|
223
|
-
}, String(selectedLabel
|
|
223
|
+
}, String(selectedLabel !== null && selectedLabel !== void 0 ? selectedLabel : placeholder))), rightIcon)), assistiveTextLabel), isIos && pickerVisible ? /*#__PURE__*/React.createElement(_Portal.default, null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
224
224
|
style: [styles.iosPicker, {
|
|
225
225
|
backgroundColor: colors.divider
|
|
226
226
|
}]
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
const Picker = _ref => {
|
|
20
|
-
var _options$find;
|
|
20
|
+
var _options$find$label, _options$find;
|
|
21
21
|
let {
|
|
22
22
|
style,
|
|
23
23
|
options,
|
|
@@ -71,7 +71,7 @@ const Picker = _ref => {
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
74
|
-
const selectedLabel = selectedValue && (((_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label)
|
|
74
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
75
75
|
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
76
76
|
disabled: disabled,
|
|
77
77
|
onPress: toggleFocus,
|
|
@@ -20,7 +20,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
22
22
|
const Picker = _ref => {
|
|
23
|
-
var _options$find;
|
|
23
|
+
var _options$find$label, _options$find;
|
|
24
24
|
let {
|
|
25
25
|
Icon,
|
|
26
26
|
style,
|
|
@@ -74,7 +74,7 @@ const Picker = _ref => {
|
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
77
|
-
const selectedLabel = selectedValue && (((_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label)
|
|
77
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
78
78
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
79
79
|
style: [styles.container, viewStyles]
|
|
80
80
|
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
const Picker = _ref => {
|
|
20
|
-
var _options$find;
|
|
20
|
+
var _options$find$label, _options$find;
|
|
21
21
|
let {
|
|
22
22
|
style,
|
|
23
23
|
options,
|
|
@@ -71,7 +71,7 @@ const Picker = _ref => {
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
74
|
-
const selectedLabel = selectedValue && (((_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label)
|
|
74
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
75
75
|
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
76
76
|
disabled: disabled,
|
|
77
77
|
onPress: toggleFocus,
|
|
@@ -34,7 +34,7 @@ const RadioButton = _ref => {
|
|
|
34
34
|
} = (0, _context.useRadioButtonGroupContext)();
|
|
35
35
|
const realValue = (0, _utilities.getValueForRadioButton)(value);
|
|
36
36
|
const realContextValue = (0, _utilities.getValueForRadioButton)(contextValue);
|
|
37
|
-
const isSelected = selected
|
|
37
|
+
const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue === realValue;
|
|
38
38
|
const handlePress = () => {
|
|
39
39
|
onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
|
|
40
40
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
@@ -63,7 +63,7 @@ const RadioButtonRow = _ref => {
|
|
|
63
63
|
} = (0, _context.useRadioButtonGroupContext)();
|
|
64
64
|
const realValue = (0, _utilities.getValueForRadioButton)(value);
|
|
65
65
|
const realContextValue = (0, _utilities.getValueForRadioButton)(contextValue);
|
|
66
|
-
const isSelected = selected
|
|
66
|
+
const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue === realValue;
|
|
67
67
|
const handlePress = () => {
|
|
68
68
|
onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
|
|
69
69
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
@@ -235,7 +235,7 @@ class StepIndicator extends _react.Component {
|
|
|
235
235
|
stepStatus: this.getStepStatus(position)
|
|
236
236
|
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
237
237
|
style: indicatorLabelStyle
|
|
238
|
-
},
|
|
238
|
+
}, "".concat(position + 1)));
|
|
239
239
|
});
|
|
240
240
|
_defineProperty(this, "getStepStatus", stepPosition => {
|
|
241
241
|
const {
|
|
@@ -33,7 +33,7 @@ const Stepper = _ref => {
|
|
|
33
33
|
viewStyles,
|
|
34
34
|
textStyles
|
|
35
35
|
} = (0, _utilities.extractStyles)(style);
|
|
36
|
-
const [value, setValue] = (0, _react.useState)(defaultValue
|
|
36
|
+
const [value, setValue] = (0, _react.useState)(defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0);
|
|
37
37
|
const isValidValue = valueArg => valueArg >= min && valueArg <= max;
|
|
38
38
|
const handlePlusOrMinus = type => {
|
|
39
39
|
const newValue = type === "plus" ? value + 1 : value - 1;
|
|
@@ -82,5 +82,4 @@ const Stepper = _ref => {
|
|
|
82
82
|
}));
|
|
83
83
|
};
|
|
84
84
|
var _default = (0, _theming.withTheme)(Stepper);
|
|
85
|
-
exports.default = _default;g.withTheme)(Stepper);
|
|
86
85
|
exports.default = _default;
|
|
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
12
12
|
android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
|
|
13
13
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
14
14
|
});
|
|
15
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
15
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
|
package/lib/commonjs/hooks.js
CHANGED
|
@@ -10,11 +10,12 @@ function usePrevious(value) {
|
|
|
10
10
|
// The ref object is a generic container whose current property is mutable
|
|
11
11
|
// and can hold any value, similar to an instance property on a class
|
|
12
12
|
const ref = _react.default.useRef();
|
|
13
|
+
|
|
13
14
|
// Store current value in ref
|
|
14
15
|
_react.default.useEffect(() => {
|
|
15
16
|
ref.current = value;
|
|
16
17
|
}, [value]);
|
|
18
|
+
|
|
17
19
|
// Return previous value (happens before update in useEffect above)
|
|
18
20
|
return ref.current;
|
|
19
|
-
}
|
|
20
21
|
}
|
|
@@ -156,7 +156,7 @@ const SEED_DATA = [{
|
|
|
156
156
|
category: _types.COMPONENT_TYPES.input,
|
|
157
157
|
layout: null,
|
|
158
158
|
triggers: [_types.Triggers.OnDateChange],
|
|
159
|
-
|
|
159
|
+
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
|
|
160
160
|
props: {
|
|
161
161
|
...SEED_DATA_PROPS,
|
|
162
162
|
type: {
|
|
@@ -30,9 +30,10 @@ const SEED_DATA = [{
|
|
|
30
30
|
step: 1,
|
|
31
31
|
precision: 0
|
|
32
32
|
}),
|
|
33
|
-
|
|
34
|
-
label: "
|
|
35
|
-
description: "
|
|
33
|
+
initialNumToRender: (0, _types.createStaticNumberProp)({
|
|
34
|
+
label: "Initial Num To Render",
|
|
35
|
+
description: "How many items to render in the initial batch",
|
|
36
|
+
defaultValue: null
|
|
36
37
|
}),
|
|
37
38
|
onEndReachedThreshold: (0, _types.createStaticNumberProp)({
|
|
38
39
|
label: "End Reached Threshold",
|
|
@@ -73,6 +74,11 @@ const SEED_DATA = [{
|
|
|
73
74
|
numColumns: (0, _types.createNumColumnsType)({
|
|
74
75
|
editable: true
|
|
75
76
|
}),
|
|
77
|
+
initialNumToRender: (0, _types.createStaticNumberProp)({
|
|
78
|
+
label: "Initial Num To Render",
|
|
79
|
+
description: "How many items to render in the initial batch",
|
|
80
|
+
defaultValue: null
|
|
81
|
+
}),
|
|
76
82
|
onEndReachedThreshold: (0, _types.createStaticNumberProp)({
|
|
77
83
|
label: "End Reached Threshold",
|
|
78
84
|
description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
@@ -29,9 +29,10 @@ const SEED_DATA = {
|
|
|
29
29
|
numColumns: (0, _types.createNumColumnsType)({
|
|
30
30
|
editable: true
|
|
31
31
|
}),
|
|
32
|
-
initialNumToRender: (0, _types.
|
|
32
|
+
initialNumToRender: (0, _types.createStaticNumberProp)({
|
|
33
33
|
label: "Initial Num To Render",
|
|
34
|
-
|
|
34
|
+
description: "How many items to render in the initial batch",
|
|
35
|
+
defaultValue: null
|
|
35
36
|
}),
|
|
36
37
|
onEndReachedThreshold: (0, _types.createStaticNumberProp)({
|
|
37
38
|
label: "End Reached Threshold",
|
|
@@ -283,7 +283,7 @@ const SEED_DATA = [{
|
|
|
283
283
|
...SEED_DATA_PROPS,
|
|
284
284
|
type: {
|
|
285
285
|
label: "Appearance",
|
|
286
|
-
description: "Type of
|
|
286
|
+
description: "Type of Field",
|
|
287
287
|
formType: _types.FORM_TYPES.flatArray,
|
|
288
288
|
propType: _types.PROP_TYPES.STRING,
|
|
289
289
|
defaultValue: "solid",
|
|
@@ -325,7 +325,7 @@ const SEED_DATA = [{
|
|
|
325
325
|
...SEED_DATA_PROPS,
|
|
326
326
|
type: {
|
|
327
327
|
label: "Appearance",
|
|
328
|
-
description: "Type of
|
|
328
|
+
description: "Type of Field",
|
|
329
329
|
formType: _types.FORM_TYPES.flatArray,
|
|
330
330
|
propType: _types.PROP_TYPES.STRING,
|
|
331
331
|
defaultValue: "solid",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { Pressable, StyleSheet, View } from "react-native";
|
|
4
3
|
import Text from "../Text";
|
|
@@ -18,9 +17,10 @@ const AccordionItem = _ref => {
|
|
|
18
17
|
textStyles,
|
|
19
18
|
viewStyles
|
|
20
19
|
} = extractStyles(style);
|
|
21
|
-
return /*#__PURE__*/React.createElement(Pressable,
|
|
22
|
-
style: [styles.container, viewStyles]
|
|
23
|
-
|
|
20
|
+
return /*#__PURE__*/React.createElement(Pressable, {
|
|
21
|
+
style: [styles.container, viewStyles],
|
|
22
|
+
...rest
|
|
23
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
24
24
|
style: styles.row
|
|
25
25
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
26
26
|
name: icon,
|
|
@@ -51,4 +51,25 @@ const styles = StyleSheet.create({
|
|
|
51
51
|
justifyContent: "center"
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
export default withTheme(AccordionItem);xtStyles
|
|
55
|
+
}, label))));
|
|
56
|
+
};
|
|
57
|
+
const styles = StyleSheet.create({
|
|
58
|
+
container: {
|
|
59
|
+
padding: 8
|
|
60
|
+
},
|
|
61
|
+
row: {
|
|
62
|
+
flexDirection: "row",
|
|
63
|
+
alignItems: "center",
|
|
64
|
+
paddingLeft: 8
|
|
65
|
+
},
|
|
66
|
+
item: {
|
|
67
|
+
marginVertical: 6,
|
|
68
|
+
paddingLeft: 8
|
|
69
|
+
},
|
|
70
|
+
content: {
|
|
71
|
+
flex: 1,
|
|
72
|
+
justifyContent: "center"
|
|
73
|
+
}
|
|
74
|
+
});
|
|
54
75
|
export default withTheme(AccordionItem);
|
|
@@ -30,6 +30,7 @@ function Pager(_ref) {
|
|
|
30
30
|
}));
|
|
31
31
|
}
|
|
32
32
|
function Carousel(_ref2) {
|
|
33
|
+
var _data$length;
|
|
33
34
|
let {
|
|
34
35
|
data,
|
|
35
36
|
children,
|
|
@@ -39,7 +40,7 @@ function Carousel(_ref2) {
|
|
|
39
40
|
} = _ref2;
|
|
40
41
|
const [index, setIndex] = React.useState(0);
|
|
41
42
|
const length = React.Children.count(children);
|
|
42
|
-
const itemsLength = ((data === null || data === void 0 ? void 0 : data.length)
|
|
43
|
+
const itemsLength = ((_data$length = data === null || data === void 0 ? void 0 : data.length) !== null && _data$length !== void 0 ? _data$length : 0) + length;
|
|
43
44
|
const slides = Array.isArray(data) ? data : [];
|
|
44
45
|
const {
|
|
45
46
|
width,
|
|
@@ -19,13 +19,13 @@ const getFilters = options => {
|
|
|
19
19
|
height
|
|
20
20
|
} = options;
|
|
21
21
|
const filters = ["c_scale", "q_auto", "dpr_auto"];
|
|
22
|
-
if (width) filters.push(
|
|
23
|
-
if (height) filters.push(
|
|
22
|
+
if (width) filters.push("w_".concat(width));
|
|
23
|
+
if (height) filters.push("h_".concat(height));
|
|
24
24
|
return filters.join(",");
|
|
25
25
|
};
|
|
26
26
|
const buildImageUrl = (options, name) => {
|
|
27
27
|
const filters = getFilters(options);
|
|
28
|
-
return ["https://res.cloudinary.com/altos/image/upload", filters,
|
|
28
|
+
return ["https://res.cloudinary.com/altos/image/upload", filters, "".concat(name, ".png")].join("/");
|
|
29
29
|
};
|
|
30
30
|
const getExtension = () => {
|
|
31
31
|
return Platform.OS === "web" ? ".svg" : ".png";
|
|
@@ -70,12 +70,12 @@ const DatePicker = _ref => {
|
|
|
70
70
|
let newDate = getValidDate();
|
|
71
71
|
if (format) return dateFormat(newDate, format);
|
|
72
72
|
if (mode === "time") {
|
|
73
|
-
return
|
|
73
|
+
return "".concat(newDate.toLocaleTimeString());
|
|
74
74
|
}
|
|
75
75
|
if (mode === "datetime") {
|
|
76
|
-
return
|
|
76
|
+
return "".concat(newDate.toLocaleString());
|
|
77
77
|
}
|
|
78
|
-
return
|
|
78
|
+
return "".concat(MONTHS[newDate.getMonth()], " ").concat(newDate.getDate(), ", ").concat(newDate.getFullYear());
|
|
79
79
|
};
|
|
80
80
|
const toggleVisibility = async () => {
|
|
81
81
|
setPickerVisible(!pickerVisible);
|
|
@@ -37,7 +37,7 @@ const unstyledColor = "rgba(165, 173, 183, 1)";
|
|
|
37
37
|
const disabledColor = "rgb(240, 240, 240)";
|
|
38
38
|
const errorColor = "rgba(255, 69, 100, 1)";
|
|
39
39
|
const Picker = _ref => {
|
|
40
|
-
var _find;
|
|
40
|
+
var _find$label, _find;
|
|
41
41
|
let {
|
|
42
42
|
error,
|
|
43
43
|
options = [],
|
|
@@ -128,7 +128,7 @@ const Picker = _ref => {
|
|
|
128
128
|
...extractedMarginStyles
|
|
129
129
|
};
|
|
130
130
|
const stylesWithoutBordersAndMargins = omit(viewStyles, [...borderStyleNames, ...marginStyleNames, ...additionalBorderStyles, ...additionalMarginStyles]);
|
|
131
|
-
const selectedLabel = internalValue && (((_find = pickerOptions.find(option => option.value === internalValue)) === null || _find === void 0 ? void 0 : _find.label)
|
|
131
|
+
const selectedLabel = internalValue && ((_find$label = (_find = pickerOptions.find(option => option.value === internalValue)) === null || _find === void 0 ? void 0 : _find.label) !== null && _find$label !== void 0 ? _find$label : internalValue);
|
|
132
132
|
const labelText = label ? /*#__PURE__*/React.createElement(Text, {
|
|
133
133
|
style: {
|
|
134
134
|
textAlign: textStyles.textAlign,
|
|
@@ -211,7 +211,7 @@ const Picker = _ref => {
|
|
|
211
211
|
style: styles.primaryTextContainer
|
|
212
212
|
}, labelText, /*#__PURE__*/React.createElement(Text, {
|
|
213
213
|
style: primaryTextStyle
|
|
214
|
-
}, String(selectedLabel
|
|
214
|
+
}, String(selectedLabel !== null && selectedLabel !== void 0 ? selectedLabel : placeholder))), rightIcon)), assistiveTextLabel), isIos && pickerVisible ? /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(View, {
|
|
215
215
|
style: [styles.iosPicker, {
|
|
216
216
|
backgroundColor: colors.divider
|
|
217
217
|
}]
|
|
@@ -8,7 +8,7 @@ import { extractStyles } from "../../utilities";
|
|
|
8
8
|
import TextField from "../TextField";
|
|
9
9
|
import Touchable from "../Touchable";
|
|
10
10
|
const Picker = _ref => {
|
|
11
|
-
var _options$find;
|
|
11
|
+
var _options$find$label, _options$find;
|
|
12
12
|
let {
|
|
13
13
|
style,
|
|
14
14
|
options,
|
|
@@ -62,7 +62,7 @@ const Picker = _ref => {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
65
|
-
const selectedLabel = selectedValue && (((_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label)
|
|
65
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
66
66
|
return /*#__PURE__*/React.createElement(Touchable, {
|
|
67
67
|
disabled: disabled,
|
|
68
68
|
onPress: toggleFocus,
|
|
@@ -11,7 +11,7 @@ import TextField from "../TextField";
|
|
|
11
11
|
import Touchable from "../Touchable";
|
|
12
12
|
import { extractStyles } from "../../utilities";
|
|
13
13
|
const Picker = _ref => {
|
|
14
|
-
var _options$find;
|
|
14
|
+
var _options$find$label, _options$find;
|
|
15
15
|
let {
|
|
16
16
|
Icon,
|
|
17
17
|
style,
|
|
@@ -65,7 +65,7 @@ const Picker = _ref => {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
68
|
-
const selectedLabel = selectedValue && (((_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label)
|
|
68
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
69
69
|
return /*#__PURE__*/React.createElement(View, {
|
|
70
70
|
style: [styles.container, viewStyles]
|
|
71
71
|
}, /*#__PURE__*/React.createElement(Touchable, {
|
|
@@ -8,7 +8,7 @@ import { extractStyles } from "../../utilities";
|
|
|
8
8
|
import TextField from "../TextField";
|
|
9
9
|
import Touchable from "../Touchable";
|
|
10
10
|
const Picker = _ref => {
|
|
11
|
-
var _options$find;
|
|
11
|
+
var _options$find$label, _options$find;
|
|
12
12
|
let {
|
|
13
13
|
style,
|
|
14
14
|
options,
|
|
@@ -62,7 +62,7 @@ const Picker = _ref => {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
const stylesWithoutMargin = style && omit(StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
65
|
-
const selectedLabel = selectedValue && (((_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label)
|
|
65
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
66
66
|
return /*#__PURE__*/React.createElement(Touchable, {
|
|
67
67
|
disabled: disabled,
|
|
68
68
|
onPress: toggleFocus,
|
|
@@ -25,7 +25,7 @@ const RadioButton = _ref => {
|
|
|
25
25
|
} = useRadioButtonGroupContext();
|
|
26
26
|
const realValue = getValueForRadioButton(value);
|
|
27
27
|
const realContextValue = getValueForRadioButton(contextValue);
|
|
28
|
-
const isSelected = selected
|
|
28
|
+
const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue === realValue;
|
|
29
29
|
const handlePress = () => {
|
|
30
30
|
onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
|
|
31
31
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
@@ -54,7 +54,7 @@ const RadioButtonRow = _ref => {
|
|
|
54
54
|
} = useRadioButtonGroupContext();
|
|
55
55
|
const realValue = getValueForRadioButton(value);
|
|
56
56
|
const realContextValue = getValueForRadioButton(contextValue);
|
|
57
|
-
const isSelected = selected
|
|
57
|
+
const isSelected = selected !== null && selected !== void 0 ? selected : realContextValue === realValue;
|
|
58
58
|
const handlePress = () => {
|
|
59
59
|
onPress === null || onPress === void 0 ? void 0 : onPress(realValue);
|
|
60
60
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
@@ -228,7 +228,7 @@ export default class StepIndicator extends Component {
|
|
|
228
228
|
stepStatus: this.getStepStatus(position)
|
|
229
229
|
}) : /*#__PURE__*/React.createElement(Text, {
|
|
230
230
|
style: indicatorLabelStyle
|
|
231
|
-
},
|
|
231
|
+
}, "".concat(position + 1)));
|
|
232
232
|
});
|
|
233
233
|
_defineProperty(this, "getStepStatus", stepPosition => {
|
|
234
234
|
const {
|
|
@@ -24,7 +24,7 @@ const Stepper = _ref => {
|
|
|
24
24
|
viewStyles,
|
|
25
25
|
textStyles
|
|
26
26
|
} = extractStyles(style);
|
|
27
|
-
const [value, setValue] = useState(defaultValue
|
|
27
|
+
const [value, setValue] = useState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : 0);
|
|
28
28
|
const isValidValue = valueArg => valueArg >= min && valueArg <= max;
|
|
29
29
|
const handlePlusOrMinus = type => {
|
|
30
30
|
const newValue = type === "plus" ? value + 1 : value - 1;
|
|
@@ -72,7 +72,4 @@ const Stepper = _ref => {
|
|
|
72
72
|
}
|
|
73
73
|
}));
|
|
74
74
|
};
|
|
75
|
-
export default withTheme(Stepper); }
|
|
76
|
-
}));
|
|
77
|
-
};
|
|
78
75
|
export default withTheme(Stepper);
|
|
@@ -150,7 +150,7 @@ export const SEED_DATA = [{
|
|
|
150
150
|
category: COMPONENT_TYPES.input,
|
|
151
151
|
layout: null,
|
|
152
152
|
triggers: [Triggers.OnDateChange],
|
|
153
|
-
|
|
153
|
+
stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
|
|
154
154
|
props: {
|
|
155
155
|
...SEED_DATA_PROPS,
|
|
156
156
|
type: {
|
|
@@ -24,9 +24,10 @@ export const SEED_DATA = [{
|
|
|
24
24
|
step: 1,
|
|
25
25
|
precision: 0
|
|
26
26
|
}),
|
|
27
|
-
|
|
28
|
-
label: "
|
|
29
|
-
description: "
|
|
27
|
+
initialNumToRender: createStaticNumberProp({
|
|
28
|
+
label: "Initial Num To Render",
|
|
29
|
+
description: "How many items to render in the initial batch",
|
|
30
|
+
defaultValue: null
|
|
30
31
|
}),
|
|
31
32
|
onEndReachedThreshold: createStaticNumberProp({
|
|
32
33
|
label: "End Reached Threshold",
|
|
@@ -67,6 +68,11 @@ export const SEED_DATA = [{
|
|
|
67
68
|
numColumns: createNumColumnsType({
|
|
68
69
|
editable: true
|
|
69
70
|
}),
|
|
71
|
+
initialNumToRender: createStaticNumberProp({
|
|
72
|
+
label: "Initial Num To Render",
|
|
73
|
+
description: "How many items to render in the initial batch",
|
|
74
|
+
defaultValue: null
|
|
75
|
+
}),
|
|
70
76
|
onEndReachedThreshold: createStaticNumberProp({
|
|
71
77
|
label: "End Reached Threshold",
|
|
72
78
|
description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
@@ -23,9 +23,10 @@ export const SEED_DATA = {
|
|
|
23
23
|
numColumns: createNumColumnsType({
|
|
24
24
|
editable: true
|
|
25
25
|
}),
|
|
26
|
-
initialNumToRender:
|
|
26
|
+
initialNumToRender: createStaticNumberProp({
|
|
27
27
|
label: "Initial Num To Render",
|
|
28
|
-
|
|
28
|
+
description: "How many items to render in the initial batch",
|
|
29
|
+
defaultValue: null
|
|
29
30
|
}),
|
|
30
31
|
onEndReachedThreshold: createStaticNumberProp({
|
|
31
32
|
label: "End Reached Threshold",
|
|
@@ -277,7 +277,7 @@ export const SEED_DATA = [{
|
|
|
277
277
|
...SEED_DATA_PROPS,
|
|
278
278
|
type: {
|
|
279
279
|
label: "Appearance",
|
|
280
|
-
description: "Type of
|
|
280
|
+
description: "Type of Field",
|
|
281
281
|
formType: FORM_TYPES.flatArray,
|
|
282
282
|
propType: PROP_TYPES.STRING,
|
|
283
283
|
defaultValue: "solid",
|
|
@@ -319,7 +319,7 @@ export const SEED_DATA = [{
|
|
|
319
319
|
...SEED_DATA_PROPS,
|
|
320
320
|
type: {
|
|
321
321
|
label: "Appearance",
|
|
322
|
-
description: "Type of
|
|
322
|
+
description: "Type of Field",
|
|
323
323
|
formType: FORM_TYPES.flatArray,
|
|
324
324
|
propType: PROP_TYPES.STRING,
|
|
325
325
|
defaultValue: "solid",
|
package/lib/module/utilities.js
CHANGED
|
@@ -51,15 +51,16 @@ export declare const SEED_DATA: ({
|
|
|
51
51
|
required: boolean;
|
|
52
52
|
step: number;
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
initialNumToRender: {
|
|
55
55
|
label: string;
|
|
56
56
|
description: string;
|
|
57
57
|
formType: string;
|
|
58
58
|
propType: string;
|
|
59
|
-
|
|
59
|
+
group: string;
|
|
60
|
+
defaultValue: null;
|
|
60
61
|
editable: boolean;
|
|
61
62
|
required: boolean;
|
|
62
|
-
|
|
63
|
+
step: number;
|
|
63
64
|
};
|
|
64
65
|
onEndReachedThreshold: {
|
|
65
66
|
label: string;
|
|
@@ -148,6 +149,17 @@ export declare const SEED_DATA: ({
|
|
|
148
149
|
editable: boolean;
|
|
149
150
|
required: boolean;
|
|
150
151
|
};
|
|
152
|
+
initialNumToRender: {
|
|
153
|
+
label: string;
|
|
154
|
+
description: string;
|
|
155
|
+
formType: string;
|
|
156
|
+
propType: string;
|
|
157
|
+
group: string;
|
|
158
|
+
defaultValue: null;
|
|
159
|
+
editable: boolean;
|
|
160
|
+
required: boolean;
|
|
161
|
+
step: number;
|
|
162
|
+
};
|
|
151
163
|
onEndReachedThreshold: {
|
|
152
164
|
label: string;
|
|
153
165
|
description: string;
|
|
@@ -159,7 +171,6 @@ export declare const SEED_DATA: ({
|
|
|
159
171
|
required: boolean;
|
|
160
172
|
step: number;
|
|
161
173
|
};
|
|
162
|
-
optimizeItemArrangement?: undefined;
|
|
163
174
|
};
|
|
164
175
|
})[];
|
|
165
176
|
//# sourceMappingURL=FlashList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqFrB,CAAC"}
|
|
@@ -64,10 +64,11 @@ export declare const SEED_DATA: {
|
|
|
64
64
|
description: string;
|
|
65
65
|
formType: string;
|
|
66
66
|
propType: string;
|
|
67
|
-
|
|
67
|
+
group: string;
|
|
68
|
+
defaultValue: null;
|
|
68
69
|
editable: boolean;
|
|
69
70
|
required: boolean;
|
|
70
|
-
|
|
71
|
+
step: number;
|
|
71
72
|
};
|
|
72
73
|
onEndReachedThreshold: {
|
|
73
74
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"FlatList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlatList.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.7.1",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^46.
|
|
44
|
+
"@draftbit/types": "^46.7.1",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
]
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "8d12faf1ea70acaa116189494f1d2742c8388faf"
|
|
95
95
|
}
|
|
@@ -151,7 +151,7 @@ export const SEED_DATA = [
|
|
|
151
151
|
category: COMPONENT_TYPES.input,
|
|
152
152
|
layout: null,
|
|
153
153
|
triggers: [Triggers.OnDateChange],
|
|
154
|
-
|
|
154
|
+
stylesPanelSections: [
|
|
155
155
|
StylesPanelSections.Typography,
|
|
156
156
|
StylesPanelSections.Background,
|
|
157
157
|
StylesPanelSections.Size,
|
|
@@ -165,7 +165,7 @@ export const SEED_DATA = [
|
|
|
165
165
|
category: COMPONENT_TYPES.input,
|
|
166
166
|
layout: null,
|
|
167
167
|
triggers: [Triggers.OnDateChange],
|
|
168
|
-
|
|
168
|
+
stylesPanelSections: [
|
|
169
169
|
StylesPanelSections.Typography,
|
|
170
170
|
StylesPanelSections.Background,
|
|
171
171
|
StylesPanelSections.Size,
|
|
@@ -25,9 +25,10 @@ export const SEED_DATA = [
|
|
|
25
25
|
step: 1,
|
|
26
26
|
precision: 0,
|
|
27
27
|
}),
|
|
28
|
-
|
|
29
|
-
label: "
|
|
30
|
-
description: "
|
|
28
|
+
initialNumToRender: createStaticNumberProp({
|
|
29
|
+
label: "Initial Num To Render",
|
|
30
|
+
description: "How many items to render in the initial batch",
|
|
31
|
+
defaultValue: null,
|
|
31
32
|
}),
|
|
32
33
|
onEndReachedThreshold: createStaticNumberProp({
|
|
33
34
|
label: "End Reached Threshold",
|
|
@@ -69,6 +70,11 @@ export const SEED_DATA = [
|
|
|
69
70
|
numColumns: createNumColumnsType({
|
|
70
71
|
editable: true,
|
|
71
72
|
}),
|
|
73
|
+
initialNumToRender: createStaticNumberProp({
|
|
74
|
+
label: "Initial Num To Render",
|
|
75
|
+
description: "How many items to render in the initial batch",
|
|
76
|
+
defaultValue: null,
|
|
77
|
+
}),
|
|
72
78
|
onEndReachedThreshold: createStaticNumberProp({
|
|
73
79
|
label: "End Reached Threshold",
|
|
74
80
|
description: "How far from the end (in units of visible length of the list) the bottom edge of the list must be from the end of the content to trigger the onEndReached callback. Thus a value of 0.5 will trigger onEndReached when the end of the content is within half the visible length of the list.",
|
|
@@ -36,10 +36,10 @@ export const SEED_DATA = [
|
|
|
36
36
|
step: 1,
|
|
37
37
|
precision: 0,
|
|
38
38
|
}),
|
|
39
|
-
|
|
40
|
-
label: "
|
|
41
|
-
description:
|
|
42
|
-
|
|
39
|
+
initialNumToRender: createStaticNumberProp({
|
|
40
|
+
label: "Initial Num To Render",
|
|
41
|
+
description: "How many items to render in the initial batch",
|
|
42
|
+
defaultValue: null,
|
|
43
43
|
}),
|
|
44
44
|
onEndReachedThreshold: createStaticNumberProp({
|
|
45
45
|
label: "End Reached Threshold",
|
|
@@ -82,6 +82,11 @@ export const SEED_DATA = [
|
|
|
82
82
|
numColumns: createNumColumnsType({
|
|
83
83
|
editable: true,
|
|
84
84
|
}),
|
|
85
|
+
initialNumToRender: createStaticNumberProp({
|
|
86
|
+
label: "Initial Num To Render",
|
|
87
|
+
description: "How many items to render in the initial batch",
|
|
88
|
+
defaultValue: null,
|
|
89
|
+
}),
|
|
85
90
|
onEndReachedThreshold: createStaticNumberProp({
|
|
86
91
|
label: "End Reached Threshold",
|
|
87
92
|
description:
|
package/src/mappings/FlatList.js
CHANGED
|
@@ -23,9 +23,10 @@ export const SEED_DATA = {
|
|
|
23
23
|
numColumns: createNumColumnsType({
|
|
24
24
|
editable: true,
|
|
25
25
|
}),
|
|
26
|
-
initialNumToRender:
|
|
26
|
+
initialNumToRender: createStaticNumberProp({
|
|
27
27
|
label: "Initial Num To Render",
|
|
28
|
-
|
|
28
|
+
description: "How many items to render in the initial batch",
|
|
29
|
+
defaultValue: null,
|
|
29
30
|
}),
|
|
30
31
|
onEndReachedThreshold: createStaticNumberProp({
|
|
31
32
|
label: "End Reached Threshold",
|
package/src/mappings/FlatList.ts
CHANGED
|
@@ -32,9 +32,10 @@ export const SEED_DATA = {
|
|
|
32
32
|
numColumns: createNumColumnsType({
|
|
33
33
|
editable: true,
|
|
34
34
|
}),
|
|
35
|
-
initialNumToRender:
|
|
35
|
+
initialNumToRender: createStaticNumberProp({
|
|
36
36
|
label: "Initial Num To Render",
|
|
37
|
-
|
|
37
|
+
description: "How many items to render in the initial batch",
|
|
38
|
+
defaultValue: null,
|
|
38
39
|
}),
|
|
39
40
|
onEndReachedThreshold: createStaticNumberProp({
|
|
40
41
|
label: "End Reached Threshold",
|
|
@@ -306,7 +306,7 @@ export const SEED_DATA = [
|
|
|
306
306
|
...SEED_DATA_PROPS,
|
|
307
307
|
type: {
|
|
308
308
|
label: "Appearance",
|
|
309
|
-
description: "Type of
|
|
309
|
+
description: "Type of Field",
|
|
310
310
|
formType: FORM_TYPES.flatArray,
|
|
311
311
|
propType: PROP_TYPES.STRING,
|
|
312
312
|
defaultValue: "solid",
|
|
@@ -357,7 +357,7 @@ export const SEED_DATA = [
|
|
|
357
357
|
...SEED_DATA_PROPS,
|
|
358
358
|
type: {
|
|
359
359
|
label: "Appearance",
|
|
360
|
-
description: "Type of
|
|
360
|
+
description: "Type of Field",
|
|
361
361
|
formType: FORM_TYPES.flatArray,
|
|
362
362
|
propType: PROP_TYPES.STRING,
|
|
363
363
|
defaultValue: "solid",
|
|
@@ -328,7 +328,7 @@ export const SEED_DATA = [
|
|
|
328
328
|
...SEED_DATA_PROPS,
|
|
329
329
|
type: {
|
|
330
330
|
label: "Appearance",
|
|
331
|
-
description: "Type of
|
|
331
|
+
description: "Type of Field",
|
|
332
332
|
formType: FORM_TYPES.flatArray,
|
|
333
333
|
propType: PROP_TYPES.STRING,
|
|
334
334
|
defaultValue: "solid",
|
|
@@ -380,7 +380,7 @@ export const SEED_DATA = [
|
|
|
380
380
|
...SEED_DATA_PROPS,
|
|
381
381
|
type: {
|
|
382
382
|
label: "Appearance",
|
|
383
|
-
description: "Type of
|
|
383
|
+
description: "Type of Field",
|
|
384
384
|
formType: FORM_TYPES.flatArray,
|
|
385
385
|
propType: PROP_TYPES.STRING,
|
|
386
386
|
defaultValue: "solid",
|