@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.
Files changed (80) hide show
  1. package/lib/commonjs/components/Checkbox/CheckboxGroup.js +2 -17
  2. package/lib/commonjs/index.js +82 -25
  3. package/lib/commonjs/mappings/FlashList.js +45 -2
  4. package/lib/commonjs/mappings/FlatList.js +12 -0
  5. package/lib/module/index.js +31 -121
  6. package/lib/module/mappings/FlashList.js +46 -3
  7. package/lib/module/mappings/FlatList.js +13 -1
  8. package/lib/typescript/src/index.d.ts +29 -102
  9. package/lib/typescript/src/index.d.ts.map +1 -1
  10. package/lib/typescript/src/mappings/FlashList.d.ts +112 -2
  11. package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
  12. package/lib/typescript/src/mappings/FlatList.d.ts +42 -0
  13. package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
  14. package/package.json +3 -3
  15. package/src/index.js +31 -112
  16. package/src/index.tsx +43 -123
  17. package/src/mappings/FlashList.js +77 -31
  18. package/src/mappings/FlashList.ts +82 -30
  19. package/src/mappings/FlatList.js +13 -1
  20. package/src/mappings/FlatList.ts +16 -0
  21. package/lib/commonjs/mappings/NativeBase/AlertDialog.js +0 -93
  22. package/lib/commonjs/mappings/NativeBase/Button.js +0 -84
  23. package/lib/commonjs/mappings/NativeBase/DataDisplay.js +0 -48
  24. package/lib/commonjs/mappings/NativeBase/Feedback.js +0 -74
  25. package/lib/commonjs/mappings/NativeBase/Layout.js +0 -114
  26. package/lib/commonjs/mappings/NativeBase/Media.js +0 -49
  27. package/lib/commonjs/mappings/NativeBase/Menu.js +0 -111
  28. package/lib/commonjs/mappings/NativeBase/Modal.js +0 -93
  29. package/lib/commonjs/mappings/NativeBase/Other.js +0 -94
  30. package/lib/commonjs/mappings/NativeBase/Popover.js +0 -99
  31. package/lib/module/mappings/NativeBase/AlertDialog.js +0 -86
  32. package/lib/module/mappings/NativeBase/Button.js +0 -86
  33. package/lib/module/mappings/NativeBase/DataDisplay.js +0 -41
  34. package/lib/module/mappings/NativeBase/Feedback.js +0 -67
  35. package/lib/module/mappings/NativeBase/Layout.js +0 -107
  36. package/lib/module/mappings/NativeBase/Media.js +0 -42
  37. package/lib/module/mappings/NativeBase/Menu.js +0 -104
  38. package/lib/module/mappings/NativeBase/Modal.js +0 -86
  39. package/lib/module/mappings/NativeBase/Other.js +0 -87
  40. package/lib/module/mappings/NativeBase/Popover.js +0 -92
  41. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts +0 -134
  42. package/lib/typescript/src/mappings/NativeBase/AlertDialog.d.ts.map +0 -1
  43. package/lib/typescript/src/mappings/NativeBase/Button.d.ts +0 -1
  44. package/lib/typescript/src/mappings/NativeBase/Button.d.ts.map +0 -1
  45. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts +0 -70
  46. package/lib/typescript/src/mappings/NativeBase/DataDisplay.d.ts.map +0 -1
  47. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts +0 -2
  48. package/lib/typescript/src/mappings/NativeBase/Feedback.d.ts.map +0 -1
  49. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -146
  50. package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +0 -1
  51. package/lib/typescript/src/mappings/NativeBase/Media.d.ts +0 -48
  52. package/lib/typescript/src/mappings/NativeBase/Media.d.ts.map +0 -1
  53. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts +0 -227
  54. package/lib/typescript/src/mappings/NativeBase/Menu.d.ts.map +0 -1
  55. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts +0 -133
  56. package/lib/typescript/src/mappings/NativeBase/Modal.d.ts.map +0 -1
  57. package/lib/typescript/src/mappings/NativeBase/Other.d.ts +0 -179
  58. package/lib/typescript/src/mappings/NativeBase/Other.d.ts.map +0 -1
  59. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts +0 -136
  60. package/lib/typescript/src/mappings/NativeBase/Popover.d.ts.map +0 -1
  61. package/src/mappings/NativeBase/AlertDialog.js +0 -103
  62. package/src/mappings/NativeBase/AlertDialog.ts +0 -118
  63. package/src/mappings/NativeBase/Button.js +0 -84
  64. package/src/mappings/NativeBase/Button.ts +0 -83
  65. package/src/mappings/NativeBase/DataDisplay.js +0 -54
  66. package/src/mappings/NativeBase/DataDisplay.ts +0 -64
  67. package/src/mappings/NativeBase/Feedback.js +0 -89
  68. package/src/mappings/NativeBase/Feedback.ts +0 -100
  69. package/src/mappings/NativeBase/Layout.js +0 -140
  70. package/src/mappings/NativeBase/Layout.ts +0 -152
  71. package/src/mappings/NativeBase/Media.js +0 -56
  72. package/src/mappings/NativeBase/Media.ts +0 -65
  73. package/src/mappings/NativeBase/Menu.js +0 -134
  74. package/src/mappings/NativeBase/Menu.ts +0 -150
  75. package/src/mappings/NativeBase/Modal.js +0 -103
  76. package/src/mappings/NativeBase/Modal.ts +0 -118
  77. package/src/mappings/NativeBase/Other.js +0 -123
  78. package/src/mappings/NativeBase/Other.ts +0 -139
  79. package/src/mappings/NativeBase/Popover.js +0 -123
  80. package/src/mappings/NativeBase/Popover.ts +0 -136
