@draftbit/core 47.0.1-2935a8.2 → 47.0.1-2aab54.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.
Files changed (80) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +17 -2
  2. package/lib/commonjs/index.js +25 -82
  3. package/lib/commonjs/mappings/FlashList.js +2 -38
  4. package/lib/commonjs/mappings/FlatList.js +0 -9
  5. package/lib/commonjs/mappings/NativeBase/AlertDialog.js +93 -0
  6. package/lib/commonjs/mappings/NativeBase/Button.js +84 -0
  7. package/lib/commonjs/mappings/NativeBase/DataDisplay.js +48 -0
  8. package/lib/commonjs/mappings/NativeBase/Feedback.js +74 -0
  9. package/lib/commonjs/mappings/NativeBase/Layout.js +114 -0
  10. package/lib/commonjs/mappings/NativeBase/Media.js +49 -0
  11. package/lib/commonjs/mappings/NativeBase/Menu.js +111 -0
  12. package/lib/commonjs/mappings/NativeBase/Modal.js +93 -0
  13. package/lib/commonjs/mappings/NativeBase/Other.js +94 -0
  14. package/lib/commonjs/mappings/NativeBase/Popover.js +99 -0
  15. package/lib/module/index.js +121 -31
  16. package/lib/module/mappings/FlashList.js +3 -39
  17. package/lib/module/mappings/FlatList.js +1 -10
  18. package/lib/module/mappings/NativeBase/AlertDialog.js +86 -0
  19. package/lib/module/mappings/NativeBase/Button.js +86 -0
  20. package/lib/module/mappings/NativeBase/DataDisplay.js +41 -0
  21. package/lib/module/mappings/NativeBase/Feedback.js +67 -0
  22. package/lib/module/mappings/NativeBase/Layout.js +107 -0
  23. package/lib/module/mappings/NativeBase/Media.js +42 -0
  24. package/lib/module/mappings/NativeBase/Menu.js +104 -0
  25. package/lib/module/mappings/NativeBase/Modal.js +86 -0
  26. package/lib/module/mappings/NativeBase/Other.js +87 -0
  27. package/lib/module/mappings/NativeBase/Popover.js +92 -0
  28. package/lib/typescript/src/index.d.ts +102 -29
  29. package/lib/typescript/src/index.d.ts.map +1 -1
  30. package/lib/typescript/src/mappings/FlashList.d.ts +2 -130
  31. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  32. package/lib/typescript/src/mappings/FlatList.d.ts +0 -51
  33. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  34. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts +134 -0
  35. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts.map +1 -0
  36. package/lib/typescript/src/mappings/NativeBase/Button.d.ts +1 -0
  37. package/lib/typescript/src/mappings/NativeBase/Button.d.ts.map +1 -0
  38. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts +70 -0
  39. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts.map +1 -0
  40. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts +2 -0
  41. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts.map +1 -0
  42. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +146 -0
  43. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
  44. package/lib/typescript/src/mappings/NativeBase/Media.d.ts +48 -0
  45. package/lib/typescript/src/mappings/NativeBase/Media.d.ts.map +1 -0
  46. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts +227 -0
  47. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts.map +1 -0
  48. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts +133 -0
  49. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts.map +1 -0
  50. package/lib/typescript/src/mappings/NativeBase/Other.d.ts +179 -0
  51. package/lib/typescript/src/mappings/NativeBase/Other.d.ts.map +1 -0
  52. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts +136 -0
  53. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts.map +1 -0
  54. package/package.json +3 -3
  55. package/src/index.js +112 -31
  56. package/src/index.tsx +123 -43
  57. package/src/mappings/FlashList.js +31 -75
  58. package/src/mappings/FlashList.ts +30 -77
  59. package/src/mappings/FlatList.js +1 -15
  60. package/src/mappings/FlatList.ts +0 -16
  61. package/src/mappings/NativeBase/AlertDialog.js +103 -0
  62. package/src/mappings/NativeBase/AlertDialog.ts +118 -0
  63. package/src/mappings/NativeBase/Button.js +84 -0
  64. package/src/mappings/NativeBase/Button.ts +83 -0
  65. package/src/mappings/NativeBase/DataDisplay.js +54 -0
  66. package/src/mappings/NativeBase/DataDisplay.ts +64 -0
  67. package/src/mappings/NativeBase/Feedback.js +89 -0
  68. package/src/mappings/NativeBase/Feedback.ts +100 -0
  69. package/src/mappings/NativeBase/Layout.js +140 -0
  70. package/src/mappings/NativeBase/Layout.ts +152 -0
  71. package/src/mappings/NativeBase/Media.js +56 -0
  72. package/src/mappings/NativeBase/Media.ts +65 -0
  73. package/src/mappings/NativeBase/Menu.js +134 -0
  74. package/src/mappings/NativeBase/Menu.ts +150 -0
  75. package/src/mappings/NativeBase/Modal.js +103 -0
  76. package/src/mappings/NativeBase/Modal.ts +118 -0
  77. package/src/mappings/NativeBase/Other.js +123 -0
  78. package/src/mappings/NativeBase/Other.ts +139 -0
  79. package/src/mappings/NativeBase/Popover.js +123 -0
  80. package/src/mappings/NativeBase/Popover.ts +136 -0
