@draftbit/core 43.4.20-eef94a.0 → 43.5.1-ff0d44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/lib/commonjs/components/Accordion/AccordionItem.js +21 -5
  2. package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
  3. package/lib/commonjs/components/Banner.js +4 -3
  4. package/lib/commonjs/components/Banner.js.map +1 -1
  5. package/lib/commonjs/components/DeprecatedButton.js +19 -4
  6. package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
  7. package/lib/commonjs/components/DeprecatedCardWrapper.js +14 -2
  8. package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
  9. package/lib/commonjs/components/Divider.js +3 -13
  10. package/lib/commonjs/components/Divider.js.map +1 -1
  11. package/lib/commonjs/mappings/ActivityIndicator.js.map +1 -1
  12. package/lib/commonjs/mappings/Banner.js +42 -0
  13. package/lib/commonjs/mappings/Banner.js.map +1 -0
  14. package/lib/commonjs/mappings/KeyboardAwareScrollView.js +5 -0
  15. package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -1
  16. package/lib/commonjs/mappings/MapCallout.js +2 -1
  17. package/lib/commonjs/mappings/MapCallout.js.map +1 -1
  18. package/lib/commonjs/mappings/MapMarker.js +2 -1
  19. package/lib/commonjs/mappings/MapMarker.js.map +1 -1
  20. package/lib/commonjs/mappings/MapView.js +128 -0
  21. package/lib/commonjs/mappings/MapView.js.map +1 -0
  22. package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
  23. package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
  24. package/lib/commonjs/mappings/RowHeadlineImageCaption.js.map +1 -1
  25. package/lib/module/components/Banner.js +4 -3
  26. package/lib/module/components/Banner.js.map +1 -1
  27. package/lib/module/components/HeaderMedium.js.map +1 -1
  28. package/lib/module/mappings/Banner.js +33 -0
  29. package/lib/module/mappings/Banner.js.map +1 -0
  30. package/lib/module/mappings/KeyboardAwareScrollView.js +5 -0
  31. package/lib/module/mappings/KeyboardAwareScrollView.js.map +1 -1
  32. package/lib/module/mappings/MapCallout.js +2 -1
  33. package/lib/module/mappings/MapCallout.js.map +1 -1
  34. package/lib/module/mappings/MapMarker.js +2 -1
  35. package/lib/module/mappings/MapMarker.js.map +1 -1
  36. package/lib/module/mappings/MapView.js +119 -0
  37. package/lib/module/mappings/MapView.js.map +1 -0
  38. package/lib/typescript/src/components/Banner.d.ts +2 -1
  39. package/lib/typescript/src/mappings/Banner.d.ts +48 -0
  40. package/lib/typescript/src/mappings/KeyboardAwareScrollView.d.ts +10 -0
  41. package/lib/typescript/src/mappings/MapCallout.d.ts +1 -0
  42. package/lib/typescript/src/mappings/MapMarker.d.ts +1 -0
  43. package/lib/typescript/src/mappings/MapView.d.ts +159 -0
  44. package/package.json +3 -3
  45. package/src/components/Banner.js +2 -2
  46. package/src/components/Banner.tsx +6 -4
  47. package/src/mappings/Banner.js +32 -0
  48. package/src/mappings/Banner.ts +40 -0
  49. package/src/mappings/KeyboardAwareScrollView.js +5 -0
  50. package/src/mappings/KeyboardAwareScrollView.ts +5 -0
  51. package/src/mappings/MapCallout.js +2 -1
  52. package/src/mappings/MapCallout.ts +2 -1
  53. package/src/mappings/MapMarker.js +2 -1
  54. package/src/mappings/MapMarker.ts +2 -1
  55. package/src/mappings/MapView.js +125 -0
  56. package/src/mappings/MapView.ts +135 -0
@@ -0,0 +1,48 @@
1
+ export declare const SEED_DATA: {
2
+ name: string;
3
+ tag: string;
4
+ category: string;
5
+ props: {
6
+ icon: {
7
+ label: string;
8
+ description: string;
9
+ formType: string;
10
+ propType: string;
11
+ defaultValue: string;
12
+ required: boolean;
13
+ editable: boolean;
14
+ group: string;
15
+ };
16
+ content: any;
17
+ initiallyVisible: {
18
+ label: string;
19
+ description: string;
20
+ formType: string;
21
+ propType: string;
22
+ defaultValue: boolean;
23
+ editable: boolean;
24
+ required: boolean;
25
+ group: string;
26
+ };
27
+ dismissable: {
28
+ label: string;
29
+ description: string;
30
+ formType: string;
31
+ propType: string;
32
+ defaultValue: boolean;
33
+ editable: boolean;
34
+ required: boolean;
35
+ group: string;
36
+ };
37
+ buttonColor: {
38
+ group: string;
39
+ label: string;
40
+ description: string;
41
+ editable: boolean;
42
+ required: boolean;
43
+ defaultValue: null;
44
+ formType: string;
45
+ propType: string;
46
+ };
47
+ };
48
+ };
@@ -78,5 +78,15 @@ export declare const SEED_DATA: {
78
78
  required: boolean;
79
79
  group: string;
80
80
  };