package/src/index.tsx CHANGED
@@ -3,11 +3,39 @@ 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
- /** 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 {
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 {
11
39
  Center,
12
40
  Circle,
13
41
  Square,
@@ -15,139 +43,31 @@ export { default as DefaultTheme } from "./styles/DefaultTheme";
15
43
  Stack,
16
44
  Spacer,
17
45
  } 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";
30
46
 
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";
40
47
  export {
41
48
  RadioButton,
42
49
  RadioButtonGroup,
43
50
  RadioButtonRow,
44
51
  RadioButtonFieldGroup,
45
52
  } 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";
50
-
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
53
 
72
- // OTHER
73
- export { default as Carousel } from "./components/Carousel";
74
- export { default as Divider } from "./components/Divider";
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";
75
60
  export { default as HeaderLarge } from "./components/HeaderLarge";
76
61
  export { default as HeaderMedium } from "./components/HeaderMedium";
77
62
  export { default as HeaderOverline } from "./components/HeaderOverline";
63
+ export { default as Picker } from "./components/Picker/Picker";
78
64
  export { default as ProgressBar } from "./components/ProgressBar";
79
65
  export { default as ProgressCircle } from "./components/ProgressCircle";
80
66
  export { default as RowBodyIcon } from "./components/RowBodyIcon";
81
67
  export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
82
68
  export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
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";
69
+ export { default as Slider } from "./components/Slider";
70
+ export { default as Stepper } from "./components/Stepper";
88
71
  export { useAuthState } from "./components/useAuthState";
89
72
 
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
- * */
73
+ // a comment to fix sourcemap comment issue
@@ -1,33 +1,79 @@
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,
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, } 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: [Triggers.OnRefresh, Triggers.OnEndReached],
14
+ props: {
15
+ onRefresh: createActionProp(),
16
+ onEndReached: createActionProp(),
17
+ numColumns: createNumColumnsType({
18
+ editable: true,
19
+ }),
20
+ estimatedItemSize: createNumberProp({
21
+ group: GROUPS.basic,
22
+ label: "Est. Item Size",
23
+ description: "Approximate size of the items before rendering.",
24
+ defaultValue: 50,
25
+ step: 1,
26
+ precision: 0,
27
+ }),
28
+ optimizeItemArrangement: createStaticBoolProp({
29
+ label: "Optimize Item Arrangement",
30
+ 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.",
31
+ }),
32
+ onEndReachedThreshold: createStaticNumberProp({
33
+ label: "End Reached Threshold",
34
+ 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.",
35
+ defaultValue: 0.5,
36
+ }),
37
+ },
11
38
  },
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
- }),
39
+ {
40
+ name: "FlashList",
41
+ tag: "FlashList",
42
+ description: "Flashlist by Shopify",
43
+ packageName: "@shopify/flash-list",
44
+ category: COMPONENT_TYPES.data,
45
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
46
+ layout: {
47
+ flex: 1,
48
+ },
49
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
50
+ props: {
51
+ onRefresh: createActionProp(),
52
+ onEndReached: createActionProp(),
53
+ estimatedItemSize: createNumberProp({
54
+ group: GROUPS.basic,
55
+ label: "Est. Item Size",
56
+ description: "Approximate size of the items before rendering.",
57
+ defaultValue: 50,
58
+ step: 1,
59
+ precision: 0,
60
+ }),
61
+ horizontal: createStaticBoolProp({
62
+ label: "Horizontal",
63
+ description: "Render list horizontally",
64
+ }),
65
+ inverted: createStaticBoolProp({
66
+ label: "Inverted",
67
+ description: "If true, reverses the direction.",
68
+ }),
69
+ numColumns: createNumColumnsType({
70
+ editable: true,
71
+ }),
72
+ onEndReachedThreshold: createStaticNumberProp({
73
+ label: "End Reached Threshold",
74
+ 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.",
75
+ defaultValue: 0.5,
76
+ }),
77
+ },
32
78
  },