package/src/index.js CHANGED
@@ -2,51 +2,132 @@ 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
- export { Link } from "./components/Text";
5
+ /** Replaced By NativeBase
6
+ * export { default as Avatar } from "./components/CircleImage";
7
+ * export { default as Container } from "./components/Container";
8
+ * export { default as FAB } from "./components/FAB";
9
+ * export {
10
+ Center,
11
+ Circle,
12
+ Square,
13
+ Row,
14
+ Stack,
15
+ Spacer,
16
+ } from "./components/Layout";
17
+ */
18
+ // BASIC
19
+ export { default as ScreenContainer } from "./components/ScreenContainer";
6
20
  export { default as Banner } from "./components/Banner";
21
+ // BUTTONS
7
22
  export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
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";
23
+ export { Link } from "./components/Text";
18
24
  export { default as IconButton } from "./components/IconButton";
19
- export { default as Image } from "./components/Image";
20
- export { default as SVG } from "./components/SVG";
25
+ export { default as Touchable } from "./components/Touchable";
26
+ export { default as ToggleButton } from "./components/ToggleButton";
27
+ // INPUTS
28
+ export { default as DatePicker } from "./components/DatePicker/DatePicker";
21
29
  export { default as NumberInput } from "./components/NumberInput";
22
- export { default as ScreenContainer } from "./components/ScreenContainer";
30
+ export { default as TextField } from "./components/TextField";
31
+ export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
32
+ export { default as Picker } from "./components/Picker/Picker";
33
+ // CONTROLS
34
+ export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
35
+ export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
36
+ export { default as Slider } from "./components/Slider";
37
+ export { default as Stepper } from "./components/Stepper";
23
38
  export { default as StarRating } from "./components/StarRating";
24
- export { default as Surface } from "./components/Surface";
25
39
  export { default as Switch, SwitchRow } from "./components/Switch";
26
- export { default as TextField } from "./components/TextField";
27
- export { default as ToggleButton } from "./components/ToggleButton";
28
- export { default as Touchable } from "./components/Touchable";
40
+ // MEDIA
41
+ export { default as SVG } from "./components/SVG";
42
+ export { default as Image } from "./components/Image";
43
+ // export { default as Avatar } from "./components/CircleImage"; Replaced by NativeBase
44
+ export { default as AvatarEdit } from "./components/AvatarEdit";
45
+ export { default as CircleImage } from "./components/CircleImage";
46
+ // SWIPER
47
+ export { Swiper, SwiperItem } from "./components/Swiper";
48
+ // CONTAINERS
29
49
  export { AccordionGroup, AccordionItem } from "./components/Accordion";
50
+ export { default as Surface } from "./components/Surface";
51
+ // ACTIONSHEET
30
52
  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";
