@draftbit/core 46.2.3 → 46.2.4-dedb7a.0

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.
@@ -7,196 +7,6 @@ exports.SEED_DATA = void 0;
7
7
 
8
8
  var _types = require("@draftbit/types");
9
9
 
10
- const TEXT_AREA_PROPS = {
11
- allowFontScaling: {
12
- group: _types.GROUPS.advanced,
13
- label: "Allow Font Scaling",
14
- description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
15
- editable: true,
16
- required: false,
17
- defaultValue: null,
18
- formType: _types.FORM_TYPES.boolean,
19
- propType: _types.PROP_TYPES.BOOLEAN
20
- },
21
- autoCapitalize: {
22
- group: _types.GROUPS.advanced,
23
- label: "Auto Capitalize",
24
- description: "Can automatically capitalize sentences, words, and characters (Default: none).",
25
- editable: true,
26
- required: false,
27
- defaultValue: null,
28
- options: ["none", "sentences", "words", "characters"],
29
- formType: _types.FORM_TYPES.flatArray,
30
- propType: _types.PROP_TYPES.STRING
31
- },
32
- autoCorrect: {
33
- group: _types.GROUPS.advanced,
34
- label: "Auto Correct",
35
- description: "Enables auto correction",
36
- editable: true,
37
- required: false,
38
- defaultValue: null,
39
- formType: _types.FORM_TYPES.boolean,
40
- propType: _types.PROP_TYPES.BOOLEAN
41
- },
42
- autoFocus: {
43
- group: _types.GROUPS.basic,
44
- label: "Auto Focus",
45
- description: "Focuses the input on load in and brings up the keyboard",
46
- editable: true,
47
- required: false,
48
- defaultValue: null,
49
- formType: _types.FORM_TYPES.boolean,
50
- propType: _types.PROP_TYPES.BOOLEAN
51
- },
52
- caretHidden: {
53
- group: _types.GROUPS.advanced,
54
- label: "Hide Caret",
55
- description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
56
- editable: true,
57
- required: false,
58
- defaultValue: null,
59
- formType: _types.FORM_TYPES.boolean,
60
- propType: _types.PROP_TYPES.BOOLEAN
61
- },
62
- contextMenuHidden: {
63
- group: _types.GROUPS.advanced,
64
- label: "Hide Context Menu",
65
- description: "Hides the system context menu (Default: false)",
66
- editable: true,
67
- required: false,
68
- defaultValue: null,
69
- formType: _types.FORM_TYPES.boolean,
70
- propType: _types.PROP_TYPES.BOOLEAN
71
- },
72
- editable: {
73
- group: _types.GROUPS.advanced,
74
- label: "Editable",
75
- description: "If false, the text is not editable",
76
- editable: true,
77
- required: false,
78
- defaultValue: true,
79
- formType: _types.FORM_TYPES.boolean,
80
- propType: _types.PROP_TYPES.BOOLEAN
81
- },
82
- keyboardAppearance: {
83
- group: _types.GROUPS.advanced,
84
- label: "Keyboard Appearance",
85
- description: "Determines the color of the keyboard.(iOS Only)",
86
- editable: true,
87
- required: false,
88
- defaultValue: null,
89
- options: ["default", "light", "dark"],
90
- formType: _types.FORM_TYPES.flatArray,
91
- propType: _types.PROP_TYPES.STRING
92
- },
93
- keyboardType: {
94
- group: _types.GROUPS.advanced,
95
- label: "Keyboard Type",
96
- description: "Determines what keyboard is given to the user.",
97
- editable: true,
98
- required: false,
99
- defaultValue: null,
100
- options: ["default", "email-address", "numeric", "phone-pad", "ascii-capable", "numbers-and-punctuation", "url", "number-pad", "name-phone-pad", "decimal-pad", "twitter", "web-search", "visible-password"],
101
- formType: _types.FORM_TYPES.flatArray,
102
- propType: _types.PROP_TYPES.STRING
103
- },
104
- maxLength: {
105
- group: _types.GROUPS.basic,
106
- label: "Max Length",
107
- description: "Limits the input to a set number of characters.",
108
- editable: true,
109
- required: false,
110
- defaultValue: null,
111
- min: 0,
112
- step: 1,
113
- precision: 0,
114
- formType: _types.FORM_TYPES.number,
115
- propType: _types.PROP_TYPES.NUMBER
116
- },
117
- placeholder: {
118
- group: _types.GROUPS.data,
119
- label: "Placeholder Text",
120
- description: "The text that is shown on load when no value is available.",
121
- editable: true,
122
- required: false,
123
- defaultValue: "Enter a value...",
124
- formType: _types.FORM_TYPES.string,
125
- propType: _types.PROP_TYPES.STRING
126
- },
127
- placeholderTextColor: {
128
- group: _types.GROUPS.basic,
129
- label: "Placeholder Text Color",
130
- description: "The color of the placeholder text.",
131
- editable: true,
132
- required: false,
133
- defaultValue: null,
134
- formType: _types.FORM_TYPES.color,
135
- propType: _types.PROP_TYPES.STRING
136
- },
137
- returnKeyLabel: {
138
- group: _types.GROUPS.advanced,
139
- label: "Return Key Label",
140
- description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
141
- editable: true,
142
- required: false,
143
- defaultValue: null,
144
- formType: _types.FORM_TYPES.string,
145
- propType: _types.PROP_TYPES.STRING
146
- },
147
- returnKeyType: {
148
- group: _types.GROUPS.advanced,
149
- label: "Return Key Type",
150
- description: "Determines how the return key should look like",
151
- editable: true,
152
- required: false,
153
- defaultValue: null,
154
- options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
155
- formType: _types.FORM_TYPES.flatArray,
156
- propType: _types.PROP_TYPES.STRING
157
- },
158
- secureTextEntry: {
159
- group: _types.GROUPS.basic,
160
- label: "Password Input?",
161
- description: "Hides the characters with a *, useful for passwords and other sensitive information.",
162
- editable: true,
163
- required: false,
164
- defaultValue: null,
165
- formType: _types.FORM_TYPES.boolean,
166
- propType: _types.PROP_TYPES.BOOLEAN
167
- },
168
- selectionColor: {
169
- group: _types.GROUPS.advanced,
170
- label: "Selection Color",
171
- description: "Color of the highlighted portion when selecting.",
172
- editable: true,
173
- required: false,
174
- defaultValue: null,
175
- formType: _types.FORM_TYPES.color,
176
- propType: _types.PROP_TYPES.STRING
177
- },
178
- selectTextOnFocus: {
179
- group: _types.GROUPS.advanced,
180
- label: "Select Text on Focus",
181
- description: "If true, all the text will automatically be selected on focus",
182
- editable: true,
183
- required: false,
184
- defaultValue: null,
185
- formType: _types.FORM_TYPES.boolean,
186
- propType: _types.PROP_TYPES.BOOLEAN
187
- },
188
- textAlignVertical: {
189
- group: _types.GROUPS.advanced,
190
- label: "Aligns text on the vertical axis",
191
- description: "Move the text around in the given component.",
192
- options: ["auto", "top", "bottom", "center"],
193
- editable: true,
194
- required: false,
195
- defaultValue: "top",
196
- formType: _types.FORM_TYPES.flatArray,
197
- propType: _types.PROP_TYPES.STRING
198
- }
199
- };
200
10
  const SEED_DATA = {
201
11
  name: "Text Area",
202
12
  tag: "TextInput",
@@ -215,9 +25,194 @@ const SEED_DATA = {
215
25
  borderRadius: 8
216
26
  },
217
27
  triggers: [_types.Triggers.OnChangeText],
218
- props: { ...TEXT_AREA_PROPS,
219
- placeholder: { ...TEXT_AREA_PROPS.placeholder,
220
- defaultValue: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s."
28
+ props: {
29
+ allowFontScaling: {
30
+ group: _types.GROUPS.advanced,
31
+ label: "Allow Font Scaling",
32
+ description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
33
+ editable: true,
34
+ required: false,
35
+ defaultValue: null,
36
+ formType: _types.FORM_TYPES.boolean,
37
+ propType: _types.PROP_TYPES.BOOLEAN
38
+ },
39
+ autoCapitalize: {
40
+ group: _types.GROUPS.advanced,
41
+ label: "Auto Capitalize",
42
+ description: "Can automatically capitalize sentences, words, and characters (Default: none).",
43
+ editable: true,
44
+ required: false,
45
+ defaultValue: null,
46
+ options: ["none", "sentences", "words", "characters"],
47
+ formType: _types.FORM_TYPES.flatArray,
48
+ propType: _types.PROP_TYPES.STRING
49
+ },
50
+ autoCorrect: {
51
+ group: _types.GROUPS.advanced,
52
+ label: "Auto Correct",
53
+ description: "Enables auto correction",
54
+ editable: true,
55
+ required: false,
56
+ defaultValue: null,
57
+ formType: _types.FORM_TYPES.boolean,
58
+ propType: _types.PROP_TYPES.BOOLEAN
59
+ },
60
+ autoFocus: {
61
+ group: _types.GROUPS.basic,
62
+ label: "Auto Focus",
63
+ description: "Focuses the input on load in and brings up the keyboard",
64
+ editable: true,
65
+ required: false,
66
+ defaultValue: null,
67
+ formType: _types.FORM_TYPES.boolean,
68
+ propType: _types.PROP_TYPES.BOOLEAN
69
+ },
70
+ caretHidden: {
71
+ group: _types.GROUPS.advanced,
72
+ label: "Hide Caret",
73
+ description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
74
+ editable: true,
75
+ required: false,
76
+ defaultValue: null,
77
+ formType: _types.FORM_TYPES.boolean,
78
+ propType: _types.PROP_TYPES.BOOLEAN
79
+ },
80
+ contextMenuHidden: {
81
+ group: _types.GROUPS.advanced,
82
+ label: "Hide Context Menu",
83
+ description: "Hides the system context menu (Default: false)",
84
+ editable: true,
85
+ required: false,
86
+ defaultValue: null,
87
+ formType: _types.FORM_TYPES.boolean,
88
+ propType: _types.PROP_TYPES.BOOLEAN
89
+ },
90
+ editable: {
91
+ group: _types.GROUPS.advanced,
92
+ label: "Editable",
93
+ description: "If false, the text is not editable",
94
+ editable: true,
95
+ required: false,
96
+ defaultValue: true,
97
+ formType: _types.FORM_TYPES.boolean,
98
+ propType: _types.PROP_TYPES.BOOLEAN
99
+ },
100
+ keyboardAppearance: {
101
+ group: _types.GROUPS.advanced,
102
+ label: "Keyboard Appearance",
103
+ description: "Determines the color of the keyboard.(iOS Only)",
104
+ editable: true,
105
+ required: false,
106
+ defaultValue: null,
107
+ options: ["default", "light", "dark"],
108
+ formType: _types.FORM_TYPES.flatArray,
109
+ propType: _types.PROP_TYPES.STRING
110
+ },
111
+ keyboardType: {
112
+ group: _types.GROUPS.advanced,
113
+ label: "Keyboard Type",
114
+ description: "Determines what keyboard is given to the user.",
115
+ editable: true,
116
+ required: false,
117
+ defaultValue: null,
118
+ options: ["default", "email-address", "numeric", "phone-pad", "ascii-capable", "numbers-and-punctuation", "url", "number-pad", "name-phone-pad", "decimal-pad", "twitter", "web-search", "visible-password"],
119
+ formType: _types.FORM_TYPES.flatArray,
120
+ propType: _types.PROP_TYPES.STRING
121
+ },
122
+ maxLength: {
123
+ group: _types.GROUPS.basic,
124
+ label: "Max Length",
125
+ description: "Limits the input to a set number of characters.",
126
+ editable: true,
127
+ required: false,
128
+ defaultValue: null,
129
+ min: 0,
130
+ step: 1,
131
+ precision: 0,
132
+ formType: _types.FORM_TYPES.number,
133
+ propType: _types.PROP_TYPES.NUMBER
134
+ },
135
+ placeholder: {
136
+ group: _types.GROUPS.data,
137
+ label: "Placeholder Text",
138
+ description: "The text that is shown on load when no value is available.",
139
+ editable: true,
140
+ required: false,
141
+ defaultValue: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.",
142
+ formType: _types.FORM_TYPES.string,
143
+ propType: _types.PROP_TYPES.STRING
144
+ },
145
+ placeholderTextColor: {
146
+ group: _types.GROUPS.basic,
147
+ label: "Placeholder Text Color",
148
+ description: "The color of the placeholder text.",
149
+ editable: true,
150
+ required: false,
151
+ defaultValue: null,
152
+ formType: _types.FORM_TYPES.color,
153
+ propType: _types.PROP_TYPES.STRING
154
+ },
155
+ returnKeyLabel: {
156
+ group: _types.GROUPS.advanced,
157
+ label: "Return Key Label",
158
+ description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
159
+ editable: true,
160
+ required: false,
161
+ defaultValue: null,
162
+ formType: _types.FORM_TYPES.string,
163
+ propType: _types.PROP_TYPES.STRING
164
+ },
165
+ returnKeyType: {
166
+ group: _types.GROUPS.advanced,
167
+ label: "Return Key Type",
168
+ description: "Determines how the return key should look like",
169
+ editable: true,
170
+ required: false,
171
+ defaultValue: null,
172
+ options: ["done", "go", "next", "search", "send", "none", "previous", "default", "emergency-call", "google", "join", "route", "yahoo"],
173
+ formType: _types.FORM_TYPES.flatArray,
174
+ propType: _types.PROP_TYPES.STRING
175
+ },
176
+ secureTextEntry: {
177
+ group: _types.GROUPS.basic,
178
+ label: "Password Input?",
179
+ description: "Hides the characters with a *, useful for passwords and other sensitive information.",
180
+ editable: true,
181
+ required: false,
182
+ defaultValue: null,
183
+ formType: _types.FORM_TYPES.boolean,
184
+ propType: _types.PROP_TYPES.BOOLEAN
185
+ },
186
+ selectionColor: {
187
+ group: _types.GROUPS.advanced,
188
+ label: "Selection Color",
189
+ description: "Color of the highlighted portion when selecting.",
190
+ editable: true,
191
+ required: false,
192
+ defaultValue: null,
193
+ formType: _types.FORM_TYPES.color,
194
+ propType: _types.PROP_TYPES.STRING
195
+ },
196
+ selectTextOnFocus: {
197
+ group: _types.GROUPS.advanced,
198
+ label: "Select Text on Focus",
199
+ description: "If true, all the text will automatically be selected on focus",
200
+ editable: true,
201
+ required: false,
202
+ defaultValue: null,
203
+ formType: _types.FORM_TYPES.boolean,
204
+ propType: _types.PROP_TYPES.BOOLEAN
205
+ },
206
+ textAlignVertical: {
207
+ group: _types.GROUPS.advanced,
208
+ label: "Aligns text on the vertical axis",
209
+ description: "Move the text around in the given component.",
210
+ options: ["auto", "top", "bottom", "center"],
211
+ editable: true,
212
+ required: false,
213
+ defaultValue: "top",
214
+ formType: _types.FORM_TYPES.flatArray,
215
+ propType: _types.PROP_TYPES.STRING
221
216
  },
222
217
  multiline: {
223
218
  label: "Multiline",
@@ -7,7 +7,7 @@ exports.SEED_DATA = void 0;
7
7
 
8
8
  var _types = require("@draftbit/types");
9
9
 
10
- const TEXT_FIELD_PROPS = {
10
+ const SEED_DATA_PROPS = {
11
11
  allowFontScaling: {
12
12
  group: _types.GROUPS.advanced,
13
13
  label: "Allow Font Scaling",
@@ -130,7 +130,7 @@ const TEXT_FIELD_PROPS = {
130
130
  description: "The text that is shown on load when no value is available.",
131
131
  editable: true,
132
132
  required: false,
133
- defaultValue: "Enter a value...",
133
+ defaultValue: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
134
134
  formType: _types.FORM_TYPES.string,
135
135
  propType: _types.PROP_TYPES.STRING
136
136
  },
@@ -194,9 +194,7 @@ const TEXT_FIELD_PROPS = {
194
194
  defaultValue: null,
195
195
  formType: _types.FORM_TYPES.boolean,
196
196
  propType: _types.PROP_TYPES.BOOLEAN
197
- }
198
- };
199
- const SEED_DATA_PROPS = { ...TEXT_FIELD_PROPS,
197
+ },
200
198
  label: {
201
199
  group: _types.GROUPS.data,
202
200
  label: "Label",
@@ -312,9 +310,6 @@ const SEED_DATA = [{
312
310
  supports_list_render: false,
313
311
  triggers: SEED_DATA_TRIGGERS,
314
312
  props: { ...SEED_DATA_PROPS,
315
- placeholder: { ...TEXT_FIELD_PROPS.placeholder,
316
- defaultValue: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."
317
- },
318
313
  type: {
319
314
  label: "Appearance",
320
315
  description: "Type of Datepicker",