81
+ showsVerticalScrollIndicator: {
82
+ label: string;
83
+ description: string;
84
+ formType: string;
85
+ propType: string;
86
+ defaultValue: boolean;
87
+ editable: boolean;
88
+ required: boolean;
89
+ group: string;
90
+ };
81
91
  };
82
92
  };
@@ -1,6 +1,7 @@
1
1
  export declare const SEED_DATA: {
2
2
  name: string;
3
3
  tag: string;
4
+ packageName: string;
4
5
  description: string;
5
6
  category: string;
6
7
  layout: {};
@@ -1,6 +1,7 @@
1
1
  export declare const SEED_DATA: {
2
2
  name: string;
3
3
  tag: string;
4
+ packageName: string;
4
5
  description: string;
5
6
  category: string;
6
7
  layout: {};
@@ -0,0 +1,159 @@
1
+ export declare const SEED_DATA: {
2
+ name: string;
3
+ tag: string;
4
+ packageName: string;
5
+ description: string;
6
+ category: string;
7
+ layout: {
8
+ height: string;
9
+ width: string;
10
+ };
11
+ props: {
12
+ provider: {
13
+ formType: string;
14
+ propType: string;
15
+ editable: boolean;
16
+ group: string;
17
+ label: string;
18
+ description: string;
19
+ required: boolean;
20
+ defaultValue: null;
21
+ options: string[];
22
+ };
23
+ latitude: {
24
+ label: string;
25
+ description: string;
26
+ formType: string;
27
+ propType: string;
28
+ group: string;
29
+ defaultValue: null;
30
+ editable: boolean;
31
+ required: boolean;
32
+ step: number;
33
+ };
34
+ longitude: {
35
+ label: string;
36
+ description: string;
37
+ formType: string;
38
+ propType: string;
39
+ group: string;
40
+ defaultValue: null;
41
+ editable: boolean;
42
+ required: boolean;
43
+ step: number;
44
+ };
45
+ latitudeDelta: {
46
+ label: string;
47
+ description: string;
48
+ formType: string;
49
+ propType: string;
50
+ group: string;
51
+ defaultValue: null;
52
+ editable: boolean;
53
+ required: boolean;
54
+ step: number;
55
+ };
56
+ longitudeDelta: {
57
+ label: string;
58
+ description: string;
59
+ formType: string;
60
+ propType: string;
61
+ group: string;
62
+ defaultValue: null;
63
+ editable: boolean;
64
+ required: boolean;
65
+ step: number;
66
+ };
67
+ zoom: {
68
+ label: string;
69
+ description: string;
70
+ formType: string;
71
+ propType: string;
72
+ group: string;
73
+ defaultValue: null;
74
+ editable: boolean;
75
+ required: boolean;
76
+ step: number;
77
+ };
78
+ mapType: {
79
+ label: string;
80
+ description: string;
81
+ group: string;
82
+ formType: string;
83
+ propType: string;
84
+ required: boolean;
85
+ defaultValue: null;
86
+ options: string[];
87
+ };
88
+ zoomEnabled: {
89
+ label: string;
90
+ description: string;
91
+ formType: string;
92
+ propType: string;
93
+ defaultValue: boolean;
94
+ editable: boolean;
95
+ required: boolean;
96
+ group: string;
97
+ };
98
+ showsCompass: {
99
+ label: string;
100
+ description: string;
101
+ formType: string;
102
+ propType: string;
103
+ defaultValue: boolean;
104
+ editable: boolean;
105
+ required: boolean;
106
+ group: string;
107
+ };
108
+ rotateEnabled: {
109
+ label: string;
110
+ description: string;
111
+ formType: string;
112
+ propType: string;
113
+ defaultValue: boolean;
114
+ editable: boolean;
115
+ required: boolean;
116
+ group: string;
117
+ };
118
+ scrollEnabled: {
119
+ label: string;
120
+ description: string;
121
+ formType: string;
122
+ propType: string;
123
+ defaultValue: boolean;
124
+ editable: boolean;
125
+ required: boolean;
126
+ group: string;
127
+ };
128
+ loadingEnabled: {
129
+ label: string;
130
+ description: string;
131
+ formType: string;
132
+ propType: string;
133
+ defaultValue: boolean;
134
+ editable: boolean;
135
+ required: boolean;
136
+ group: string;
137
+ };
138
+ loadingIndicatorColor: {
139
+ group: string;
140
+ label: string;
141
+ description: string;
142
+ editable: boolean;
143
+ required: boolean;
144
+ defaultValue: null;
145
+ formType: string;
146
+ propType: string;
147
+ };
148
+ loadingBackgroundColor: {
149
+ group: string;
150
+ label: string;
151
+ description: string;
152
+ editable: boolean;
153
+ required: boolean;
154
+ defaultValue: null;
155
+ formType: string;
156
+ propType: string;
157
+ };
158
+ };
159
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "43.4.20-eef94a.0+eef94af0",
3
+ "version": "43.5.1-ff0d44.1+ff0d44d3",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^43.4.10",
44
+ "@draftbit/types": "^43.5.1-ff0d44.1+ff0d44d3",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.1.7",
@@ -80,5 +80,5 @@
80
80
  ]
81
81
  ]
82
82
  },
