@draftbit/core 46.4.4-cc754a.2 → 46.4.4-d53e01.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/mappings/DatePickerInput.js +91 -0
- package/lib/commonjs/mappings/TextArea.js +14 -3
- package/lib/commonjs/mappings/TextField.js +14 -4
- package/lib/commonjs/mappings/TextInput.js +14 -3
- package/lib/module/mappings/DatePickerInput.js +82 -0
- package/lib/module/mappings/TextArea.js +15 -4
- package/lib/module/mappings/TextField.js +14 -4
- package/lib/module/mappings/TextInput.js +15 -4
- package/lib/typescript/src/mappings/DatePickerInput.d.ts +87 -0
- package/lib/typescript/src/mappings/DatePickerInput.d.ts.map +1 -0
- package/lib/typescript/src/mappings/TextArea.d.ts +21 -1
- package/lib/typescript/src/mappings/TextArea.d.ts.map +1 -1
- package/lib/typescript/src/mappings/TextField.d.ts +22 -2
- package/lib/typescript/src/mappings/TextField.d.ts.map +1 -1
- package/lib/typescript/src/mappings/TextInput.d.ts +21 -1
- package/lib/typescript/src/mappings/TextInput.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/mappings/DatePickerInput.js +93 -0
- package/src/mappings/DatePickerInput.ts +104 -0
- package/src/mappings/TextArea.js +15 -4
- package/src/mappings/TextArea.ts +15 -3
- package/src/mappings/TextField.js +14 -4
- package/src/mappings/TextField.ts +14 -4
- package/src/mappings/TextInput.js +15 -4
- package/src/mappings/TextInput.ts +15 -3
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
|
|
8
|
+
var _types = require("@draftbit/types");
|
|
9
|
+
|
|
10
|
+
const SEED_DATA_PROPS = {
|
|
11
|
+
locale: {
|
|
12
|
+
label: "Locale",
|
|
13
|
+
description: "Locale for the datepicker. Must be a valid Locale",
|
|
14
|
+
formType: _types.FORM_TYPES.string,
|
|
15
|
+
propType: _types.PROP_TYPES.STRING,
|
|
16
|
+
defaultValue: "en",
|
|
17
|
+
editable: true,
|
|
18
|
+
required: false,
|
|
19
|
+
group: _types.GROUPS.basic
|
|
20
|
+
},
|
|
21
|
+
label: {
|
|
22
|
+
label: "Label",
|
|
23
|
+
description: "The label to be displayed on the picker",
|
|
24
|
+
formType: _types.FORM_TYPES.string,
|
|
25
|
+
propType: _types.PROP_TYPES.STRING,
|
|
26
|
+
defaultValue: "Date",
|
|
27
|
+
editable: true,
|
|
28
|
+
required: true,
|
|
29
|
+
group: _types.GROUPS.data
|
|
30
|
+
},
|
|
31
|
+
calendarIcon: {
|
|
32
|
+
label: "Icon",
|
|
33
|
+
description: "The icon to display on the right",
|
|
34
|
+
formType: _types.FORM_TYPES.icon,
|
|
35
|
+
propType: _types.PROP_TYPES.STRING,
|
|
36
|
+
defaultValue: "calendar",
|
|
37
|
+
editable: true,
|
|
38
|
+
required: false,
|
|
39
|
+
group: _types.GROUPS.basic
|
|
40
|
+
},
|
|
41
|
+
mode: {
|
|
42
|
+
label: "Mode",
|
|
43
|
+
description: "Choose between date, time and datetime",
|
|
44
|
+
defaultValue: "date",
|
|
45
|
+
editable: true,
|
|
46
|
+
required: false,
|
|
47
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
48
|
+
propType: _types.PROP_TYPES.STRING,
|
|
49
|
+
options: ["outlined", "flat"],
|
|
50
|
+
group: _types.GROUPS.basic
|
|
51
|
+
},
|
|
52
|
+
disabled: {
|
|
53
|
+
label: "Disabled",
|
|
54
|
+
description: "Whether the picker should be disabled. Will prevent selection and show a greyed out state.",
|
|
55
|
+
formType: _types.FORM_TYPES.boolean,
|
|
56
|
+
propType: _types.PROP_TYPES.BOOLEAN,
|
|
57
|
+
defaultValue: false,
|
|
58
|
+
editable: true,
|
|
59
|
+
required: false,
|
|
60
|
+
group: _types.GROUPS.data
|
|
61
|
+
},
|
|
62
|
+
fieldName: { ..._types.FIELD_NAME,
|
|
63
|
+
handlerPropName: "onChange",
|
|
64
|
+
valuePropName: "value",
|
|
65
|
+
defaultValue: "date"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const SEED_DATA = [{
|
|
69
|
+
name: "Date Picker Input",
|
|
70
|
+
tag: "DatePickerInput",
|
|
71
|
+
packageName: "react-native-paper-dates",
|
|
72
|
+
description: "A component used to select a date from a visual calendar",
|
|
73
|
+
category: _types.COMPONENT_TYPES.input,
|
|
74
|
+
layout: null,
|
|
75
|
+
triggers: [_types.Triggers.OnDateChange],
|
|
76
|
+
StylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Size],
|
|
77
|
+
props: { ...SEED_DATA_PROPS,
|
|
78
|
+
type: {
|
|
79
|
+
label: "Appearance",
|
|
80
|
+
description: "Type of Datepicker",
|
|
81
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
82
|
+
propType: _types.PROP_TYPES.STRING,
|
|
83
|
+
defaultValue: "solid",
|
|
84
|
+
options: ["solid", "underline"],
|
|
85
|
+
editable: true,
|
|
86
|
+
required: true,
|
|
87
|
+
group: _types.GROUPS.basic
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}];
|
|
91
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -67,6 +67,17 @@ const SEED_DATA = {
|
|
|
67
67
|
formType: _types.FORM_TYPES.boolean,
|
|
68
68
|
propType: _types.PROP_TYPES.BOOLEAN
|
|
69
69
|
},
|
|
70
|
+
blurOnSubmit: {
|
|
71
|
+
group: _types.GROUPS.advanced,
|
|
72
|
+
label: "Blur On Submit",
|
|
73
|
+
description: "If true, the text field will blur when submitted. ",
|
|
74
|
+
editable: true,
|
|
75
|
+
required: false,
|
|
76
|
+
defaultValue: null,
|
|
77
|
+
formType: _types.FORM_TYPES.boolean,
|
|
78
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
79
|
+
},
|
|
80
|
+
disabled: (0, _types.createDisabledProp)(),
|
|
70
81
|
caretHidden: {
|
|
71
82
|
group: _types.GROUPS.advanced,
|
|
72
83
|
label: "Hide Caret",
|
|
@@ -88,12 +99,12 @@ const SEED_DATA = {
|
|
|
88
99
|
propType: _types.PROP_TYPES.BOOLEAN
|
|
89
100
|
},
|
|
90
101
|
editable: {
|
|
91
|
-
group: _types.GROUPS.
|
|
92
|
-
label: "Editable",
|
|
102
|
+
group: _types.GROUPS.data,
|
|
103
|
+
label: "Editable?",
|
|
93
104
|
description: "If false, the text is not editable",
|
|
94
105
|
editable: true,
|
|
95
106
|
required: false,
|
|
96
|
-
defaultValue:
|
|
107
|
+
defaultValue: null,
|
|
97
108
|
formType: _types.FORM_TYPES.boolean,
|
|
98
109
|
propType: _types.PROP_TYPES.BOOLEAN
|
|
99
110
|
},
|
|
@@ -70,7 +70,7 @@ const SEED_DATA_PROPS = {
|
|
|
70
70
|
propType: _types.PROP_TYPES.BOOLEAN
|
|
71
71
|
},
|
|
72
72
|
disabled: {
|
|
73
|
-
group: _types.GROUPS.
|
|
73
|
+
group: _types.GROUPS.data,
|
|
74
74
|
label: "Disabled",
|
|
75
75
|
description: "Whether the input should be disabled. Will prevent input and show a greyed out state.",
|
|
76
76
|
formType: _types.FORM_TYPES.boolean,
|
|
@@ -80,12 +80,22 @@ const SEED_DATA_PROPS = {
|
|
|
80
80
|
required: false
|
|
81
81
|
},
|
|
82
82
|
editable: {
|
|
83
|
-
group: _types.GROUPS.
|
|
84
|
-
label: "Editable",
|
|
83
|
+
group: _types.GROUPS.data,
|
|
84
|
+
label: "Editable?",
|
|
85
85
|
description: "If false, the text is not editable",
|
|
86
86
|
editable: true,
|
|
87
87
|
required: false,
|
|
88
|
-
defaultValue:
|
|
88
|
+
defaultValue: null,
|
|
89
|
+
formType: _types.FORM_TYPES.boolean,
|
|
90
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
91
|
+
},
|
|
92
|
+
blurOnSubmit: {
|
|
93
|
+
group: _types.GROUPS.advanced,
|
|
94
|
+
label: "Blur On Submit",
|
|
95
|
+
description: "If true, the text field will blur when submitted. ",
|
|
96
|
+
editable: true,
|
|
97
|
+
required: false,
|
|
98
|
+
defaultValue: null,
|
|
89
99
|
formType: _types.FORM_TYPES.boolean,
|
|
90
100
|
propType: _types.PROP_TYPES.BOOLEAN
|
|
91
101
|
},
|
|
@@ -149,12 +149,12 @@ const SEED_DATA = [{
|
|
|
149
149
|
propType: _types.PROP_TYPES.BOOLEAN
|
|
150
150
|
},
|
|
151
151
|
editable: {
|
|
152
|
-
group: _types.GROUPS.
|
|
153
|
-
label: "Editable",
|
|
152
|
+
group: _types.GROUPS.data,
|
|
153
|
+
label: "Editable?",
|
|
154
154
|
description: "If false, the text is not editable",
|
|
155
155
|
editable: true,
|
|
156
156
|
required: false,
|
|
157
|
-
defaultValue:
|
|
157
|
+
defaultValue: null,
|
|
158
158
|
formType: _types.FORM_TYPES.boolean,
|
|
159
159
|
propType: _types.PROP_TYPES.BOOLEAN
|
|
160
160
|
},
|
|
@@ -223,6 +223,16 @@ const SEED_DATA = [{
|
|
|
223
223
|
formType: _types.FORM_TYPES.string,
|
|
224
224
|
propType: _types.PROP_TYPES.STRING
|
|
225
225
|
},
|
|
226
|
+
blurOnSubmit: {
|
|
227
|
+
group: _types.GROUPS.advanced,
|
|
228
|
+
label: "Blur On Submit",
|
|
229
|
+
description: "If true, the text field will blur when submitted. ",
|
|
230
|
+
editable: true,
|
|
231
|
+
required: false,
|
|
232
|
+
defaultValue: null,
|
|
233
|
+
formType: _types.FORM_TYPES.boolean,
|
|
234
|
+
propType: _types.PROP_TYPES.BOOLEAN
|
|
235
|
+
},
|
|
226
236
|
returnKeyType: {
|
|
227
237
|
group: _types.GROUPS.advanced,
|
|
228
238
|
label: "Return Key Type",
|
|
@@ -288,6 +298,7 @@ const SEED_DATA = [{
|
|
|
288
298
|
formType: _types.FORM_TYPES.number,
|
|
289
299
|
propType: _types.PROP_TYPES.NUMBER
|
|
290
300
|
},
|
|
301
|
+
disabled: (0, _types.createDisabledProp)(),
|
|
291
302
|
scrollEnabled: {
|
|
292
303
|
group: _types.GROUPS.basic,
|
|
293
304
|
label: "Scroll Enabled",
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections } from "@draftbit/types";
|
|
2
|
+
const SEED_DATA_PROPS = {
|
|
3
|
+
locale: {
|
|
4
|
+
label: "Locale",
|
|
5
|
+
description: "Locale for the datepicker. Must be a valid Locale",
|
|
6
|
+
formType: FORM_TYPES.string,
|
|
7
|
+
propType: PROP_TYPES.STRING,
|
|
8
|
+
defaultValue: "en",
|
|
9
|
+
editable: true,
|
|
10
|
+
required: false,
|
|
11
|
+
group: GROUPS.basic
|
|
12
|
+
},
|
|
13
|
+
label: {
|
|
14
|
+
label: "Label",
|
|
15
|
+
description: "The label to be displayed on the picker",
|
|
16
|
+
formType: FORM_TYPES.string,
|
|
17
|
+
propType: PROP_TYPES.STRING,
|
|
18
|
+
defaultValue: "Date",
|
|
19
|
+
editable: true,
|
|
20
|
+
required: true,
|
|
21
|
+
group: GROUPS.data
|
|
22
|
+
},
|
|
23
|
+
calendarIcon: {
|
|
24
|
+
label: "Icon",
|
|
25
|
+
description: "The icon to display on the right",
|
|
26
|
+
formType: FORM_TYPES.icon,
|
|
27
|
+
propType: PROP_TYPES.STRING,
|
|
28
|
+
defaultValue: "calendar",
|
|
29
|
+
editable: true,
|
|
30
|
+
required: false,
|
|
31
|
+
group: GROUPS.basic
|
|
32
|
+
},
|
|
33
|
+
mode: {
|
|
34
|
+
label: "Mode",
|
|
35
|
+
description: "Choose between date, time and datetime",
|
|
36
|
+
defaultValue: "date",
|
|
37
|
+
editable: true,
|
|
38
|
+
required: false,
|
|
39
|
+
formType: FORM_TYPES.flatArray,
|
|
40
|
+
propType: PROP_TYPES.STRING,
|
|
41
|
+
options: ["outlined", "flat"],
|
|
42
|
+
group: GROUPS.basic
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
label: "Disabled",
|
|
46
|
+
description: "Whether the picker should be disabled. Will prevent selection and show a greyed out state.",
|
|
47
|
+
formType: FORM_TYPES.boolean,
|
|
48
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
49
|
+
defaultValue: false,
|
|
50
|
+
editable: true,
|
|
51
|
+
required: false,
|
|
52
|
+
group: GROUPS.data
|
|
53
|
+
},
|
|
54
|
+
fieldName: { ...FIELD_NAME,
|
|
55
|
+
handlerPropName: "onChange",
|
|
56
|
+
valuePropName: "value",
|
|
57
|
+
defaultValue: "date"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export const SEED_DATA = [{
|
|
61
|
+
name: "Date Picker Input",
|
|
62
|
+
tag: "DatePickerInput",
|
|
63
|
+
packageName: "react-native-paper-dates",
|
|
64
|
+
description: "A component used to select a date from a visual calendar",
|
|
65
|
+
category: COMPONENT_TYPES.input,
|
|
66
|
+
layout: null,
|
|
67
|
+
triggers: [Triggers.OnDateChange],
|
|
68
|
+
StylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Size],
|
|
69
|
+
props: { ...SEED_DATA_PROPS,
|
|
70
|
+
type: {
|
|
71
|
+
label: "Appearance",
|
|
72
|
+
description: "Type of Datepicker",
|
|
73
|
+
formType: FORM_TYPES.flatArray,
|
|
74
|
+
propType: PROP_TYPES.STRING,
|
|
75
|
+
defaultValue: "solid",
|
|
76
|
+
options: ["solid", "underline"],
|
|
77
|
+
editable: true,
|
|
78
|
+
required: true,
|
|
79
|
+
group: GROUPS.basic
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createDisabledProp } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Text Area",
|
|
4
4
|
tag: "TextInput",
|
|
@@ -59,6 +59,17 @@ export const SEED_DATA = {
|
|
|
59
59
|
formType: FORM_TYPES.boolean,
|
|
60
60
|
propType: PROP_TYPES.BOOLEAN
|
|
61
61
|
},
|
|
62
|
+
blurOnSubmit: {
|
|
63
|
+
group: GROUPS.advanced,
|
|
64
|
+
label: "Blur On Submit",
|
|
65
|
+
description: "If true, the text field will blur when submitted. ",
|
|
66
|
+
editable: true,
|
|
67
|
+
required: false,
|
|
68
|
+
defaultValue: null,
|
|
69
|
+
formType: FORM_TYPES.boolean,
|
|
70
|
+
propType: PROP_TYPES.BOOLEAN
|
|
71
|
+
},
|
|
72
|
+
disabled: createDisabledProp(),
|
|
62
73
|
caretHidden: {
|
|
63
74
|
group: GROUPS.advanced,
|
|
64
75
|
label: "Hide Caret",
|
|
@@ -80,12 +91,12 @@ export const SEED_DATA = {
|
|
|
80
91
|
propType: PROP_TYPES.BOOLEAN
|
|
81
92
|
},
|
|
82
93
|
editable: {
|
|
83
|
-
group: GROUPS.
|
|
84
|
-
label: "Editable",
|
|
94
|
+
group: GROUPS.data,
|
|
95
|
+
label: "Editable?",
|
|
85
96
|
description: "If false, the text is not editable",
|
|
86
97
|
editable: true,
|
|
87
98
|
required: false,
|
|
88
|
-
defaultValue:
|
|
99
|
+
defaultValue: null,
|
|
89
100
|
formType: FORM_TYPES.boolean,
|
|
90
101
|
propType: PROP_TYPES.BOOLEAN
|
|
91
102
|
},
|
|
@@ -62,7 +62,7 @@ const SEED_DATA_PROPS = {
|
|
|
62
62
|
propType: PROP_TYPES.BOOLEAN
|
|
63
63
|
},
|
|
64
64
|
disabled: {
|
|
65
|
-
group: GROUPS.
|
|
65
|
+
group: GROUPS.data,
|
|
66
66
|
label: "Disabled",
|
|
67
67
|
description: "Whether the input should be disabled. Will prevent input and show a greyed out state.",
|
|
68
68
|
formType: FORM_TYPES.boolean,
|
|
@@ -72,12 +72,22 @@ const SEED_DATA_PROPS = {
|
|
|
72
72
|
required: false
|
|
73
73
|
},
|
|
74
74
|
editable: {
|
|
75
|
-
group: GROUPS.
|
|
76
|
-
label: "Editable",
|
|
75
|
+
group: GROUPS.data,
|
|
76
|
+
label: "Editable?",
|
|
77
77
|
description: "If false, the text is not editable",
|
|
78
78
|
editable: true,
|
|
79
79
|
required: false,
|
|
80
|
-
defaultValue:
|
|
80
|
+
defaultValue: null,
|
|
81
|
+
formType: FORM_TYPES.boolean,
|
|
82
|
+
propType: PROP_TYPES.BOOLEAN
|
|
83
|
+
},
|
|
84
|
+
blurOnSubmit: {
|
|
85
|
+
group: GROUPS.advanced,
|
|
86
|
+
label: "Blur On Submit",
|
|
87
|
+
description: "If true, the text field will blur when submitted. ",
|
|
88
|
+
editable: true,
|
|
89
|
+
required: false,
|
|
90
|
+
defaultValue: null,
|
|
81
91
|
formType: FORM_TYPES.boolean,
|
|
82
92
|
propType: PROP_TYPES.BOOLEAN
|
|
83
93
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections, createDisabledProp } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA_PROPS = {
|
|
3
3
|
style: {
|
|
4
4
|
group: GROUPS.basic,
|
|
@@ -140,12 +140,12 @@ export const SEED_DATA = [{
|
|
|
140
140
|
propType: PROP_TYPES.BOOLEAN
|
|
141
141
|
},
|
|
142
142
|
editable: {
|
|
143
|
-
group: GROUPS.
|
|
144
|
-
label: "Editable",
|
|
143
|
+
group: GROUPS.data,
|
|
144
|
+
label: "Editable?",
|
|
145
145
|
description: "If false, the text is not editable",
|
|
146
146
|
editable: true,
|
|
147
147
|
required: false,
|
|
148
|
-
defaultValue:
|
|
148
|
+
defaultValue: null,
|
|
149
149
|
formType: FORM_TYPES.boolean,
|
|
150
150
|
propType: PROP_TYPES.BOOLEAN
|
|
151
151
|
},
|
|
@@ -214,6 +214,16 @@ export const SEED_DATA = [{
|
|
|
214
214
|
formType: FORM_TYPES.string,
|
|
215
215
|
propType: PROP_TYPES.STRING
|
|
216
216
|
},
|
|
217
|
+
blurOnSubmit: {
|
|
218
|
+
group: GROUPS.advanced,
|
|
219
|
+
label: "Blur On Submit",
|
|
220
|
+
description: "If true, the text field will blur when submitted. ",
|
|
221
|
+
editable: true,
|
|
222
|
+
required: false,
|
|
223
|
+
defaultValue: null,
|
|
224
|
+
formType: FORM_TYPES.boolean,
|
|
225
|
+
propType: PROP_TYPES.BOOLEAN
|
|
226
|
+
},
|
|
217
227
|
returnKeyType: {
|
|
218
228
|
group: GROUPS.advanced,
|
|
219
229
|
label: "Return Key Type",
|
|
@@ -279,6 +289,7 @@ export const SEED_DATA = [{
|
|
|
279
289
|
formType: FORM_TYPES.number,
|
|
280
290
|
propType: PROP_TYPES.NUMBER
|
|
281
291
|
},
|
|
292
|
+
disabled: createDisabledProp(),
|
|
282
293
|
scrollEnabled: {
|
|
283
294
|
group: GROUPS.basic,
|
|
284
295
|
label: "Scroll Enabled",
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const SEED_DATA: {
|
|
2
|
+
name: string;
|
|
3
|
+
tag: string;
|
|
4
|
+
packageName: string;
|
|
5
|
+
description: string;
|
|
6
|
+
category: string;
|
|
7
|
+
layout: null;
|
|
8
|
+
triggers: string[];
|
|
9
|
+
StylesPanelSections: string[];
|
|
10
|
+
props: {
|
|
11
|
+
type: {
|
|
12
|
+
label: string;
|
|
13
|
+
description: string;
|
|
14
|
+
formType: string;
|
|
15
|
+
propType: string;
|
|
16
|
+
defaultValue: string;
|
|
17
|
+
options: string[];
|
|
18
|
+
editable: boolean;
|
|
19
|
+
required: boolean;
|
|
20
|
+
group: string;
|
|
21
|
+
};
|
|
22
|
+
locale: {
|
|
23
|
+
label: string;
|
|
24
|
+
description: string;
|
|
25
|
+
formType: string;
|
|
26
|
+
propType: string;
|
|
27
|
+
defaultValue: string;
|
|
28
|
+
editable: boolean;
|
|
29
|
+
required: boolean;
|
|
30
|
+
group: string;
|
|
31
|
+
};
|
|
32
|
+
label: {
|
|
33
|
+
label: string;
|
|
34
|
+
description: string;
|
|
35
|
+
formType: string;
|
|
36
|
+
propType: string;
|
|
37
|
+
defaultValue: string;
|
|
38
|
+
editable: boolean;
|
|
39
|
+
required: boolean;
|
|
40
|
+
group: string;
|
|
41
|
+
};
|
|
42
|
+
calendarIcon: {
|
|
43
|
+
label: string;
|
|
44
|
+
description: string;
|
|
45
|
+
formType: string;
|
|
46
|
+
propType: string;
|
|
47
|
+
defaultValue: string;
|
|
48
|
+
editable: boolean;
|
|
49
|
+
required: boolean;
|
|
50
|
+
group: string;
|
|
51
|
+
};
|
|
52
|
+
mode: {
|
|
53
|
+
label: string;
|
|
54
|
+
description: string;
|
|
55
|
+
defaultValue: string;
|
|
56
|
+
editable: boolean;
|
|
57
|
+
required: boolean;
|
|
58
|
+
formType: string;
|
|
59
|
+
propType: string;
|
|
60
|
+
options: string[];
|
|
61
|
+
group: string;
|
|
62
|
+
};
|
|
63
|
+
disabled: {
|
|
64
|
+
label: string;
|
|
65
|
+
description: string;
|
|
66
|
+
formType: string;
|
|
67
|
+
propType: string;
|
|
68
|
+
defaultValue: boolean;
|
|
69
|
+
editable: boolean;
|
|
70
|
+
required: boolean;
|
|
71
|
+
group: string;
|
|
72
|
+
};
|
|
73
|
+
fieldName: {
|
|
74
|
+
handlerPropName: string;
|
|
75
|
+
valuePropName: string;
|
|
76
|
+
defaultValue: string;
|
|
77
|
+
group: string;
|
|
78
|
+
label: string;
|
|
79
|
+
description: string;
|
|
80
|
+
formType: string;
|
|
81
|
+
propType: string;
|
|
82
|
+
editable: boolean;
|
|
83
|
+
required: boolean;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}[];
|
|
87
|
+
//# sourceMappingURL=DatePickerInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePickerInput.d.ts","sourceRoot":"","sources":["../../../../src/mappings/DatePickerInput.ts"],"names":[],"mappings":"AAuEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCrB,CAAC"}
|
|
@@ -58,6 +58,26 @@ export declare const SEED_DATA: {
|
|
|
58
58
|
formType: string;
|
|
59
59
|
propType: string;
|
|
60
60
|
};
|
|
61
|
+
blurOnSubmit: {
|
|
62
|
+
group: string;
|
|
63
|
+
label: string;
|
|
64
|
+
description: string;
|
|
65
|
+
editable: boolean;
|
|
66
|
+
required: boolean;
|
|
67
|
+
defaultValue: null;
|
|
68
|
+
formType: string;
|
|
69
|
+
propType: string;
|
|
70
|
+
};
|
|
71
|
+
disabled: {
|
|
72
|
+
label: string;
|
|
73
|
+
description: string;
|
|
74
|
+
group: string;
|
|
75
|
+
editable: boolean;
|
|
76
|
+
required: boolean;
|
|
77
|
+
formType: string;
|
|
78
|
+
propType: string;
|
|
79
|
+
defaultValue: null;
|
|
80
|
+
};
|
|
61
81
|
caretHidden: {
|
|
62
82
|
group: string;
|
|
63
83
|
label: string;
|
|
@@ -84,7 +104,7 @@ export declare const SEED_DATA: {
|
|
|
84
104
|
description: string;
|
|
85
105
|
editable: boolean;
|
|
86
106
|
required: boolean;
|
|
87
|
-
defaultValue:
|
|
107
|
+
defaultValue: null;
|
|
88
108
|
formType: string;
|
|
89
109
|
propType: string;
|
|
90
110
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextArea.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextArea.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuRrB,CAAC"}
|
|
@@ -125,7 +125,17 @@ export declare const SEED_DATA: ({
|
|
|
125
125
|
description: string;
|
|
126
126
|
editable: boolean;
|
|
127
127
|
required: boolean;
|
|
128
|
-
defaultValue:
|
|
128
|
+
defaultValue: null;
|
|
129
|
+
formType: string;
|
|
130
|
+
propType: string;
|
|
131
|
+
};
|
|
132
|
+
blurOnSubmit: {
|
|
133
|
+
group: string;
|
|
134
|
+
label: string;
|
|
135
|
+
description: string;
|
|
136
|
+
editable: boolean;
|
|
137
|
+
required: boolean;
|
|
138
|
+
defaultValue: null;
|
|
129
139
|
formType: string;
|
|
130
140
|
propType: string;
|
|
131
141
|
};
|
|
@@ -432,7 +442,17 @@ export declare const SEED_DATA: ({
|
|
|
432
442
|
description: string;
|
|
433
443
|
editable: boolean;
|
|
434
444
|
required: boolean;
|
|
435
|
-
defaultValue:
|
|
445
|
+
defaultValue: null;
|
|
446
|
+
formType: string;
|
|
447
|
+
propType: string;
|
|
448
|
+
};
|
|
449
|
+
blurOnSubmit: {
|
|
450
|
+
group: string;
|
|
451
|
+
label: string;
|
|
452
|
+
description: string;
|
|
453
|
+
editable: boolean;
|
|
454
|
+
required: boolean;
|
|
455
|
+
defaultValue: null;
|
|
436
456
|
formType: string;
|
|
437
457
|
propType: string;
|
|
438
458
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextField.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextField.ts"],"names":[],"mappings":"AA6TA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgGrB,CAAC"}
|
|
@@ -108,6 +108,16 @@ export declare const SEED_DATA: {
|
|
|
108
108
|
formType: string;
|
|
109
109
|
propType: string;
|
|
110
110
|
};
|
|
111
|
+
disabled: {
|
|
112
|
+
label: string;
|
|
113
|
+
description: string;
|
|
114
|
+
group: string;
|
|
115
|
+
editable: boolean;
|
|
116
|
+
required: boolean;
|
|
117
|
+
formType: string;
|
|
118
|
+
propType: string;
|
|
119
|
+
defaultValue: null;
|
|
120
|
+
};
|
|
111
121
|
scrollEnabled: {
|
|
112
122
|
group: string;
|
|
113
123
|
label: string;
|
|
@@ -280,7 +290,7 @@ export declare const SEED_DATA: {
|
|
|
280
290
|
description: string;
|
|
281
291
|
editable: boolean;
|
|
282
292
|
required: boolean;
|
|
283
|
-
defaultValue:
|
|
293
|
+
defaultValue: null;
|
|
284
294
|
formType: string;
|
|
285
295
|
propType: string;
|
|
286
296
|
};
|
|
@@ -349,6 +359,16 @@ export declare const SEED_DATA: {
|
|
|
349
359
|
formType: string;
|
|
350
360
|
propType: string;
|
|
351
361
|
};
|
|
362
|
+
blurOnSubmit: {
|
|
363
|
+
group: string;
|
|
364
|
+
label: string;
|
|
365
|
+
description: string;
|
|
366
|
+
editable: boolean;
|
|
367
|
+
required: boolean;
|
|
368
|
+
defaultValue: null;
|
|
369
|
+
formType: string;
|
|
370
|
+
propType: string;
|
|
371
|
+
};
|
|
352
372
|
returnKeyType: {
|
|
353
373
|
group: string;
|
|
354
374
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextInput.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/mappings/TextInput.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D3B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoWrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.4.4-
|
|
3
|
+
"version": "46.4.4-d53e01.2+d53e01d",
|
|
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": "^46.4.4-
|
|
44
|
+
"@draftbit/types": "^46.4.4-d53e01.2+d53e01d",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
]
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "d53e01dd396636891c663263eb8f99521888a619"
|
|
95
95
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, GROUPS, Triggers, StylesPanelSections, } from "@draftbit/types";
|
|
2
|
+
const SEED_DATA_PROPS = {
|
|
3
|
+
locale: {
|
|
4
|
+
label: "Locale",
|
|
5
|
+
description: "Locale for the datepicker. Must be a valid Locale",
|
|
6
|
+
formType: FORM_TYPES.string,
|
|
7
|
+
propType: PROP_TYPES.STRING,
|
|
8
|
+
defaultValue: "en",
|
|
9
|
+
editable: true,
|
|
10
|
+
required: false,
|
|
11
|
+
group: GROUPS.basic,
|
|
12
|
+
},
|
|
13
|
+
label: {
|
|
14
|
+
label: "Label",
|
|
15
|
+
description: "The label to be displayed on the picker",
|
|
16
|
+
formType: FORM_TYPES.string,
|
|
17
|
+
propType: PROP_TYPES.STRING,
|
|
18
|
+
defaultValue: "Date",
|
|
19
|
+
editable: true,
|
|
20
|
+
required: true,
|
|
21
|
+
group: GROUPS.data,
|
|
22
|
+
},
|
|
23
|
+
calendarIcon: {
|
|
24
|
+
label: "Icon",
|
|
25
|
+
description: "The icon to display on the right",
|
|
26
|
+
formType: FORM_TYPES.icon,
|
|
27
|
+
propType: PROP_TYPES.STRING,
|
|
28
|
+
defaultValue: "calendar",
|
|
29
|
+
editable: true,
|
|
30
|
+
required: false,
|
|
31
|
+
group: GROUPS.basic,
|
|
32
|
+
},
|
|
33
|
+
mode: {
|
|
34
|
+
label: "Mode",
|
|
35
|
+
description: "Choose between date, time and datetime",
|
|
36
|
+
defaultValue: "date",
|
|
37
|
+
editable: true,
|
|
38
|
+
required: false,
|
|
39
|
+
formType: FORM_TYPES.flatArray,
|
|
40
|
+
propType: PROP_TYPES.STRING,
|
|
41
|
+
options: ["outlined", "flat"],
|
|
42
|
+
group: GROUPS.basic,
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
label: "Disabled",
|
|
46
|
+
description: "Whether the picker should be disabled. Will prevent selection and show a greyed out state.",
|
|
47
|
+
formType: FORM_TYPES.boolean,
|
|
48
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
49
|
+
defaultValue: false,
|
|
50
|
+
editable: true,
|
|
51
|
+
required: false,
|
|
52
|
+
group: GROUPS.data,
|
|
53
|
+
},
|
|
54
|
+
fieldName: {
|
|
55
|
+
...FIELD_NAME,
|
|
56
|
+
handlerPropName: "onChange",
|
|
57
|
+
valuePropName: "value",
|
|
58
|
+
defaultValue: "date",
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
export const SEED_DATA = [
|
|
62
|
+
{
|
|
63
|
+
name: "Date Picker Input",
|
|
64
|
+
tag: "DatePickerInput",
|
|
65
|
+
packageName: "react-native-paper-dates",
|
|
66
|
+
description: "A component used to select a date from a visual calendar",
|
|
67
|
+
category: COMPONENT_TYPES.input,
|
|
68
|
+
layout: null,
|
|
69
|
+
triggers: [Triggers.OnDateChange],
|
|
70
|
+
StylesPanelSections: [
|
|
71
|
+
StylesPanelSections.Typography,
|
|
72
|
+
StylesPanelSections.Background,
|
|
73
|
+
StylesPanelSections.Borders,
|
|
74
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
75
|
+
StylesPanelSections.Position,
|
|
76
|
+
StylesPanelSections.Size,
|
|
77
|
+
],
|
|
78
|
+
props: {
|
|
79
|
+
...SEED_DATA_PROPS,
|
|
80
|
+
type: {
|
|
81
|
+
label: "Appearance",
|
|
82
|
+
description: "Type of Datepicker",
|
|
83
|
+
formType: FORM_TYPES.flatArray,
|
|
84
|
+
propType: PROP_TYPES.STRING,
|
|
85
|
+
defaultValue: "solid",
|
|
86
|
+
options: ["solid", "underline"],
|
|
87
|
+
editable: true,
|
|
88
|
+
required: true,
|
|
89
|
+
group: GROUPS.basic,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
];
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPONENT_TYPES,
|
|
3
|
+
FORM_TYPES,
|
|
4
|
+
PROP_TYPES,
|
|
5
|
+
FIELD_NAME,
|
|
6
|
+
GROUPS,
|
|
7
|
+
Triggers,
|
|
8
|
+
StylesPanelSections,
|
|
9
|
+
} from "@draftbit/types";
|
|
10
|
+
|
|
11
|
+
const SEED_DATA_PROPS = {
|
|
12
|
+
locale: {
|
|
13
|
+
label: "Locale",
|
|
14
|
+
description: "Locale for the datepicker. Must be a valid Locale",
|
|
15
|
+
formType: FORM_TYPES.string,
|
|
16
|
+
propType: PROP_TYPES.STRING,
|
|
17
|
+
defaultValue: "en",
|
|
18
|
+
editable: true,
|
|
19
|
+
required: false,
|
|
20
|
+
group: GROUPS.basic,
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
label: "Label",
|
|
24
|
+
description: "The label to be displayed on the picker",
|
|
25
|
+
formType: FORM_TYPES.string,
|
|
26
|
+
propType: PROP_TYPES.STRING,
|
|
27
|
+
defaultValue: "Date",
|
|
28
|
+
editable: true,
|
|
29
|
+
required: true,
|
|
30
|
+
group: GROUPS.data,
|
|
31
|
+
},
|
|
32
|
+
calendarIcon: {
|
|
33
|
+
label: "Icon",
|
|
34
|
+
description: "The icon to display on the right",
|
|
35
|
+
formType: FORM_TYPES.icon,
|
|
36
|
+
propType: PROP_TYPES.STRING,
|
|
37
|
+
defaultValue: "calendar",
|
|
38
|
+
editable: true,
|
|
39
|
+
required: false,
|
|
40
|
+
group: GROUPS.basic,
|
|
41
|
+
},
|
|
42
|
+
mode: {
|
|
43
|
+
label: "Mode",
|
|
44
|
+
description: "Choose between date, time and datetime",
|
|
45
|
+
defaultValue: "date",
|
|
46
|
+
editable: true,
|
|
47
|
+
required: false,
|
|
48
|
+
formType: FORM_TYPES.flatArray,
|
|
49
|
+
propType: PROP_TYPES.STRING,
|
|
50
|
+
options: ["outlined", "flat"],
|
|
51
|
+
group: GROUPS.basic,
|
|
52
|
+
},
|
|
53
|
+
disabled: {
|
|
54
|
+
label: "Disabled",
|
|
55
|
+
description:
|
|
56
|
+
"Whether the picker should be disabled. Will prevent selection and show a greyed out state.",
|
|
57
|
+
formType: FORM_TYPES.boolean,
|
|
58
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
59
|
+
defaultValue: false,
|
|
60
|
+
editable: true,
|
|
61
|
+
required: false,
|
|
62
|
+
group: GROUPS.data,
|
|
63
|
+
},
|
|
64
|
+
fieldName: {
|
|
65
|
+
...FIELD_NAME,
|
|
66
|
+
handlerPropName: "onChange",
|
|
67
|
+
valuePropName: "value",
|
|
68
|
+
defaultValue: "date",
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const SEED_DATA = [
|
|
73
|
+
{
|
|
74
|
+
name: "Date Picker Input",
|
|
75
|
+
tag: "DatePickerInput",
|
|
76
|
+
packageName: "react-native-paper-dates",
|
|
77
|
+
description: "A component used to select a date from a visual calendar",
|
|
78
|
+
category: COMPONENT_TYPES.input,
|
|
79
|
+
layout: null,
|
|
80
|
+
triggers: [Triggers.OnDateChange],
|
|
81
|
+
StylesPanelSections: [
|
|
82
|
+
StylesPanelSections.Typography,
|
|
83
|
+
StylesPanelSections.Background,
|
|
84
|
+
StylesPanelSections.Borders,
|
|
85
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
86
|
+
StylesPanelSections.Position,
|
|
87
|
+
StylesPanelSections.Size,
|
|
88
|
+
],
|
|
89
|
+
props: {
|
|
90
|
+
...SEED_DATA_PROPS,
|
|
91
|
+
type: {
|
|
92
|
+
label: "Appearance",
|
|
93
|
+
description: "Type of Datepicker",
|
|
94
|
+
formType: FORM_TYPES.flatArray,
|
|
95
|
+
propType: PROP_TYPES.STRING,
|
|
96
|
+
defaultValue: "solid",
|
|
97
|
+
options: ["solid", "underline"],
|
|
98
|
+
editable: true,
|
|
99
|
+
required: true,
|
|
100
|
+
group: GROUPS.basic,
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
];
|
package/src/mappings/TextArea.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, createDisabledProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Text Area",
|
|
4
4
|
tag: "TextInput",
|
|
@@ -59,6 +59,17 @@ export const SEED_DATA = {
|
|
|
59
59
|
formType: FORM_TYPES.boolean,
|
|
60
60
|
propType: PROP_TYPES.BOOLEAN,
|
|
61
61
|
},
|
|
62
|
+
blurOnSubmit: {
|
|
63
|
+
group: GROUPS.advanced,
|
|
64
|
+
label: "Blur On Submit",
|
|
65
|
+
description: "If true, the text field will blur when submitted. ",
|
|
66
|
+
editable: true,
|
|
67
|
+
required: false,
|
|
68
|
+
defaultValue: null,
|
|
69
|
+
formType: FORM_TYPES.boolean,
|
|
70
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
71
|
+
},
|
|
72
|
+
disabled: createDisabledProp(),
|
|
62
73
|
caretHidden: {
|
|
63
74
|
group: GROUPS.advanced,
|
|
64
75
|
label: "Hide Caret",
|
|
@@ -80,12 +91,12 @@ export const SEED_DATA = {
|
|
|
80
91
|
propType: PROP_TYPES.BOOLEAN,
|
|
81
92
|
},
|
|
82
93
|
editable: {
|
|
83
|
-
group: GROUPS.
|
|
84
|
-
label: "Editable",
|
|
94
|
+
group: GROUPS.data,
|
|
95
|
+
label: "Editable?",
|
|
85
96
|
description: "If false, the text is not editable",
|
|
86
97
|
editable: true,
|
|
87
98
|
required: false,
|
|
88
|
-
defaultValue:
|
|
99
|
+
defaultValue: null,
|
|
89
100
|
formType: FORM_TYPES.boolean,
|
|
90
101
|
propType: PROP_TYPES.BOOLEAN,
|
|
91
102
|
},
|
package/src/mappings/TextArea.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
PROP_TYPES,
|
|
6
6
|
FIELD_NAME,
|
|
7
7
|
Triggers,
|
|
8
|
+
createDisabledProp,
|
|
8
9
|
} from "@draftbit/types";
|
|
9
10
|
|
|
10
11
|
export const SEED_DATA = {
|
|
@@ -69,6 +70,17 @@ export const SEED_DATA = {
|
|
|
69
70
|
formType: FORM_TYPES.boolean,
|
|
70
71
|
propType: PROP_TYPES.BOOLEAN,
|
|
71
72
|
},
|
|
73
|
+
blurOnSubmit: {
|
|
74
|
+
group: GROUPS.advanced,
|
|
75
|
+
label: "Blur On Submit",
|
|
76
|
+
description: "If true, the text field will blur when submitted. ",
|
|
77
|
+
editable: true,
|
|
78
|
+
required: false,
|
|
79
|
+
defaultValue: null,
|
|
80
|
+
formType: FORM_TYPES.boolean,
|
|
81
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
82
|
+
},
|
|
83
|
+
disabled: createDisabledProp(),
|
|
72
84
|
caretHidden: {
|
|
73
85
|
group: GROUPS.advanced,
|
|
74
86
|
label: "Hide Caret",
|
|
@@ -91,12 +103,12 @@ export const SEED_DATA = {
|
|
|
91
103
|
propType: PROP_TYPES.BOOLEAN,
|
|
92
104
|
},
|
|
93
105
|
editable: {
|
|
94
|
-
group: GROUPS.
|
|
95
|
-
label: "Editable",
|
|
106
|
+
group: GROUPS.data,
|
|
107
|
+
label: "Editable?",
|
|
96
108
|
description: "If false, the text is not editable",
|
|
97
109
|
editable: true,
|
|
98
110
|
required: false,
|
|
99
|
-
defaultValue:
|
|
111
|
+
defaultValue: null,
|
|
100
112
|
formType: FORM_TYPES.boolean,
|
|
101
113
|
propType: PROP_TYPES.BOOLEAN,
|
|
102
114
|
},
|
|
@@ -62,7 +62,7 @@ const SEED_DATA_PROPS = {
|
|
|
62
62
|
propType: PROP_TYPES.BOOLEAN,
|
|
63
63
|
},
|
|
64
64
|
disabled: {
|
|
65
|
-
group: GROUPS.
|
|
65
|
+
group: GROUPS.data,
|
|
66
66
|
label: "Disabled",
|
|
67
67
|
description: "Whether the input should be disabled. Will prevent input and show a greyed out state.",
|
|
68
68
|
formType: FORM_TYPES.boolean,
|
|
@@ -72,12 +72,22 @@ const SEED_DATA_PROPS = {
|
|
|
72
72
|
required: false,
|
|
73
73
|
},
|
|
74
74
|
editable: {
|
|
75
|
-
group: GROUPS.
|
|
76
|
-
label: "Editable",
|
|
75
|
+
group: GROUPS.data,
|
|
76
|
+
label: "Editable?",
|
|
77
77
|
description: "If false, the text is not editable",
|
|
78
78
|
editable: true,
|
|
79
79
|
required: false,
|
|
80
|
-
defaultValue:
|
|
80
|
+
defaultValue: null,
|
|
81
|
+
formType: FORM_TYPES.boolean,
|
|
82
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
83
|
+
},
|
|
84
|
+
blurOnSubmit: {
|
|
85
|
+
group: GROUPS.advanced,
|
|
86
|
+
label: "Blur On Submit",
|
|
87
|
+
description: "If true, the text field will blur when submitted. ",
|
|
88
|
+
editable: true,
|
|
89
|
+
required: false,
|
|
90
|
+
defaultValue: null,
|
|
81
91
|
formType: FORM_TYPES.boolean,
|
|
82
92
|
propType: PROP_TYPES.BOOLEAN,
|
|
83
93
|
},
|
|
@@ -77,7 +77,7 @@ const SEED_DATA_PROPS = {
|
|
|
77
77
|
propType: PROP_TYPES.BOOLEAN,
|
|
78
78
|
},
|
|
79
79
|
disabled: {
|
|
80
|
-
group: GROUPS.
|
|
80
|
+
group: GROUPS.data,
|
|
81
81
|
label: "Disabled",
|
|
82
82
|
description:
|
|
83
83
|
"Whether the input should be disabled. Will prevent input and show a greyed out state.",
|
|
@@ -88,12 +88,22 @@ const SEED_DATA_PROPS = {
|
|
|
88
88
|
required: false,
|
|
89
89
|
},
|
|
90
90
|
editable: {
|
|
91
|
-
group: GROUPS.
|
|
92
|
-
label: "Editable",
|
|
91
|
+
group: GROUPS.data,
|
|
92
|
+
label: "Editable?",
|
|
93
93
|
description: "If false, the text is not editable",
|
|
94
94
|
editable: true,
|
|
95
95
|
required: false,
|
|
96
|
-
defaultValue:
|
|
96
|
+
defaultValue: null,
|
|
97
|
+
formType: FORM_TYPES.boolean,
|
|
98
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
99
|
+
},
|
|
100
|
+
blurOnSubmit: {
|
|
101
|
+
group: GROUPS.advanced,
|
|
102
|
+
label: "Blur On Submit",
|
|
103
|
+
description: "If true, the text field will blur when submitted. ",
|
|
104
|
+
editable: true,
|
|
105
|
+
required: false,
|
|
106
|
+
defaultValue: null,
|
|
97
107
|
formType: FORM_TYPES.boolean,
|
|
98
108
|
propType: PROP_TYPES.BOOLEAN,
|
|
99
109
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections, } from "@draftbit/types";
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, StylesPanelSections, createDisabledProp, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA_PROPS = {
|
|
3
3
|
style: {
|
|
4
4
|
group: GROUPS.basic,
|
|
@@ -150,12 +150,12 @@ export const SEED_DATA = [
|
|
|
150
150
|
propType: PROP_TYPES.BOOLEAN,
|
|
151
151
|
},
|
|
152
152
|
editable: {
|
|
153
|
-
group: GROUPS.
|
|
154
|
-
label: "Editable",
|
|
153
|
+
group: GROUPS.data,
|
|
154
|
+
label: "Editable?",
|
|
155
155
|
description: "If false, the text is not editable",
|
|
156
156
|
editable: true,
|
|
157
157
|
required: false,
|
|
158
|
-
defaultValue:
|
|
158
|
+
defaultValue: null,
|
|
159
159
|
formType: FORM_TYPES.boolean,
|
|
160
160
|
propType: PROP_TYPES.BOOLEAN,
|
|
161
161
|
},
|
|
@@ -238,6 +238,16 @@ export const SEED_DATA = [
|
|
|
238
238
|
formType: FORM_TYPES.string,
|
|
239
239
|
propType: PROP_TYPES.STRING,
|
|
240
240
|
},
|
|
241
|
+
blurOnSubmit: {
|
|
242
|
+
group: GROUPS.advanced,
|
|
243
|
+
label: "Blur On Submit",
|
|
244
|
+
description: "If true, the text field will blur when submitted. ",
|
|
245
|
+
editable: true,
|
|
246
|
+
required: false,
|
|
247
|
+
defaultValue: null,
|
|
248
|
+
formType: FORM_TYPES.boolean,
|
|
249
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
250
|
+
},
|
|
241
251
|
returnKeyType: {
|
|
242
252
|
group: GROUPS.advanced,
|
|
243
253
|
label: "Return Key Type",
|
|
@@ -317,6 +327,7 @@ export const SEED_DATA = [
|
|
|
317
327
|
formType: FORM_TYPES.number,
|
|
318
328
|
propType: PROP_TYPES.NUMBER,
|
|
319
329
|
},
|
|
330
|
+
disabled: createDisabledProp(),
|
|
320
331
|
scrollEnabled: {
|
|
321
332
|
group: GROUPS.basic,
|
|
322
333
|
label: "Scroll Enabled",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
FIELD_NAME,
|
|
7
7
|
Triggers,
|
|
8
8
|
StylesPanelSections,
|
|
9
|
+
createDisabledProp,
|
|
9
10
|
} from "@draftbit/types";
|
|
10
11
|
|
|
11
12
|
export const SEED_DATA_PROPS = {
|
|
@@ -168,12 +169,12 @@ export const SEED_DATA = [
|
|
|
168
169
|
propType: PROP_TYPES.BOOLEAN,
|
|
169
170
|
},
|
|
170
171
|
editable: {
|
|
171
|
-
group: GROUPS.
|
|
172
|
-
label: "Editable",
|
|
172
|
+
group: GROUPS.data,
|
|
173
|
+
label: "Editable?",
|
|
173
174
|
description: "If false, the text is not editable",
|
|
174
175
|
editable: true,
|
|
175
176
|
required: false,
|
|
176
|
-
defaultValue:
|
|
177
|
+
defaultValue: null,
|
|
177
178
|
formType: FORM_TYPES.boolean,
|
|
178
179
|
propType: PROP_TYPES.BOOLEAN,
|
|
179
180
|
},
|
|
@@ -258,6 +259,16 @@ export const SEED_DATA = [
|
|
|
258
259
|
formType: FORM_TYPES.string,
|
|
259
260
|
propType: PROP_TYPES.STRING,
|
|
260
261
|
},
|
|
262
|
+
blurOnSubmit: {
|
|
263
|
+
group: GROUPS.advanced,
|
|
264
|
+
label: "Blur On Submit",
|
|
265
|
+
description: "If true, the text field will blur when submitted. ",
|
|
266
|
+
editable: true,
|
|
267
|
+
required: false,
|
|
268
|
+
defaultValue: null,
|
|
269
|
+
formType: FORM_TYPES.boolean,
|
|
270
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
271
|
+
},
|
|
261
272
|
returnKeyType: {
|
|
262
273
|
group: GROUPS.advanced,
|
|
263
274
|
label: "Return Key Type",
|
|
@@ -341,6 +352,7 @@ export const SEED_DATA = [
|
|
|
341
352
|
formType: FORM_TYPES.number,
|
|
342
353
|
propType: PROP_TYPES.NUMBER,
|
|
343
354
|
},
|
|
355
|
+
disabled: createDisabledProp(),
|
|
344
356
|
scrollEnabled: {
|
|
345
357
|
group: GROUPS.basic,
|
|
346
358
|
label: "Scroll Enabled",
|