34
- /* Deprecated: Fix or Delete! */
35
- export { default as CardBlock } from "./components/CardBlock";
36
- export { default as CardContainer } from "./components/CardContainer";
37
- export { default as CardContainerRating } from "./components/CardContainerRating";
38
- export { default as CardInline } from "./components/CardInline";
39
- export { default as DatePicker } from "./components/DatePicker/DatePicker";
53
+ // OTHER
54
+ export { default as Carousel } from "./components/Carousel";
55
+ export { default as Divider } from "./components/Divider";
40
56
  export { default as HeaderLarge } from "./components/HeaderLarge";
41
57
  export { default as HeaderMedium } from "./components/HeaderMedium";
42
58
  export { default as HeaderOverline } from "./components/HeaderOverline";
43
- export { default as Picker } from "./components/Picker/Picker";
44
59
  export { default as ProgressBar } from "./components/ProgressBar";
45
60
  export { default as ProgressCircle } from "./components/ProgressCircle";
46
61
  export { default as RowBodyIcon } from "./components/RowBodyIcon";
47
62
  export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
48
63
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
49
- export { default as Slider } from "./components/Slider";
50
- export { default as Stepper } from "./components/Stepper";
64
+ export { default as Card } from "./components/Card";
65
+ export { default as CardBlock } from "./components/CardBlock";
66
+ export { default as CardContainer } from "./components/CardContainer";
67
+ export { default as CardContainerRating } from "./components/CardContainerRating";
68
+ export { default as CardInline } from "./components/CardInline";
51
69
  export { useAuthState } from "./components/useAuthState";
52
- // a comment to fix sourcemap comment issue
70
+ /**
71
+ * NativeBase Components Jan 2023
72
+ *
73
+ * ALERT
74
+ * - AlertDialog
75
+ * - AlertDialog.Header
76
+ * - AlertDialog.Body
77
+ * - AlertDialog.Footer
78
+ * - AlertDialog.Content
79
+ * - AlertDialog.CloseButton
80
+ *
81
+ * FORMS
82
+ * - Button -- COMMENTED OUT
83
+ * - Button.Group -- COMMENTED OUT
84
+ * - Fab
85
+ *
86
+ * DATA DISPLAY
87
+ * - Badge
88
+ * - Divider
89
+ *
90
+ * FEEDBACK
91
+ * - Alert
92
+ * - Alert.Icon
93
+ * - Progress
94
+ *
95
+ * LAYOUT
96
+ * - AspectRatio
97
+ * - Box
98
+ * - Center
99
+ * - Square
100
+ * - Circle
101
+ * - Column
102
+ * - Container
103
+ * - Flex
104
+ * - Spacer
105
+ * - Row
106
+ * - Stack
107
+ * - ZStack
108
+ *
109
+ * MEDIA
110
+ * - Avatar
111
+ * - Avatar.Badge
112
+ * - Avatar.Group
113
+ *
114
+ * MENU
115
+ * - Menu
116
+ * - Menu.Item
117
+ * - Menu.Group
118
+ * - Menu.OptionGroup
119
+ * - Menu.ItemOption
120
+ * - Menu.Trigger
121
+ *
122
+ * MODAL
123
+ * - Modal
124
+ * - Modal.Content
125
+ * - Modal.Header
126
+ * - Modal.Footer
127
+ * - Modal.Body
128
+ * - Modal.CloseButton
129
+ *
130
+ * OTHER
131
+ * - Tooltip
132
+ *
133
+ * */
package/src/index.tsx CHANGED
@@ -3,39 +3,11 @@ export { withTheme, ThemeProvider } from "./theming";
3
3
  export { default as Provider } from "./Provider";
4
4
  export { default as DefaultTheme } from "./styles/DefaultTheme";
5
5
 