83
- "gitHead": "eef94af0b92f27fd97ed272312832c4c5505af42"
83
+ "gitHead": "ff0d44d3b453317be8884b1fda35c9fe850e7c17"
84
84
  }
@@ -5,7 +5,7 @@ import shadow from "../styles/shadow";
5
5
  import { withTheme } from "../theming";
6
6
  const ELEVATION = 1;
7
7
  const DEFAULT_MAX_WIDTH = 960;
8
- const Banner = ({ initiallyVisible, icon, content, contentStyle, dismissable, style, theme, Icon, ...rest }) => {
8
+ const Banner = ({ initiallyVisible = true, dismissable = true, icon, buttonColor, content, contentStyle, style, theme, Icon, ...rest }) => {
9
9
  const [visible, setVisible] = React.useState(initiallyVisible);
10
10
  React.useEffect(() => {
11
11
  if (initiallyVisible) {
@@ -69,7 +69,7 @@ const Banner = ({ initiallyVisible, icon, content, contentStyle, dismissable, st
69
69
  React.createElement(Icon, { name: icon, size: 40 }))) : null,
70
70
  React.createElement(Text, { style: [styles.message, { color: theme.colors.text }], accessibilityLiveRegion: visible ? "polite" : "none", accessibilityRole: "alert" }, content)),
71
71
  dismissable ? (React.createElement(View, { style: styles.actions },
72
- React.createElement(Button, { color: theme.colors.primary, title: "Close", onPress: () => setVisible(false) }))) : null))));
72
+ React.createElement(Button, { color: buttonColor || theme.colors.primary, title: "Close", onPress: () => setVisible(false) }))) : null))));
73
73
  };
