@draftbit/core 47.0.1-2aab54.2 → 47.0.1-411297.2
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/Checkbox/CheckboxGroup.js +2 -17
- package/lib/commonjs/index.js +82 -25
- package/lib/commonjs/mappings/FlashList.js +45 -2
- package/lib/commonjs/mappings/FlatList.js +12 -0
- package/lib/module/index.js +31 -121
- package/lib/module/mappings/FlashList.js +46 -3
- package/lib/module/mappings/FlatList.js +13 -1
- package/lib/typescript/src/index.d.ts +29 -102
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.js +31 -112
- package/src/index.tsx +43 -123
- package/src/mappings/FlashList.js +77 -31
- package/src/mappings/FlashList.ts +82 -30
- package/src/mappings/FlatList.js +13 -1
- package/src/mappings/FlatList.ts +16 -0
- package/lib/commonjs/mappings/NativeBase/AlertDialog.js +0 -93
- package/lib/commonjs/mappings/NativeBase/Button.js +0 -84
- package/lib/commonjs/mappings/NativeBase/DataDisplay.js +0 -48
- package/lib/commonjs/mappings/NativeBase/Feedback.js +0 -74
- package/lib/commonjs/mappings/NativeBase/Layout.js +0 -114
- package/lib/commonjs/mappings/NativeBase/Media.js +0 -49
- package/lib/commonjs/mappings/NativeBase/Menu.js +0 -111
- package/lib/commonjs/mappings/NativeBase/Modal.js +0 -93
- package/lib/commonjs/mappings/NativeBase/Other.js +0 -94
- package/lib/commonjs/mappings/NativeBase/Popover.js +0 -99
- package/lib/module/mappings/NativeBase/AlertDialog.js +0 -86
- package/lib/module/mappings/NativeBase/Button.js +0 -86
- package/lib/module/mappings/NativeBase/DataDisplay.js +0 -41
- package/lib/module/mappings/NativeBase/Feedback.js +0 -67
- package/lib/module/mappings/NativeBase/Layout.js +0 -107
- package/lib/module/mappings/NativeBase/Media.js +0 -42
- package/lib/module/mappings/NativeBase/Menu.js +0 -104
- package/lib/module/mappings/NativeBase/Modal.js +0 -86
- package/lib/module/mappings/NativeBase/Other.js +0 -87
- package/lib/module/mappings/NativeBase/Popover.js +0 -92
- package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts +0 -134
- package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Button.d.ts +0 -1
- package/lib/typescript/src/mappings/NativeBase/Button.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts +0 -70
- package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts +0 -2
- package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -146
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Media.d.ts +0 -48
- package/lib/typescript/src/mappings/NativeBase/Media.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Menu.d.ts +0 -227
- package/lib/typescript/src/mappings/NativeBase/Menu.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Modal.d.ts +0 -133
- package/lib/typescript/src/mappings/NativeBase/Modal.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Other.d.ts +0 -179
- package/lib/typescript/src/mappings/NativeBase/Other.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Popover.d.ts +0 -136
- package/lib/typescript/src/mappings/NativeBase/Popover.d.ts.map +0 -1
- package/src/mappings/NativeBase/AlertDialog.js +0 -103
- package/src/mappings/NativeBase/AlertDialog.ts +0 -118
- package/src/mappings/NativeBase/Button.js +0 -84
- package/src/mappings/NativeBase/Button.ts +0 -83
- package/src/mappings/NativeBase/DataDisplay.js +0 -54
- package/src/mappings/NativeBase/DataDisplay.ts +0 -64
- package/src/mappings/NativeBase/Feedback.js +0 -89
- package/src/mappings/NativeBase/Feedback.ts +0 -100
- package/src/mappings/NativeBase/Layout.js +0 -140
- package/src/mappings/NativeBase/Layout.ts +0 -152
- package/src/mappings/NativeBase/Media.js +0 -56
- package/src/mappings/NativeBase/Media.ts +0 -65
- package/src/mappings/NativeBase/Menu.js +0 -134
- package/src/mappings/NativeBase/Menu.ts +0 -150
- package/src/mappings/NativeBase/Modal.js +0 -103
- package/src/mappings/NativeBase/Modal.ts +0 -118
- package/src/mappings/NativeBase/Other.js +0 -123
- package/src/mappings/NativeBase/Other.ts +0 -139
- package/src/mappings/NativeBase/Popover.js +0 -123
- package/src/mappings/NativeBase/Popover.ts +0 -136
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _context = require("./context");
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
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; }
|
|
12
|
+
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); }
|
|
12
13
|
const {
|
|
13
14
|
Provider
|
|
14
15
|
} = _context.checkboxGroupContext;
|
|
@@ -30,23 +31,7 @@ const CheckboxGroup = _ref => {
|
|
|
30
31
|
alignItems: "center"
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
34
|
-
style: [{
|
|
35
|
-
minHeight: 40
|
|
36
|
-
}, style],
|
|
37
|
-
...rest
|
|
38
|
-
}, /*#__PURE__*/React.createElement(Provider, {
|
|
39
|
-
value: {
|
|
40
|
-
values,
|
|
41
|
-
onValueChange,
|
|
42
|
-
direction
|
|
43
|
-
}
|
|
44
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
45
|
-
style: _containerStyle
|
|
46
|
-
}, children)));
|
|
47
|
-
};
|
|
48
|
-
var _default = CheckboxGroup;
|
|
49
|
-
exports.default = _default;s({
|
|
34
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
50
35
|
style: [{
|
|
51
36
|
minHeight: 40
|
|
52
37
|
}, style]
|
package/lib/commonjs/index.js
CHANGED
|
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "ActionSheetItem", {
|
|
|
33
33
|
return _ActionSheet.ActionSheetItem;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "Avatar", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _CircleImage.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "AvatarEdit", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function () {
|
|
@@ -99,6 +105,12 @@ Object.defineProperty(exports, "Carousel", {
|
|
|
99
105
|
return _Carousel.default;
|
|
100
106
|
}
|
|
101
107
|
});
|
|
108
|
+
Object.defineProperty(exports, "Center", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _Layout.Center;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
102
114
|
Object.defineProperty(exports, "Checkbox", {
|
|
103
115
|
enumerable: true,
|
|
104
116
|
get: function () {
|
|
@@ -117,12 +129,24 @@ Object.defineProperty(exports, "CheckboxRow", {
|
|
|
117
129
|
return _Checkbox.CheckboxRow;
|
|
118
130
|
}
|
|
119
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "Circle", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _Layout.Circle;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
120
138
|
Object.defineProperty(exports, "CircleImage", {
|
|
121
139
|
enumerable: true,
|
|
122
140
|
get: function () {
|
|
123
141
|
return _CircleImage.default;
|
|
124
142
|
}
|
|
125
143
|
});
|
|
144
|
+
Object.defineProperty(exports, "Container", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _Container.default;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
126
150
|
Object.defineProperty(exports, "DatePicker", {
|
|
127
151
|
enumerable: true,
|
|
128
152
|
get: function () {
|
|
@@ -141,6 +165,12 @@ Object.defineProperty(exports, "Divider", {
|
|
|
141
165
|
return _Divider.default;
|
|
142
166
|
}
|
|
143
167
|
});
|
|
168
|
+
Object.defineProperty(exports, "FAB", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () {
|
|
171
|
+
return _FAB.default;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
144
174
|
Object.defineProperty(exports, "FieldSearchBarFull", {
|
|
145
175
|
enumerable: true,
|
|
146
176
|
get: function () {
|
|
@@ -237,6 +267,12 @@ Object.defineProperty(exports, "RadioButtonRow", {
|
|
|
237
267
|
return _index.RadioButtonRow;
|
|
238
268
|
}
|
|
239
269
|
});
|
|
270
|
+
Object.defineProperty(exports, "Row", {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: function () {
|
|
273
|
+
return _Layout.Row;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
240
276
|
Object.defineProperty(exports, "RowBodyIcon", {
|
|
241
277
|
enumerable: true,
|
|
242
278
|
get: function () {
|
|
@@ -273,6 +309,24 @@ Object.defineProperty(exports, "Slider", {
|
|
|
273
309
|
return _Slider.default;
|
|
274
310
|
}
|
|
275
311
|
});
|
|
312
|
+
Object.defineProperty(exports, "Spacer", {
|
|
313
|
+
enumerable: true,
|
|
314
|
+
get: function () {
|
|
315
|
+
return _Layout.Spacer;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
Object.defineProperty(exports, "Square", {
|
|
319
|
+
enumerable: true,
|
|
320
|
+
get: function () {
|
|
321
|
+
return _Layout.Square;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
Object.defineProperty(exports, "Stack", {
|
|
325
|
+
enumerable: true,
|
|
326
|
+
get: function () {
|
|
327
|
+
return _Layout.Stack;
|
|
328
|
+
}
|
|
329
|
+
});
|
|
276
330
|
Object.defineProperty(exports, "StarRating", {
|
|
277
331
|
enumerable: true,
|
|
278
332
|
get: function () {
|
|
@@ -361,47 +415,50 @@ var _Icon = require("./interfaces/Icon");
|
|
|
361
415
|
var _theming = require("./theming");
|
|
362
416
|
var _Provider = _interopRequireDefault(require("./Provider"));
|
|
363
417
|
var _DefaultTheme = _interopRequireDefault(require("./styles/DefaultTheme"));
|
|
364
|
-
var
|
|
418
|
+
var _Text = require("./components/Text");
|
|
365
419
|
var _Banner = _interopRequireDefault(require("./components/Banner"));
|
|
366
420
|
var _Button = require("./components/Button");
|
|
367
|
-
var
|
|
421
|
+
var _CircleImage = _interopRequireDefault(require("./components/CircleImage"));
|
|
422
|
+
var _AvatarEdit = _interopRequireDefault(require("./components/AvatarEdit"));
|
|
423
|
+
var _Card = _interopRequireDefault(require("./components/Card"));
|
|
424
|
+
var _Carousel = _interopRequireDefault(require("./components/Carousel"));
|
|
425
|
+
var _Checkbox = require("./components/Checkbox");
|
|
426
|
+
var _Container = _interopRequireDefault(require("./components/Container"));
|
|
427
|
+
var _Divider = _interopRequireDefault(require("./components/Divider"));
|
|
428
|
+
var _FAB = _interopRequireDefault(require("./components/FAB"));
|
|
429
|
+
var _FieldSearchBarFull = _interopRequireDefault(require("./components/FieldSearchBarFull"));
|
|
368
430
|
var _IconButton = _interopRequireDefault(require("./components/IconButton"));
|
|
369
|
-
var
|
|
370
|
-
var
|
|
371
|
-
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
431
|
+
var _Image = _interopRequireDefault(require("./components/Image"));
|
|
432
|
+
var _SVG = _interopRequireDefault(require("./components/SVG"));
|
|
372
433
|
var _NumberInput = _interopRequireDefault(require("./components/NumberInput"));
|
|
373
|
-
var
|
|
374
|
-
var _FieldSearchBarFull = _interopRequireDefault(require("./components/FieldSearchBarFull"));
|
|
375
|
-
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
376
|
-
var _Checkbox = require("./components/Checkbox");
|
|
377
|
-
var _index = require("./components/RadioButton/index");
|
|
378
|
-
var _Slider = _interopRequireDefault(require("./components/Slider"));
|
|
379
|
-
var _Stepper = _interopRequireDefault(require("./components/Stepper"));
|
|
434
|
+
var _ScreenContainer = _interopRequireDefault(require("./components/ScreenContainer"));
|
|
380
435
|
var _StarRating = _interopRequireDefault(require("./components/StarRating"));
|
|
436
|
+
var _Surface = _interopRequireDefault(require("./components/Surface"));
|
|
381
437
|
var _Switch = _interopRequireWildcard(require("./components/Switch"));
|
|
382
|
-
var
|
|
383
|
-
var
|
|
384
|
-
var
|
|
385
|
-
var _CircleImage = _interopRequireDefault(require("./components/CircleImage"));
|
|
386
|
-
var _Swiper = require("./components/Swiper");
|
|
438
|
+
var _TextField = _interopRequireDefault(require("./components/TextField"));
|
|
439
|
+
var _ToggleButton = _interopRequireDefault(require("./components/ToggleButton"));
|
|
440
|
+
var _Touchable = _interopRequireDefault(require("./components/Touchable"));
|
|
387
441
|
var _Accordion = require("./components/Accordion");
|
|
388
|
-
var _Surface = _interopRequireDefault(require("./components/Surface"));
|
|
389
442
|
var _ActionSheet = require("./components/ActionSheet");
|
|
390
|
-
var
|
|
391
|
-
var
|
|
443
|
+
var _Swiper = require("./components/Swiper");
|
|
444
|
+
var _Layout = require("./components/Layout");
|
|
445
|
+
var _index = require("./components/RadioButton/index");
|
|
446
|
+
var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
|
|
447
|
+
var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));
|
|
448
|
+
var _CardContainerRating = _interopRequireDefault(require("./components/CardContainerRating"));
|
|
449
|
+
var _CardInline = _interopRequireDefault(require("./components/CardInline"));
|
|
450
|
+
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
392
451
|
var _HeaderLarge = _interopRequireDefault(require("./components/HeaderLarge"));
|
|
393
452
|
var _HeaderMedium = _interopRequireDefault(require("./components/HeaderMedium"));
|
|
394
453
|
var _HeaderOverline = _interopRequireDefault(require("./components/HeaderOverline"));
|
|
454
|
+
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
395
455
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
396
456
|
var _ProgressCircle = _interopRequireDefault(require("./components/ProgressCircle"));
|
|
397
457
|
var _RowBodyIcon = _interopRequireDefault(require("./components/RowBodyIcon"));
|
|
398
458
|
var _RowHeadlineImageCaption = _interopRequireDefault(require("./components/RowHeadlineImageCaption"));
|
|
399
459
|
var _RowHeadlineImageIcon = _interopRequireDefault(require("./components/RowHeadlineImageIcon"));
|
|
400
|
-
var
|
|
401
|
-
var
|
|
402
|
-
var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));
|
|
403
|
-
var _CardContainerRating = _interopRequireDefault(require("./components/CardContainerRating"));
|
|
404
|
-
var _CardInline = _interopRequireDefault(require("./components/CardInline"));
|
|
460
|
+
var _Slider = _interopRequireDefault(require("./components/Slider"));
|
|
461
|
+
var _Stepper = _interopRequireDefault(require("./components/Stepper"));
|
|
405
462
|
var _useAuthState = require("./components/useAuthState");
|
|
406
463
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
407
464
|
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; }
|
|
@@ -5,7 +5,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SEED_DATA = void 0;
|
|
7
7
|
var _types = require("@draftbit/types");
|
|
8
|
-
const SEED_DATA = {
|
|
8
|
+
const SEED_DATA = [{
|
|
9
|
+
name: "Masonry List",
|
|
10
|
+
tag: "MasonryFlashList",
|
|
11
|
+
description: "Masonry Flashlist by Shopify",
|
|
12
|
+
packageName: "@shopify/flash-list",
|
|
13
|
+
category: _types.COMPONENT_TYPES.data,
|
|
14
|
+
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
15
|
+
layout: {
|
|
16
|
+
flex: 1
|
|
17
|
+
},
|
|
18
|
+
triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
|
|
19
|
+
props: {
|
|
20
|
+
onRefresh: (0, _types.createActionProp)(),
|
|
21
|
+
onEndReached: (0, _types.createActionProp)(),
|
|
22
|
+
numColumns: (0, _types.createNumColumnsType)({
|
|
23
|
+
editable: true
|
|
24
|
+
}),
|
|
25
|
+
estimatedItemSize: (0, _types.createNumberProp)({
|
|
26
|
+
group: _types.GROUPS.basic,
|
|
27
|
+
label: "Est. Item Size",
|
|
28
|
+
description: "Approximate size of the items before rendering.",
|
|
29
|
+
defaultValue: 50,
|
|
30
|
+
step: 1,
|
|
31
|
+
precision: 0
|
|
32
|
+
}),
|
|
33
|
+
optimizeItemArrangement: (0, _types.createStaticBoolProp)({
|
|
34
|
+
label: "Optimize Item Arrangement",
|
|
35
|
+
description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
|
|
36
|
+
}),
|
|
37
|
+
onEndReachedThreshold: (0, _types.createStaticNumberProp)({
|
|
38
|
+
label: "End Reached Threshold",
|
|
39
|
+
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.",
|
|
40
|
+
defaultValue: 0.5
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
9
44
|
name: "FlashList",
|
|
10
45
|
tag: "FlashList",
|
|
11
46
|
description: "Flashlist by Shopify",
|
|
@@ -15,7 +50,10 @@ const SEED_DATA = {
|
|
|
15
50
|
layout: {
|
|
16
51
|
flex: 1
|
|
17
52
|
},
|
|
53
|
+
triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
|
|
18
54
|
props: {
|
|
55
|
+
onRefresh: (0, _types.createActionProp)(),
|
|
56
|
+
onEndReached: (0, _types.createActionProp)(),
|
|
19
57
|
estimatedItemSize: (0, _types.createNumberProp)({
|
|
20
58
|
group: _types.GROUPS.basic,
|
|
21
59
|
label: "Est. Item Size",
|
|
@@ -34,7 +72,12 @@ const SEED_DATA = {
|
|
|
34
72
|
}),
|
|
35
73
|
numColumns: (0, _types.createNumColumnsType)({
|
|
36
74
|
editable: true
|
|
75
|
+
}),
|
|
76
|
+
onEndReachedThreshold: (0, _types.createStaticNumberProp)({
|
|
77
|
+
label: "End Reached Threshold",
|
|
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.",
|
|
79
|
+
defaultValue: 0.5
|
|
37
80
|
})
|
|
38
81
|
}
|
|
39
|
-
};
|
|
82
|
+
}];
|
|
40
83
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -14,7 +14,10 @@ const SEED_DATA = {
|
|
|
14
14
|
layout: {
|
|
15
15
|
flex: 1
|
|
16
16
|
},
|
|
17
|
+
triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
|
|
17
18
|
props: {
|
|
19
|
+
onRefresh: (0, _types.createActionProp)(),
|
|
20
|
+
onEndReached: (0, _types.createActionProp)(),
|
|
18
21
|
horizontal: (0, _types.createStaticBoolProp)({
|
|
19
22
|
label: "Horizontal",
|
|
20
23
|
description: "Render list horizontally"
|
|
@@ -25,6 +28,15 @@ const SEED_DATA = {
|
|
|
25
28
|
}),
|
|
26
29
|
numColumns: (0, _types.createNumColumnsType)({
|
|
27
30
|
editable: true
|
|
31
|
+
}),
|
|
32
|
+
initialNumToRender: (0, _types.createStaticBoolProp)({
|
|
33
|
+
label: "Initial Num To Render",
|
|
34
|
+
descriprion: "How many items to render in the initial batch"
|
|
35
|
+
}),
|
|
36
|
+
onEndReachedThreshold: (0, _types.createStaticNumberProp)({
|
|
37
|
+
label: "End Reached Threshold",
|
|
38
|
+
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.",
|
|
39
|
+
defaultValue: 0.5
|
|
28
40
|
})
|
|
29
41
|
}
|
|
30
42
|
};
|
package/lib/module/index.js
CHANGED
|
@@ -2,143 +2,53 @@ export { injectIcon } from "./interfaces/Icon";
|
|
|
2
2
|
export { withTheme, ThemeProvider } from "./theming";
|
|
3
3
|
export { default as Provider } from "./Provider";
|
|
4
4
|
export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
5
|
-
|
|
6
|
-
/** Replaced By NativeBase
|
|
7
|
-
* export { default as Avatar } from "./components/CircleImage";
|
|
8
|
-
* export { default as Container } from "./components/Container";
|
|
9
|
-
* export { default as FAB } from "./components/FAB";
|
|
10
|
-
* export {
|
|
11
|
-
Center,
|
|
12
|
-
Circle,
|
|
13
|
-
Square,
|
|
14
|
-
Row,
|
|
15
|
-
Stack,
|
|
16
|
-
Spacer,
|
|
17
|
-
} from "./components/Layout";
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
// BASIC
|
|
21
|
-
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
5
|
+
export { Link } from "./components/Text";
|
|
22
6
|
export { default as Banner } from "./components/Banner";
|
|
23
|
-
|
|
24
|
-
// BUTTONS
|
|
25
7
|
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
26
|
-
export {
|
|
8
|
+
export { default as Avatar } from "./components/CircleImage";
|
|
9
|
+
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
|
+
export { default as Card } from "./components/Card";
|
|
11
|
+
export { default as Carousel } from "./components/Carousel";
|
|
12
|
+
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
13
|
+
export { default as CircleImage } from "./components/CircleImage";
|
|
14
|
+
export { default as Container } from "./components/Container";
|
|
15
|
+
export { default as Divider } from "./components/Divider";
|
|
16
|
+
export { default as FAB } from "./components/FAB";
|
|
17
|
+
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
27
18
|
export { default as IconButton } from "./components/IconButton";
|
|
28
|
-
export { default as
|
|
29
|
-
export { default as
|
|
30
|
-
|
|
31
|
-
// INPUTS
|
|
32
|
-
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
19
|
+
export { default as Image } from "./components/Image";
|
|
20
|
+
export { default as SVG } from "./components/SVG";
|
|
33
21
|
export { default as NumberInput } from "./components/NumberInput";
|
|
34
|
-
export { default as
|
|
35
|
-
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
36
|
-
export { default as Picker } from "./components/Picker/Picker";
|
|
37
|
-
|
|
38
|
-
// CONTROLS
|
|
39
|
-
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
40
|
-
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
41
|
-
export { default as Slider } from "./components/Slider";
|
|
42
|
-
export { default as Stepper } from "./components/Stepper";
|
|
22
|
+
export { default as ScreenContainer } from "./components/ScreenContainer";
|
|
43
23
|
export { default as StarRating } from "./components/StarRating";
|
|
24
|
+
export { default as Surface } from "./components/Surface";
|
|
44
25
|
export { default as Switch, SwitchRow } from "./components/Switch";
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
export { default as
|
|
48
|
-
export { default as Image } from "./components/Image";
|
|
49
|
-
// export { default as Avatar } from "./components/CircleImage"; Replaced by NativeBase
|
|
50
|
-
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
51
|
-
export { default as CircleImage } from "./components/CircleImage";
|
|
52
|
-
|
|
53
|
-
// SWIPER
|
|
54
|
-
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
55
|
-
|
|
56
|
-
// CONTAINERS
|
|
26
|
+
export { default as TextField } from "./components/TextField";
|
|
27
|
+
export { default as ToggleButton } from "./components/ToggleButton";
|
|
28
|
+
export { default as Touchable } from "./components/Touchable";
|
|
57
29
|
export { AccordionGroup, AccordionItem } from "./components/Accordion";
|
|
58
|
-
export { default as Surface } from "./components/Surface";
|
|
59
|
-
|
|
60
|
-
// ACTIONSHEET
|
|
61
30
|
export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/ActionSheet";
|
|
31
|
+
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
32
|
+
export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
|
|
33
|
+
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
62
34
|
|
|
63
|
-
|
|
64
|
-
export { default as
|
|
65
|
-
export { default as
|
|
35
|
+
/* Deprecated: Fix or Delete! */
|
|
36
|
+
export { default as CardBlock } from "./components/CardBlock";
|
|
37
|
+
export { default as CardContainer } from "./components/CardContainer";
|
|
38
|
+
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
39
|
+
export { default as CardInline } from "./components/CardInline";
|
|
40
|
+
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
66
41
|
export { default as HeaderLarge } from "./components/HeaderLarge";
|
|
67
42
|
export { default as HeaderMedium } from "./components/HeaderMedium";
|
|
68
43
|
export { default as HeaderOverline } from "./components/HeaderOverline";
|
|
44
|
+
export { default as Picker } from "./components/Picker/Picker";
|
|
69
45
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
70
46
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
71
47
|
export { default as RowBodyIcon } from "./components/RowBodyIcon";
|
|
72
48
|
export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
|
|
73
49
|
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
74
|
-
export { default as
|
|
75
|
-
export { default as
|
|
76
|
-
export { default as CardContainer } from "./components/CardContainer";
|
|
77
|
-
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
78
|
-
export { default as CardInline } from "./components/CardInline";
|
|
50
|
+
export { default as Slider } from "./components/Slider";
|
|
51
|
+
export { default as Stepper } from "./components/Stepper";
|
|
79
52
|
export { useAuthState } from "./components/useAuthState";
|
|
80
53
|
|
|
81
|
-
|
|
82
|
-
* NativeBase Components Jan 2023
|
|
83
|
-
*
|
|
84
|
-
* ALERT
|
|
85
|
-
* - AlertDialog
|
|
86
|
-
* - AlertDialog.Header
|
|
87
|
-
* - AlertDialog.Body
|
|
88
|
-
* - AlertDialog.Footer
|
|
89
|
-
* - AlertDialog.Content
|
|
90
|
-
* - AlertDialog.CloseButton
|
|
91
|
-
*
|
|
92
|
-
* FORMS
|
|
93
|
-
* - Button -- COMMENTED OUT
|
|
94
|
-
* - Button.Group -- COMMENTED OUT
|
|
95
|
-
* - Fab
|
|
96
|
-
*
|
|
97
|
-
* DATA DISPLAY
|
|
98
|
-
* - Badge
|
|
99
|
-
* - Divider
|
|
100
|
-
*
|
|
101
|
-
* FEEDBACK
|
|
102
|
-
* - Alert
|
|
103
|
-
* - Alert.Icon
|
|
104
|
-
* - Progress
|
|
105
|
-
*
|
|
106
|
-
* LAYOUT
|
|
107
|
-
* - AspectRatio
|
|
108
|
-
* - Box
|
|
109
|
-
* - Center
|
|
110
|
-
* - Square
|
|
111
|
-
* - Circle
|
|
112
|
-
* - Column
|
|
113
|
-
* - Container
|
|
114
|
-
* - Flex
|
|
115
|
-
* - Spacer
|
|
116
|
-
* - Row
|
|
117
|
-
* - Stack
|
|
118
|
-
* - ZStack
|
|
119
|
-
*
|
|
120
|
-
* MEDIA
|
|
121
|
-
* - Avatar
|
|
122
|
-
* - Avatar.Badge
|
|
123
|
-
* - Avatar.Group
|
|
124
|
-
*
|
|
125
|
-
* MENU
|
|
126
|
-
* - Menu
|
|
127
|
-
* - Menu.Item
|
|
128
|
-
* - Menu.Group
|
|
129
|
-
* - Menu.OptionGroup
|
|
130
|
-
* - Menu.ItemOption
|
|
131
|
-
* - Menu.Trigger
|
|
132
|
-
*
|
|
133
|
-
* MODAL
|
|
134
|
-
* - Modal
|
|
135
|
-
* - Modal.Content
|
|
136
|
-
* - Modal.Header
|
|
137
|
-
* - Modal.Footer
|
|
138
|
-
* - Modal.Body
|
|
139
|
-
* - Modal.CloseButton
|
|
140
|
-
*
|
|
141
|
-
* OTHER
|
|
142
|
-
* - Tooltip
|
|
143
|
-
*
|
|
144
|
-
* */
|
|
54
|
+
// a comment to fix sourcemap comment issue
|
|
@@ -1,5 +1,40 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS } from "@draftbit/types";
|
|
2
|
-
export const SEED_DATA = {
|
|
1
|
+
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = [{
|
|
3
|
+
name: "Masonry List",
|
|
4
|
+
tag: "MasonryFlashList",
|
|
5
|
+
description: "Masonry Flashlist by Shopify",
|
|
6
|
+
packageName: "@shopify/flash-list",
|
|
7
|
+
category: COMPONENT_TYPES.data,
|
|
8
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
9
|
+
layout: {
|
|
10
|
+
flex: 1
|
|
11
|
+
},
|
|
12
|
+
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
13
|
+
props: {
|
|
14
|
+
onRefresh: createActionProp(),
|
|
15
|
+
onEndReached: createActionProp(),
|
|
16
|
+
numColumns: createNumColumnsType({
|
|
17
|
+
editable: true
|
|
18
|
+
}),
|
|
19
|
+
estimatedItemSize: createNumberProp({
|
|
20
|
+
group: GROUPS.basic,
|
|
21
|
+
label: "Est. Item Size",
|
|
22
|
+
description: "Approximate size of the items before rendering.",
|
|
23
|
+
defaultValue: 50,
|
|
24
|
+
step: 1,
|
|
25
|
+
precision: 0
|
|
26
|
+
}),
|
|
27
|
+
optimizeItemArrangement: createStaticBoolProp({
|
|
28
|
+
label: "Optimize Item Arrangement",
|
|
29
|
+
description: "If enabled, MasonryFlashList will try to reduce difference in column height by modifying item order. If true, specifying overrideItemLayout is required. Default value is false."
|
|
30
|
+
}),
|
|
31
|
+
onEndReachedThreshold: createStaticNumberProp({
|
|
32
|
+
label: "End Reached Threshold",
|
|
33
|
+
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.",
|
|
34
|
+
defaultValue: 0.5
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
3
38
|
name: "FlashList",
|
|
4
39
|
tag: "FlashList",
|
|
5
40
|
description: "Flashlist by Shopify",
|
|
@@ -9,7 +44,10 @@ export const SEED_DATA = {
|
|
|
9
44
|
layout: {
|
|
10
45
|
flex: 1
|
|
11
46
|
},
|
|
47
|
+
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
12
48
|
props: {
|
|
49
|
+
onRefresh: createActionProp(),
|
|
50
|
+
onEndReached: createActionProp(),
|
|
13
51
|
estimatedItemSize: createNumberProp({
|
|
14
52
|
group: GROUPS.basic,
|
|
15
53
|
label: "Est. Item Size",
|
|
@@ -28,6 +66,11 @@ export const SEED_DATA = {
|
|
|
28
66
|
}),
|
|
29
67
|
numColumns: createNumColumnsType({
|
|
30
68
|
editable: true
|
|
69
|
+
}),
|
|
70
|
+
onEndReachedThreshold: createStaticNumberProp({
|
|
71
|
+
label: "End Reached Threshold",
|
|
72
|
+
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.",
|
|
73
|
+
defaultValue: 0.5
|
|
31
74
|
})
|
|
32
75
|
}
|
|
33
|
-
};
|
|
76
|
+
}];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS } from "@draftbit/types";
|
|
1
|
+
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, createStaticNumberProp } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "List",
|
|
4
4
|
tag: "FlatList",
|
|
@@ -8,7 +8,10 @@ export const SEED_DATA = {
|
|
|
8
8
|
layout: {
|
|
9
9
|
flex: 1
|
|
10
10
|
},
|
|
11
|
+
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
11
12
|
props: {
|
|
13
|
+
onRefresh: createActionProp(),
|
|
14
|
+
onEndReached: createActionProp(),
|
|
12
15
|
horizontal: createStaticBoolProp({
|
|
13
16
|
label: "Horizontal",
|
|
14
17
|
description: "Render list horizontally"
|
|
@@ -19,6 +22,15 @@ export const SEED_DATA = {
|
|
|
19
22
|
}),
|
|
20
23
|
numColumns: createNumColumnsType({
|
|
21
24
|
editable: true
|
|
25
|
+
}),
|
|
26
|
+
initialNumToRender: createStaticBoolProp({
|
|
27
|
+
label: "Initial Num To Render",
|
|
28
|
+
descriprion: "How many items to render in the initial batch"
|
|
29
|
+
}),
|
|
30
|
+
onEndReachedThreshold: createStaticNumberProp({
|
|
31
|
+
label: "End Reached Threshold",
|
|
32
|
+
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.",
|
|
33
|
+
defaultValue: 0.5
|
|
22
34
|
})
|
|
23
35
|
}
|
|
24
36
|
};
|