6
- export { Link } from "./components/Text";
7
- export { default as Banner } from "./components/Banner";
8
- export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
9
- export { default as Avatar } from "./components/CircleImage";
10
- export { default as AvatarEdit } from "./components/AvatarEdit";
11
- export { default as Card } from "./components/Card";
12
- export { default as Carousel } from "./components/Carousel";
13
- export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
14
- export { default as CircleImage } from "./components/CircleImage";
15
- export { default as Container } from "./components/Container";
16
- export { default as Divider } from "./components/Divider";
17
- export { default as FAB } from "./components/FAB";
18
- export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
19
- export { default as IconButton } from "./components/IconButton";
20
- export { default as Image } from "./components/Image";
21
- export { default as SVG } from "./components/SVG";
22
- export { default as NumberInput } from "./components/NumberInput";
23
- export { default as ScreenContainer } from "./components/ScreenContainer";
24
- export { default as StarRating } from "./components/StarRating";
25
- export { default as Surface } from "./components/Surface";
26
- export { default as Switch, SwitchRow } from "./components/Switch";
27
- export { default as TextField } from "./components/TextField";
28
- export { default as ToggleButton } from "./components/ToggleButton";
29
- export { default as Touchable } from "./components/Touchable";
30
- export { AccordionGroup, AccordionItem } from "./components/Accordion";
31
- export {
32
- ActionSheet,
33
- ActionSheetItem,
34
- ActionSheetCancel,
35
- } from "./components/ActionSheet";
36
- export { Swiper, SwiperItem } from "./components/Swiper";
37
-
38
- export {
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 {
39
11
  Center,
40
12
  Circle,
41
13
  Square,
@@ -43,31 +15,139 @@ export {
43
15
  Stack,
44
16
  Spacer,
45
17
  } from "./components/Layout";
18
+ */
19
+
20
+ // BASIC
21
+ export { default as ScreenContainer } from "./components/ScreenContainer";
22
+ export { default as Banner } from "./components/Banner";
23
+
24
+ // BUTTONS
25
+ export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
26
+ export { Link } from "./components/Text";
27
+ export { default as IconButton } from "./components/IconButton";
28
+ export { default as Touchable } from "./components/Touchable";
29
+ export { default as ToggleButton } from "./components/ToggleButton";
46
30
 
31
+ // INPUTS
32
+ export { default as DatePicker } from "./components/DatePicker/DatePicker";
33
+ export { default as NumberInput } from "./components/NumberInput";
34
+ export { default as TextField } from "./components/TextField";
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";
47
40
  export {
48
41
  RadioButton,
49
42
  RadioButtonGroup,
50
43
  RadioButtonRow,
51
44
  RadioButtonFieldGroup,
52
45
  } from "./components/RadioButton/index";
46
+ export { default as Slider } from "./components/Slider";
47
+ export { default as Stepper } from "./components/Stepper";
48
+ export { default as StarRating } from "./components/StarRating";
49
+ export { default as Switch, SwitchRow } from "./components/Switch";
53
50
 
54
- /* Deprecated: Fix or Delete! */
55
- export { default as CardBlock } from "./components/CardBlock";
56
- export { default as CardContainer } from "./components/CardContainer";
57
- export { default as CardContainerRating } from "./components/CardContainerRating";
58
- export { default as CardInline } from "./components/CardInline";
59
- export { default as DatePicker } from "./components/DatePicker/DatePicker";
51
+ // MEDIA
52
+ export { default as SVG } from "./components/SVG";
53
+ export { default as Image } from "./components/Image";
54
+ // export { default as Avatar } from "./components/CircleImage"; Replaced by NativeBase
55
+ export { default as AvatarEdit } from "./components/AvatarEdit";
56
+ export { default as CircleImage } from "./components/CircleImage";
57
+
58
+ // SWIPER
59
+ export { Swiper, SwiperItem } from "./components/Swiper";
60
+
61
+ // CONTAINERS
62
+ export { AccordionGroup, AccordionItem } from "./components/Accordion";
63
+ export { default as Surface } from "./components/Surface";
64
+
65
+ // ACTIONSHEET
66
+ export {
67
+ ActionSheet,
68
+ ActionSheetItem,
69
+ ActionSheetCancel,
70
+ } from "./components/ActionSheet";
71
+
72
+ // OTHER
73
+ export { default as Carousel } from "./components/Carousel";
74
+ export { default as Divider } from "./components/Divider";
60
75
  export { default as HeaderLarge } from "./components/HeaderLarge";
61
76
  export { default as HeaderMedium } from "./components/HeaderMedium";
62
77
  export { default as HeaderOverline } from "./components/HeaderOverline";
63
- export { default as Picker } from "./components/Picker/Picker";
64
78
  export { default as ProgressBar } from "./components/ProgressBar";
65
79
  export { default as ProgressCircle } from "./components/ProgressCircle";
66
80
  export { default as RowBodyIcon } from "./components/RowBodyIcon";
67
81
  export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
68
82
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
69
- export { default as Slider } from "./components/Slider";
70
- export { default as Stepper } from "./components/Stepper";
83
+ export { default as Card } from "./components/Card";
84
+ export { default as CardBlock } from "./components/CardBlock";
85
+ export { default as CardContainer } from "./components/CardContainer";
86
+ export { default as CardContainerRating } from "./components/CardContainerRating";
87
+ export { default as CardInline } from "./components/CardInline";
71
88
  export { useAuthState } from "./components/useAuthState";
72
89
 
73
- // a comment to fix sourcemap comment issue
90
+ /**
91
+ * NativeBase Components Jan 2023
92
+ *
93
+ * ALERT
94
+ * - AlertDialog
95
+ * - AlertDialog.Header
96
+ * - AlertDialog.Body
97
+ * - AlertDialog.Footer
98
+ * - AlertDialog.Content
99
+ * - AlertDialog.CloseButton
100
+ *
101
+ * FORMS
102
+ * - Button -- COMMENTED OUT
103
+ * - Button.Group -- COMMENTED OUT
104
+ * - Fab
105
+ *
106
+ * DATA DISPLAY
107
+ * - Badge
108
+ * - Divider
109
+ *
110
+ * FEEDBACK
111
+ * - Alert
112
+ * - Alert.Icon
113
+ * - Progress
114
+ *
115
+ * LAYOUT
116
+ * - AspectRatio
117
+ * - Box
118
+ * - Center
119
+ * - Square
120
+ * - Circle
121
+ * - Column
122
+ * - Container
123
+ * - Flex
124
+ * - Spacer
125
+ * - Row
126
+ * - Stack
127
+ * - ZStack
128
+ *
129
+ * MEDIA
130
+ * - Avatar
131
+ * - Avatar.Badge
132
+ * - Avatar.Group
133
+ *
134
+ * MENU
135
+ * - Menu
136
+ * - Menu.Item
137
+ * - Menu.Group
138
+ * - Menu.OptionGroup
139
+ * - Menu.ItemOption
140
+ * - Menu.Trigger
141
+ *
142
+ * MODAL
143
+ * - Modal
144
+ * - Modal.Content
145
+ * - Modal.Header
146
+ * - Modal.Footer
147
+ * - Modal.Body
148
+ * - Modal.CloseButton
149
+ *
150
+ * OTHER
151
+ * - Tooltip
152
+ *
153
+ * */
@@ -1,77 +1,33 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, } from "@draftbit/types";
2
- export const SEED_DATA = [
3
- {
4
- name: "Masonry List",
5
- tag: "MasonryFlashList",
6
- description: "Masonry Flashlist by Shopify",
7
- packageName: "@shopify/flash-list",
8
- category: COMPONENT_TYPES.data,
9
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
10
- layout: {
11
- flex: 1,
12
- },
13
- triggers: [
14
- Triggers.OnRefresh,
15
- Triggers.OnEndReached,
16
- Triggers.OnEndReachedThreshold,
17
- Triggers.OnViewableItemsChanged,
18
- ],
19
- props: {
20
- onRefresh: createActionProp(),
21
- onEndReached: createActionProp(),
22
- onEndReachedThreshold: createActionProp(),
23
- onViewableItemsChanged: createActionProp(),
24
- numColumns: createNumColumnsType({
25
- editable: true,
26
- }),
27
- estimatedItemSize: createNumberProp({
28
- group: GROUPS.basic,
29
- label: "Est. Item Size",
30
- description: "Approximate size of the items before rendering.",
31
- defaultValue: 50,
32
- step: 1,
33
- precision: 0,
34
- }),
35
- optimizeItemArrangement: createStaticBoolProp({
36
- label: "Optimize Item Arrangement",
37
- 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.",
38
- }),
39
- },
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "FlashList",
4
+ tag: "FlashList",
5
+ description: "Flashlist by Shopify",
6
+ packageName: "@shopify/flash-list",
7
+ category: COMPONENT_TYPES.data,
8
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
+ layout: {
10
+ flex: 1,
40
11
  },
41
- {
42
- name: "FlashList",
43
- tag: "FlashList",
44
- description: "Flashlist by Shopify",
45
- packageName: "@shopify/flash-list",
46
- category: COMPONENT_TYPES.data,
47
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
48
- layout: {
49
- flex: 1,
50
- },
51
- props: {
52
- onRefresh: createActionProp(),
53
- onEndReached: createActionProp(),
54
- onEndReachedThreshold: createActionProp(),
55
- onViewableItemsChanged: createActionProp(),
56
- estimatedItemSize: createNumberProp({
57
- group: GROUPS.basic,
58
- label: "Est. Item Size",
59
- description: "Approximate size of the items before rendering.",
60
- defaultValue: 50,
61
- step: 1,
62
- precision: 0,
63
- }),
64
- horizontal: createStaticBoolProp({
65
- label: "Horizontal",
66
- description: "Render list horizontally",
67
- }),
68
- inverted: createStaticBoolProp({
69
- label: "Inverted",
70
- description: "If true, reverses the direction.",
71
- }),
72
- numColumns: createNumColumnsType({
73
- editable: true,
74
- }),
75
- },
12
+ props: {
13
+ estimatedItemSize: createNumberProp({
14
+ group: GROUPS.basic,
15
+ label: "Est. Item Size",
16
+ description: "Approximate size of the items before rendering.",
17
+ defaultValue: 50,
18
+ step: 1,
19
+ precision: 0,
20
+ }),
21
+ horizontal: createStaticBoolProp({
22
+ label: "Horizontal",
23
+ description: "Render list horizontally",
24
+ }),
25
+ inverted: createStaticBoolProp({
26
+ label: "Inverted",
27
+ description: "If true, reverses the direction.",
28
+ }),
29
+ numColumns: createNumColumnsType({
30
+ editable: true,
31
+ }),
76
32
  },
77
- ];
33
+ };
@@ -5,84 +5,37 @@ import {
5
5
  createNumberProp,
6
6
  CONTAINER_COMPONENT_STYLES_SECTIONS,
7
7
  GROUPS,
8
- Triggers,
9
- createActionProp,
10
8
  } from "@draftbit/types";
11
9
 
12
- export const SEED_DATA = [
13
- {
14
- name: "Masonry List",
15
- tag: "MasonryFlashList",
16
- description: "Masonry Flashlist by Shopify",
17
- packageName: "@shopify/flash-list",
18
- category: COMPONENT_TYPES.data,
19
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
20
- layout: {
21
- flex: 1,
22
- },
23
- triggers: [
24
- Triggers.OnRefresh,
25
- Triggers.OnEndReached,
26
- Triggers.OnEndReachedThreshold,
27
- Triggers.OnViewableItemsChanged,
28
- ],
29
- props: {
30
- onRefresh: createActionProp(),
31
- onEndReached: createActionProp(),
32
- onEndReachedThreshold: createActionProp(),
33
- onViewableItemsChanged: createActionProp(),
34
- numColumns: createNumColumnsType({
35
- editable: true,
36
- }),
37
- estimatedItemSize: createNumberProp({
38
- group: GROUPS.basic,
39
- label: "Est. Item Size",
40
- description: "Approximate size of the items before rendering.",
41
- defaultValue: 50,
42
- step: 1,
43
- precision: 0,
44
- }),
45
- optimizeItemArrangement: createStaticBoolProp({
46
- label: "Optimize Item Arrangement",
47
- description:
48
- "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.",
49
- }),
50
- },
10
+ export const SEED_DATA = {
11
+ name: "FlashList",
12
+ tag: "FlashList",
13
+ description: "Flashlist by Shopify",
14
+ packageName: "@shopify/flash-list",
15
+ category: COMPONENT_TYPES.data,
16
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
17
+ layout: {
18
+ flex: 1,
51
19
  },
52
- {
53
- name: "FlashList",
54
- tag: "FlashList",
55
- description: "Flashlist by Shopify",
56
- packageName: "@shopify/flash-list",
57
- category: COMPONENT_TYPES.data,
58
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
59
- layout: {
60
- flex: 1,
61
- },
62
- props: {
63
- onRefresh: createActionProp(),
64
- onEndReached: createActionProp(),
65
- onEndReachedThreshold: createActionProp(),
66
- onViewableItemsChanged: createActionProp(),
67
- estimatedItemSize: createNumberProp({
68
- group: GROUPS.basic,
69
- label: "Est. Item Size",
70
- description: "Approximate size of the items before rendering.",
71
- defaultValue: 50,
72
- step: 1,
73
- precision: 0,
74
- }),
75
- horizontal: createStaticBoolProp({
76
- label: "Horizontal",
77
- description: "Render list horizontally",
78
- }),
79
- inverted: createStaticBoolProp({
80
- label: "Inverted",
81
- description: "If true, reverses the direction.",
82
- }),
83
- numColumns: createNumColumnsType({
84
- editable: true,
85
- }),
86
- },
20
+ props: {
21
+ estimatedItemSize: createNumberProp({
22
+ group: GROUPS.basic,
23
+ label: "Est. Item Size",
24
+ description: "Approximate size of the items before rendering.",
25
+ defaultValue: 50,
26
+ step: 1,
27
+ precision: 0,
28
+ }),
29
+ horizontal: createStaticBoolProp({
30
+ label: "Horizontal",
31
+ description: "Render list horizontally",
32
+ }),
33
+ inverted: createStaticBoolProp({
34
+ label: "Inverted",
35
+ description: "If true, reverses the direction.",
36
+ }),
37
+ numColumns: createNumColumnsType({
38
+ editable: true,
39
+ }),
87
40
  },
88
- ];
41
+ };
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, Triggers, createActionProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "List",
4
4
  tag: "FlatList",
@@ -8,17 +8,7 @@ export const SEED_DATA = {
8
8
  layout: {
9
9
  flex: 1,
10
10
  },
11
- triggers: [
12
- Triggers.OnRefresh,
13
- Triggers.OnEndReached,
14
- Triggers.OnEndReachedThreshold,
15
- Triggers.OnViewableItemsChanged,
16
- ],
17
11
  props: {
18
- onRefresh: createActionProp(),
19
- onEndReached: createActionProp(),
20
- onEndReachedThreshold: createActionProp(),
21
- onViewableItemsChanged: createActionProp(),
22
12
  horizontal: createStaticBoolProp({
23
13
  label: "Horizontal",
24
14
  description: "Render list horizontally",
@@ -30,9 +20,5 @@ export const SEED_DATA = {
30
20
  numColumns: createNumColumnsType({
31
21
  editable: true,
32
22
  }),
33
- initialNumToRender: createStaticBoolProp({
34
- label: "Initial Num To Render",
35
- descriprion: "How many items to render in the initial batch",
36
- }),
37
23
  },
38
24
  };
@@ -3,8 +3,6 @@ import {
3
3
  createNumColumnsType,
4
4
  createStaticBoolProp,
5
5
  CONTAINER_COMPONENT_STYLES_SECTIONS,
6
- Triggers,
7
- createActionProp,
8
6
  } from "@draftbit/types";
9
7
 
10
8
  export const SEED_DATA = {
@@ -16,17 +14,7 @@ export const SEED_DATA = {
16
14
  layout: {
17
15
  flex: 1,
18
16
  },
19
- triggers: [
20
- Triggers.OnRefresh,
21
- Triggers.OnEndReached,
22
- Triggers.OnEndReachedThreshold,
23
- Triggers.OnViewableItemsChanged,
24
- ],
25
17
  props: {
26
- onRefresh: createActionProp(),
27
- onEndReached: createActionProp(),
28
- onEndReachedThreshold: createActionProp(),
29
- onViewableItemsChanged: createActionProp(),
30
18
  horizontal: createStaticBoolProp({
31
19
  label: "Horizontal",
32
20
  description: "Render list horizontally",
@@ -38,9 +26,5 @@ export const SEED_DATA = {
38
26
  numColumns: createNumColumnsType({
39
27
  editable: true,
40
28
  }),
41
- initialNumToRender: createStaticBoolProp({
42
- label: "Initial Num To Render",
43
- descriprion: "How many items to render in the initial batch",
44
- }),
45
29
  },
46
30
  };