33
- };
79
+ ];
@@ -5,37 +5,89 @@ import {
5
5
  createNumberProp,
6
6
  CONTAINER_COMPONENT_STYLES_SECTIONS,
7
7
  GROUPS,
8
+ Triggers,
9
+ createActionProp,
10
+ createStaticNumberProp,
8
11
  } from "@draftbit/types";
9
12
 
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,
13
+ export const SEED_DATA = [
14
+ {
15
+ name: "Masonry List",
16
+ tag: "MasonryFlashList",
17
+ description: "Masonry Flashlist by Shopify",
18
+ packageName: "@shopify/flash-list",
19
+ category: COMPONENT_TYPES.data,
20
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
21
+ layout: {
22
+ flex: 1,
23
+ },
24
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
25
+ props: {
26
+ onRefresh: createActionProp(),
27
+ onEndReached: createActionProp(),
28
+ numColumns: createNumColumnsType({
29
+ editable: true,
30
+ }),
31
+ estimatedItemSize: createNumberProp({
32
+ group: GROUPS.basic,
33
+ label: "Est. Item Size",
34
+ description: "Approximate size of the items before rendering.",
35
+ defaultValue: 50,
36
+ step: 1,
37
+ precision: 0,
38
+ }),
39
+ optimizeItemArrangement: createStaticBoolProp({
40
+ label: "Optimize Item Arrangement",
41
+ description:
42
+ "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.",
43
+ }),
44
+ onEndReachedThreshold: createStaticNumberProp({
45
+ label: "End Reached Threshold",
46
+ description:
47
+ "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.",
48
+ defaultValue: 0.5,
49
+ }),
50
+ },
19
51
  },
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
- }),
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
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
63
+ props: {
64
+ onRefresh: createActionProp(),
65
+ onEndReached: createActionProp(),
66
+ estimatedItemSize: createNumberProp({
67
+ group: GROUPS.basic,
68
+ label: "Est. Item Size",
69
+ description: "Approximate size of the items before rendering.",
70
+ defaultValue: 50,
71
+ step: 1,
72
+ precision: 0,
73
+ }),
74
+ horizontal: createStaticBoolProp({
75
+ label: "Horizontal",
76
+ description: "Render list horizontally",
77
+ }),
78
+ inverted: createStaticBoolProp({
79
+ label: "Inverted",
80
+ description: "If true, reverses the direction.",
81
+ }),
82
+ numColumns: createNumColumnsType({
83
+ editable: true,
84
+ }),
85
+ onEndReachedThreshold: createStaticNumberProp({
86
+ label: "End Reached Threshold",
87
+ description:
88
+ "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.",
89
+ defaultValue: 0.5,
90
+ }),
91
+ },
40
92
  },