74
74
  const styles = StyleSheet.create({
75
75
  container: {
@@ -20,8 +20,9 @@ const DEFAULT_MAX_WIDTH = 960;
20
20
  type Props = {
21
21
  initiallyVisible: boolean;
22
22
  dismissable: boolean;
23
+ buttonColor?: string;
23
24
  icon?: string;
24
- content: string;
25
+ content?: string;
25
26
  contentStyle?: StyleProp<ViewStyle>;
26
27
  style?: StyleProp<ViewStyle>;
27
28
  ref?: React.RefObject<View>;
@@ -43,11 +44,12 @@ type NativeEvent = {
43
44
  };
44
45
 
45
46
  const Banner: React.FC<Props> = ({
46
- initiallyVisible,
47
+ initiallyVisible = true,
48
+ dismissable = true,
47
49
  icon,
50
+ buttonColor,
48
51
  content,
49
52
  contentStyle,
50
- dismissable,
51
53
  style,
52
54
  theme,
53
55
  Icon,
@@ -151,7 +153,7 @@ const Banner: React.FC<Props> = ({
151
153
  {dismissable ? (
152
154
  <View style={styles.actions}>
153
155
  <Button
154
- color={theme.colors.primary}
156
+ color={buttonColor || theme.colors.primary}
155
157
  title="Close"
156
158
  onPress={() => setVisible(false)}
157
159
  />
@@ -0,0 +1,32 @@
1
+ import { COMPONENT_TYPES, createIconProp, createBoolProp, createColorProp, createTextProp, GROUPS, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Banner",
4
+ tag: "Banner",
5
+ category: COMPONENT_TYPES.button,
6
+ props: {
7
+ icon: createIconProp({
8
+ defaultValue: null,
9
+ required: false,
10
+ }),
11
+ content: createTextProp({
12
+ label: "Content",
13
+ description: "Banner text content",
14
+ }),
15
+ initiallyVisible: createBoolProp({
16
+ group: GROUPS.basic,
17
+ label: "Initially visible",
18
+ description: "Whether the banner should be visible",
19
+ defaultValue: true,
20
+ }),
21
+ dismissable: createBoolProp({
22
+ group: GROUPS.basic,
23
+ label: "Dismissable",
24
+ description: "Whether the banner should be able to be closed",
25
+ defaultValue: true,
26
+ }),
27
+ buttonColor: createColorProp({
28
+ label: "Button color",
29
+ defaultValue: "primary",
30
+ }),
31
+ },
32
+ };
@@ -0,0 +1,40 @@
1
+ import {
2
+ COMPONENT_TYPES,
3
+ createIconProp,
4
+ createBoolProp,
5
+ createColorProp,
6
+ createTextProp,
7
+ GROUPS,
8
+ } from "@draftbit/types";
9
+
10
+ export const SEED_DATA = {
11
+ name: "Banner",
12
+ tag: "Banner",
13
+ category: COMPONENT_TYPES.button,
14
+ props: {
15
+ icon: createIconProp({
16
+ defaultValue: null,
17
+ required: false,
18
+ }),
19
+ content: createTextProp({
20
+ label: "Content",
21
+ description: "Banner text content",
22
+ }),
23
+ initiallyVisible: createBoolProp({
24
+ group: GROUPS.basic,
25
+ label: "Initially visible",
26
+ description: "Whether the banner should be visible",
27
+ defaultValue: true,
28
+ }),
29
+ dismissable: createBoolProp({
30
+ group: GROUPS.basic,
31
+ label: "Dismissable",
32
+ description: "Whether the banner should be able to be closed",
33
+ defaultValue: true,
34
+ }),
35
+ buttonColor: createColorProp({
36
+ label: "Button color",
37
+ defaultValue: "primary",
38
+ }),
39
+ },
40
+ };
@@ -34,5 +34,10 @@ export const SEED_DATA = {
34
34
  label: "Enable On Android",
35
35
  description: "Enable Android Support",
36
36
  }),
37
+ showsVerticalScrollIndicator: createStaticBoolProp({
38
+ label: "Shows Vertical Scroll Indicator",
39
+ description: "Show or hide the vertical scroll indicator",
40
+ defaultValue: true,
41
+ }),
37
42
  },
38
43
  };
@@ -44,5 +44,10 @@ export const SEED_DATA = {
44
44
  label: "Enable On Android",
45
45
  description: "Enable Android Support",
46
46
  }),
47
+ showsVerticalScrollIndicator: createStaticBoolProp({
48
+ label: "Shows Vertical Scroll Indicator",
49
+ description: "Show or hide the vertical scroll indicator",
50
+ defaultValue: true,
51
+ }),
47
52
  },
48
53
  };
@@ -2,8 +2,9 @@ import { COMPONENT_TYPES, createActionProp, createBoolProp, GROUPS, } from "@dra
2
2
  export const SEED_DATA = {
3
3
  name: "Map Callout",
4
4
  tag: "MapCallout",
5
+ packageName: "@draftbit/maps",
5
6
  description: "An info window to display on top of a marker when it is clicked",
6
- category: COMPONENT_TYPES.deprecated,
7
+ category: COMPONENT_TYPES.media,
7
8
  layout: {},
8
9
  props: {
9
10
  onPress: createActionProp({
@@ -8,9 +8,10 @@ import {
8
8
  export const SEED_DATA = {
9
9
  name: "Map Callout",
10
10
  tag: "MapCallout",
11
+ packageName: "@draftbit/maps",
11
12
  description:
12
13
  "An info window to display on top of a marker when it is clicked",
13
- category: COMPONENT_TYPES.deprecated,
14
+ category: COMPONENT_TYPES.media,
14
15
  layout: {},
15
16
  props: {
16
17
  onPress: createActionProp({
@@ -2,8 +2,9 @@ import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, cre
2
2
  export const SEED_DATA = {
3
3
  name: "Map Marker",
4
4
  tag: "MapMarker",
5
+ packageName: "@draftbit/maps",
5
6
  description: "A marker to show inside map view",
6
- category: COMPONENT_TYPES.deprecated,
7
+ category: COMPONENT_TYPES.media,
7
8
  layout: {},
8
9
  props: {
9
10
  latitude: createNumberProp({
@@ -10,8 +10,9 @@ import {
10
10
  export const SEED_DATA = {
11
11
  name: "Map Marker",
12
12
  tag: "MapMarker",
13
+ packageName: "@draftbit/maps",
13
14
  description: "A marker to show inside map view",
14
- category: COMPONENT_TYPES.deprecated,
15
+ category: COMPONENT_TYPES.media,
15
16
  layout: {},
16
17
  props: {
17
18
  latitude: createNumberProp({
@@ -0,0 +1,125 @@
1
+ import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, GROUPS, FORM_TYPES, PROP_TYPES, } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Map View",
4
+ tag: "MapView",
5
+ packageName: "@draftbit/maps",
6
+ description: "A map view",
7
+ category: COMPONENT_TYPES.media,
8
+ layout: {
9
+ height: "100%",
10
+ width: "100%",
11
+ },
12
+ props: {
13
+ provider: {
14
+ formType: FORM_TYPES.flatArray,
15
+ propType: PROP_TYPES.STRING,
16
+ editable: true,
17
+ group: GROUPS.basic,
18
+ label: "Provider",
19
+ description: "The maps provider",
20
+ required: false,
21
+ defaultValue: null,
22
+ options: ["google"],
23
+ },
24
+ latitude: createNumberProp({
25
+ label: "Initial Latitude",
26
+ description: "The longitude for the map's initial region",
27
+ required: false,
28
+ precision: 6,
29
+ min: -90,
30
+ max: 90,
31
+ defaultValue: 37.40241,
32
+ }),
33
+ longitude: createNumberProp({
34
+ label: "Initial Longitude",
35
+ description: "The longitude for the map's initial region",
36
+ required: false,
37
+ precision: 6,
38
+ min: -180,
39
+ max: 180,
40
+ defaultValue: -122.12125,
41
+ }),
42
+ latitudeDelta: createNumberProp({
43
+ label: "Init Latitude Delta",
44
+ description: "The latitude delta for the map's initial region",
45
+ required: false,
46
+ precision: 4,
47
+ defaultValue: 1,
48
+ }),
49
+ longitudeDelta: createNumberProp({
50
+ label: "Init Longitude Delta",
51
+ description: "The longitude delta for the map's initial region",
52
+ required: false,
53
+ precision: 4,
54
+ defaultValue: 1,
55
+ }),
56
+ zoom: createNumberProp({
57
+ label: "Initial Zoom (Web)",
58
+ description: "The initial zoom of the map",
59
+ required: true,
60
+ precision: 0,
61
+ step: 1,
62
+ defaultValue: 8,
63
+ }),
64
+ mapType: {
65
+ label: "Map Type",
66
+ description: "The type of map to show",
67
+ group: GROUPS.basic,
68
+ formType: FORM_TYPES.flatArray,
69
+ propType: PROP_TYPES.STRING,
70
+ required: false,
71
+ defaultValue: null,
72
+ options: [
73
+ "standard",
74
+ "satellite",
75
+ "hybrid",
76
+ "terrain",
77
+ "none",
78
+ "mutedStandard",
79
+ ],
80
+ },
81
+ zoomEnabled: createBoolProp({
82
+ label: "Zoom Enabled",
83
+ description: "Whether zooming is enabled (native only)",
84
+ group: GROUPS.basic,
85
+ required: false,
86
+ defaultValue: true,
87
+ }),
88
+ showsCompass: createBoolProp({
89
+ label: "Shows Compass",
90
+ description: "Whether compass is shown",
91
+ group: GROUPS.basic,
92
+ required: false,
93
+ defaultValue: false,
94
+ }),
95
+ rotateEnabled: createBoolProp({
96
+ label: "Rotate Enabled",
97
+ description: "Whether rotating the map is enabled",
98
+ group: GROUPS.basic,
99
+ required: false,
100
+ defaultValue: true,
101
+ }),
102
+ scrollEnabled: createBoolProp({
103
+ label: "Scroll Enabled",
104
+ description: "Whether scrolling the map view is enabled",
105
+ group: GROUPS.basic,
106
+ required: false,
107
+ defaultValue: true,
108
+ }),
109
+ loadingEnabled: createBoolProp({
110
+ label: "Loading Enabled",
111
+ description: "If true a loading indicator will show while the map is loading",
112
+ group: GROUPS.basic,
113
+ required: false,
114
+ defaultValue: true,
115
+ }),
116
+ loadingIndicatorColor: createColorProp({
117
+ label: "Loading Indicator Color",
118
+ description: "Color of the loading indicator",
119
+ }),
120
+ loadingBackgroundColor: createColorProp({
121
+ label: "Loading Background Color",
122
+ description: "Color of the background to show while the map is loading",
123
+ }),
124
+ },
125
+ };