41
- };
93
+ ];
@@ -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",
@@ -20,5 +23,14 @@ export const SEED_DATA = {
20
23
  numColumns: createNumColumnsType({
21
24
  editable: true,
22
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,
34
+ }),
23
35
  },
24
36
  };
@@ -3,6 +3,9 @@ import {
3
3
  createNumColumnsType,
4
4
  createStaticBoolProp,
5
5
  CONTAINER_COMPONENT_STYLES_SECTIONS,
6
+ Triggers,
7
+ createActionProp,
8
+ createStaticNumberProp,
6
9
  } from "@draftbit/types";
7
10
 
8
11
  export const SEED_DATA = {
@@ -14,7 +17,10 @@ export const SEED_DATA = {
14
17
  layout: {
15
18
  flex: 1,
16
19
  },
20
+ triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
17
21
  props: {
22
+ onRefresh: createActionProp(),
23
+ onEndReached: createActionProp(),
18
24
  horizontal: createStaticBoolProp({
19
25
  label: "Horizontal",
20
26
  description: "Render list horizontally",
@@ -26,5 +32,15 @@ export const SEED_DATA = {
26
32
  numColumns: createNumColumnsType({
27
33
  editable: true,
28
34
  }),
35
+ initialNumToRender: createStaticBoolProp({
36
+ label: "Initial Num To Render",
37
+ descriprion: "How many items to render in the initial batch",
38
+ }),
39
+ onEndReachedThreshold: createStaticNumberProp({
40
+ label: "End Reached Threshold",
41
+ description:
42
+ "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.",
43
+ defaultValue: 0.5,
44
+ }),
29
45
  },
30
46
  };
@@ -1,93 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SEED_DATA = void 0;
7
- var _types = require("@draftbit/types");
8
- const SHARED_SEED_DATA = {
9
- category: _types.COMPONENT_TYPES.NBAlert,
10
- packageName: "native-base",
11
- stylesPanelSections: [_types.StylesPanelSections.LayoutFlexItems, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.LayoutContent, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Effects],
12
- layout: {}
13
- };
14
- const SEED_DATA = [{
15
- name: "Alert Dialog",
16
- tag: "AlertDialog",
17
- description: "AlertDialog is used when a user needs to be interrupted with a mandatory confirmation or call-to-action. AlertDialog composes Modal so you can use all its props.",
18
- ...SHARED_SEED_DATA,
19
- triggers: [_types.Triggers.OnClose, _types.Triggers.OnOpen],
20
- props: {
21
- isOpen: (0, _types.createBoolProp)({
22
- label: "Is Open",
23
- description: "If true, the modal will open. Useful for controllable state behavior."
24
- }),
25
- defaultIsOpen: (0, _types.createStaticBoolProp)({
26
- label: "Default Is Open",
27
- description: "If true, the modal will be opened by default."
28
- }),
29
- avoidKeyboard: (0, _types.createStaticBoolProp)({
30
- label: "Avoid Keyboard",
31
- description: "If true and the keyboard is opened, the modal will move up equivalent to the keyboard height.",
32
- defaultValue: false
33
- }),
34
- closeOnOverlayClick: (0, _types.createStaticBoolProp)({
35
- label: "Close on Overlay Click",
36
- description: "If true, the modal will close when the overlay is clicked.",
37
- defaultValue: true
38
- }),
39
- isKeyboardDismissable: (0, _types.createStaticBoolProp)({
40
- label: "Is Keyboard Dismissable",
41
- description: "If true, the modal will close when the keyboard is dismissed.",
42
- defaultValue: true
43
- }),
44
- backdropVisible: (0, _types.createStaticBoolProp)({
45
- label: "Backdrop Visible",
46
- description: "If true, the backdrop element is visible.",
47
- defaultValue: true
48
- }),
49
- animationPreset: (0, _types.createTextEnumProp)({
50
- label: "Animation Preset",
51
- description: "The animation preset to use for the modal.",
52
- options: ["slide", "fade", "none"],
53
- defaultValue: "fade"
54
- }),
55
- useRNModal: (0, _types.createStaticBoolProp)({
56
- label: "Use RN Modal",
57
- description: "If true, the modal will use the RN Modal component."
58
- }),
59
- onOpen: (0, _types.createActionProp)(),
60
- onClose: (0, _types.createActionProp)()
61
- }
62
- }, {
63
- name: "Alert Header",
64
- tag: "AlertDialog.Header",
65
- description: "Contains the title announced by screen readers.",
66
- ...SHARED_SEED_DATA,
67
- props: {}
68
- }, {
69
- name: "Alert Body",
70
- tag: "AlertDialog.Body",
71
- description: "Contains the description announced by screen readers.",
72
- ...SHARED_SEED_DATA,
73
- props: {}
74
- }, {
75
- name: "Alert Footer",
76
- tag: "AlertDialog.Footer",
77
- description: "Contains the actions of the dialog.",
78
- ...SHARED_SEED_DATA,
79
- props: {}
80
- }, {
81
- name: "Alert Content",
82
- tag: "AlertDialog.Content",
83
- description: "The wrapper for the alert dialog's content.",
84
- ...SHARED_SEED_DATA,
85
- props: {}
86
- }, {
87
- name: "Alert Close Button",
88
- tag: "AlertDialog.CloseButton",
89
- description: "The button that closes the dialog",
90
- ...SHARED_SEED_DATA,
91
- props: {}
92
- }];
93
- exports.SEED_DATA = SEED_DATA;
@@ -1,84 +0,0 @@
1
- /* Temporarily Commented Out
2
-
3
-
4
- import {
5
- COMPONENT_TYPES,
6
- StylesPanelSections,
7
- createTextEnumProp,
8
- createBoolProp,
9
- createIconProp,
10
- } from "@draftbit/types";
11
-
12
- const SHARED_SEED_DATA = {
13
- category: COMPONENT_TYPES.NBForms,
14
- packageName: "native-base",
15
- stylesPanelSections: [
16
- StylesPanelSections.LayoutFlexItems,
17
- StylesPanelSections.LayoutSelectedItem,
18
- StylesPanelSections.LayoutContent,
19
- StylesPanelSections.Background,
20
- StylesPanelSections.Size,
21
- StylesPanelSections.MarginsAndPaddings,
22
- StylesPanelSections.Position,
23
- StylesPanelSections.Borders,
24
- StylesPanelSections.Effects,
25
- ],
26
- layout: {},
27
- triggers: {},
28
- };
29
-
30
- export const SEED_DATA = [
31
- {
32
- name: "Button",
33
- tag: "Button",
34
- description:
35
- "The Button component triggers an event or an action. Examples can be submitting forms and deleting a data point.",
36
- ...SHARED_SEED_DATA,
37
- props: {
38
- isLoading: createBoolProp({
39
- label: "Loading",
40
- description: "If true, the button will show a spinner.",
41
- }),
42
- isDisabled: createBoolProp({
43
- label: "Disabled",
44
- description: "If true, the button will be disabled.",
45
- }),
46
- leftIcon: createIconProp({
47
- label: "Left Icon",
48
- description: "The icon to display on the left side of the button",
49
- }),
50
- rightIcon: createIconProp({
51
- label: "Right Icon",
52
- description: "The icon to display on the right side of the button",
53
- }),
54
- spinnerPlacement: createTextEnumProp({
55
- label: "Spinner Placement",
56
- description: "The placement of the spinner",
57
- options: ["start", "end"],
58
- defaultValue: "start",
59
- }),
60
- },
61
- },
62
- {
63
- name: "Button Group",
64
- tag: "ButtonGroup",
65
- description:
66
- "Used to group buttons whose actions are related, with an option to flush them together.",
67
- ...SHARED_SEED_DATA,
68
- allowChildren: true,
69
- props: {
70
- direction: createTextEnumProp({
71
- label: "Direction",
72
- description: "The direction of the button group",
73
- options: ["row", "column"],
74
- defaultValue: "row",
75
- }),
76
- isAttached: createBoolProp({
77
- label: "Attached",
78
- description: "If true, the buttons will be attached",
79
- }),
80
- },
81
- },
82
- ];
83
- */
84
- "use strict";/