@draftbit/core 46.2.0 → 46.2.1-327d47.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/components/CardBlock.js +15 -5
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +2 -4
- package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -6
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js +17 -3
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +7 -8
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -20
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js +21 -4
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +17 -5
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/Text.js +38 -11
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/mappings/BlurView.js.map +1 -1
- package/lib/commonjs/mappings/CardContainerRating.js.map +1 -1
- package/lib/commonjs/mappings/Checkbox.js.map +1 -1
- package/lib/commonjs/mappings/NumberInput.js +241 -0
- package/lib/commonjs/mappings/NumberInput.js.map +1 -0
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/Text.js +33 -26
- package/lib/commonjs/mappings/Text.js.map +1 -1
- package/lib/commonjs/mappings/TextArea.js +192 -2
- package/lib/commonjs/mappings/TextArea.js.map +1 -1
- package/lib/commonjs/mappings/TextField.js +191 -2
- package/lib/commonjs/mappings/TextField.js.map +1 -1
- package/lib/commonjs/mappings/TextInput.js +180 -29
- package/lib/commonjs/mappings/TextInput.js.map +1 -1
- package/lib/commonjs/mappings/Video.js.map +1 -1
- package/lib/commonjs/styles/DarkTheme.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/module/mappings/NumberInput.js +231 -0
- package/lib/module/mappings/NumberInput.js.map +1 -0
- package/lib/module/mappings/Surface.js.map +1 -1
- package/lib/module/mappings/Text.js +33 -26
- package/lib/module/mappings/Text.js.map +1 -1
- package/lib/module/mappings/TextArea.js +193 -3
- package/lib/module/mappings/TextArea.js.map +1 -1
- package/lib/module/mappings/TextField.js +192 -3
- package/lib/module/mappings/TextField.js.map +1 -1
- package/lib/module/mappings/TextInput.js +180 -29
- package/lib/module/mappings/TextInput.js.map +1 -1
- package/lib/typescript/src/mappings/NumberInput.d.ts +297 -0
- package/lib/typescript/src/mappings/Text.d.ts +24 -10
- package/lib/typescript/src/mappings/TextArea.d.ts +12 -11
- package/lib/typescript/src/mappings/TextField.d.ts +4 -4
- package/lib/typescript/src/mappings/TextInput.d.ts +3 -254
- package/package.json +2 -2
- package/src/mappings/NumberInput.js +248 -0
- package/src/mappings/NumberInput.ts +267 -0
- package/src/mappings/Text.js +33 -26
- package/src/mappings/Text.ts +34 -27
- package/src/mappings/TextArea.js +221 -3
- package/src/mappings/TextArea.ts +227 -3
- package/src/mappings/TextField.js +220 -3
- package/src/mappings/TextField.ts +227 -3
- package/src/mappings/TextInput.js +208 -31
- package/src/mappings/TextInput.ts +214 -34
|
@@ -63,7 +63,7 @@ export declare const SEED_DATA_PROPS: {
|
|
|
63
63
|
required: boolean;
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
export declare const SEED_DATA:
|
|
66
|
+
export declare const SEED_DATA: {
|
|
67
67
|
name: string;
|
|
68
68
|
tag: string;
|
|
69
69
|
description: string;
|
|
@@ -273,23 +273,13 @@ export declare const SEED_DATA: ({
|
|
|
273
273
|
formType: string;
|
|
274
274
|
propType: string;
|
|
275
275
|
};
|
|
276
|
-
disabled: {
|
|
277
|
-
group: string;
|
|
278
|
-
label: string;
|
|
279
|
-
description: string;
|
|
280
|
-
formType: string;
|
|
281
|
-
propType: string;
|
|
282
|
-
defaultValue: null;
|
|
283
|
-
editable: boolean;
|
|
284
|
-
required: boolean;
|
|
285
|
-
};
|
|
286
276
|
editable: {
|
|
287
277
|
group: string;
|
|
288
278
|
label: string;
|
|
289
279
|
description: string;
|
|
290
280
|
editable: boolean;
|
|
291
281
|
required: boolean;
|
|
292
|
-
defaultValue:
|
|
282
|
+
defaultValue: boolean;
|
|
293
283
|
formType: string;
|
|
294
284
|
propType: string;
|
|
295
285
|
};
|
|
@@ -400,245 +390,4 @@ export declare const SEED_DATA: ({
|
|
|
400
390
|
propType: string;
|
|
401
391
|
};
|
|
402
392
|
};
|
|
403
|
-
}
|
|
404
|
-
name: string;
|
|
405
|
-
tag: string;
|
|
406
|
-
description: string;
|
|
407
|
-
category: string;
|
|
408
|
-
preview_image_url: string;
|
|
409
|
-
supports_list_render: boolean;
|
|
410
|
-
layout: {
|
|
411
|
-
borderLeftWidth: number;
|
|
412
|
-
borderRightWidth: number;
|
|
413
|
-
borderTopWidth: number;
|
|
414
|
-
borderBottomWidth: number;
|
|
415
|
-
borderColor: string;
|
|
416
|
-
paddingLeft: number;
|
|
417
|
-
paddingRight: number;
|
|
418
|
-
paddingTop: number;
|
|
419
|
-
paddingBottom: number;
|
|
420
|
-
borderRadius: number;
|
|
421
|
-
};
|
|
422
|
-
triggers: string[];
|
|
423
|
-
props: {
|
|
424
|
-
fieldName: {
|
|
425
|
-
handlerPropName: string;
|
|
426
|
-
group: string;
|
|
427
|
-
label: string;
|
|
428
|
-
description: string;
|
|
429
|
-
formType: string;
|
|
430
|
-
propType: string;
|
|
431
|
-
defaultValue: string;
|
|
432
|
-
valuePropName: string;
|
|
433
|
-
editable: boolean;
|
|
434
|
-
required: boolean;
|
|
435
|
-
};
|
|
436
|
-
allowFontScaling: {
|
|
437
|
-
group: string;
|
|
438
|
-
label: string;
|
|
439
|
-
description: string;
|
|
440
|
-
editable: boolean;
|
|
441
|
-
required: boolean;
|
|
442
|
-
defaultValue: null;
|
|
443
|
-
formType: string;
|
|
444
|
-
propType: string;
|
|
445
|
-
};
|
|
446
|
-
autoFocus: {
|
|
447
|
-
group: string;
|
|
448
|
-
label: string;
|
|
449
|
-
description: string;
|
|
450
|
-
editable: boolean;
|
|
451
|
-
required: boolean;
|
|
452
|
-
defaultValue: null;
|
|
453
|
-
formType: string;
|
|
454
|
-
propType: string;
|
|
455
|
-
};
|
|
456
|
-
caretHidden: {
|
|
457
|
-
group: string;
|
|
458
|
-
label: string;
|
|
459
|
-
description: string;
|
|
460
|
-
editable: boolean;
|
|
461
|
-
required: boolean;
|
|
462
|
-
defaultValue: null;
|
|
463
|
-
formType: string;
|
|
464
|
-
propType: string;
|
|
465
|
-
};
|
|
466
|
-
contextMenuHidden: {
|
|
467
|
-
group: string;
|
|
468
|
-
label: string;
|
|
469
|
-
description: string;
|
|
470
|
-
editable: boolean;
|
|
471
|
-
required: boolean;
|
|
472
|
-
defaultValue: null;
|
|
473
|
-
formType: string;
|
|
474
|
-
propType: string;
|
|
475
|
-
};
|
|
476
|
-
disabled: {
|
|
477
|
-
group: string;
|
|
478
|
-
label: string;
|
|
479
|
-
description: string;
|
|
480
|
-
formType: string;
|
|
481
|
-
propType: string;
|
|
482
|
-
defaultValue: null;
|
|
483
|
-
editable: boolean;
|
|
484
|
-
required: boolean;
|
|
485
|
-
};
|
|
486
|
-
editable: {
|
|
487
|
-
group: string;
|
|
488
|
-
label: string;
|
|
489
|
-
description: string;
|
|
490
|
-
editable: boolean;
|
|
491
|
-
required: boolean;
|
|
492
|
-
defaultValue: null;
|
|
493
|
-
formType: string;
|
|
494
|
-
propType: string;
|
|
495
|
-
};
|
|
496
|
-
keyboardAppearance: {
|
|
497
|
-
group: string;
|
|
498
|
-
label: string;
|
|
499
|
-
description: string;
|
|
500
|
-
editable: boolean;
|
|
501
|
-
required: boolean;
|
|
502
|
-
defaultValue: null;
|
|
503
|
-
options: string[];
|
|
504
|
-
formType: string;
|
|
505
|
-
propType: string;
|
|
506
|
-
};
|
|
507
|
-
keyboardType: {
|
|
508
|
-
group: string;
|
|
509
|
-
label: string;
|
|
510
|
-
description: string;
|
|
511
|
-
editable: boolean;
|
|
512
|
-
required: boolean;
|
|
513
|
-
defaultValue: null;
|
|
514
|
-
options: string[];
|
|
515
|
-
formType: string;
|
|
516
|
-
propType: string;
|
|
517
|
-
};
|
|
518
|
-
maxLength: {
|
|
519
|
-
group: string;
|
|
520
|
-
label: string;
|
|
521
|
-
description: string;
|
|
522
|
-
editable: boolean;
|
|
523
|
-
required: boolean;
|
|
524
|
-
defaultValue: null;
|
|
525
|
-
min: number;
|
|
526
|
-
step: number;
|
|
527
|
-
precision: number;
|
|
528
|
-
formType: string;
|
|
529
|
-
propType: string;
|
|
530
|
-
};
|
|
531
|
-
placeholder: {
|
|
532
|
-
group: string;
|
|
533
|
-
label: string;
|
|
534
|
-
description: string;
|
|
535
|
-
editable: boolean;
|
|
536
|
-
required: boolean;
|
|
537
|
-
defaultValue: string;
|
|
538
|
-
formType: string;
|
|
539
|
-
propType: string;
|
|
540
|
-
};
|
|
541
|
-
placeholderTextColor: {
|
|
542
|
-
group: string;
|
|
543
|
-
label: string;
|
|
544
|
-
description: string;
|
|
545
|
-
editable: boolean;
|
|
546
|
-
required: boolean;
|
|
547
|
-
defaultValue: null;
|
|
548
|
-
formType: string;
|
|
549
|
-
propType: string;
|
|
550
|
-
};
|
|
551
|
-
returnKeyLabel: {
|
|
552
|
-
group: string;
|
|
553
|
-
label: string;
|
|
554
|
-
description: string;
|
|
555
|
-
editable: boolean;
|
|
556
|
-
required: boolean;
|
|
557
|
-
defaultValue: null;
|
|
558
|
-
formType: string;
|
|
559
|
-
propType: string;
|
|
560
|
-
};
|
|
561
|
-
returnKeyType: {
|
|
562
|
-
group: string;
|
|
563
|
-
label: string;
|
|
564
|
-
description: string;
|
|
565
|
-
editable: boolean;
|
|
566
|
-
required: boolean;
|
|
567
|
-
defaultValue: null;
|
|
568
|
-
options: string[];
|
|
569
|
-
formType: string;
|
|
570
|
-
propType: string;
|
|
571
|
-
};
|
|
572
|
-
selectionColor: {
|
|
573
|
-
group: string;
|
|
574
|
-
label: string;
|
|
575
|
-
description: string;
|
|
576
|
-
editable: boolean;
|
|
577
|
-
required: boolean;
|
|
578
|
-
defaultValue: null;
|
|
579
|
-
formType: string;
|
|
580
|
-
propType: string;
|
|
581
|
-
};
|
|
582
|
-
selectTextOnFocus: {
|
|
583
|
-
group: string;
|
|
584
|
-
label: string;
|
|
585
|
-
description: string;
|
|
586
|
-
editable: boolean;
|
|
587
|
-
required: boolean;
|
|
588
|
-
defaultValue: null;
|
|
589
|
-
formType: string;
|
|
590
|
-
propType: string;
|
|
591
|
-
};
|
|
592
|
-
style: {
|
|
593
|
-
group: string;
|
|
594
|
-
label: string;
|
|
595
|
-
description: string;
|
|
596
|
-
editable: boolean;
|
|
597
|
-
required: boolean;
|
|
598
|
-
formType: string;
|
|
599
|
-
propType: string;
|
|
600
|
-
defaultValue: null;
|
|
601
|
-
};
|
|
602
|
-
clearButtonMode: {
|
|
603
|
-
group: string;
|
|
604
|
-
label: string;
|
|
605
|
-
description: string;
|
|
606
|
-
editable: boolean;
|
|
607
|
-
required: boolean;
|
|
608
|
-
options: string[];
|
|
609
|
-
defaultValue: null;
|
|
610
|
-
formType: string;
|
|
611
|
-
propType: string;
|
|
612
|
-
};
|
|
613
|
-
clearTextOnFocus: {
|
|
614
|
-
group: string;
|
|
615
|
-
label: string;
|
|
616
|
-
description: string;
|
|
617
|
-
editable: boolean;
|
|
618
|
-
required: boolean;
|
|
619
|
-
defaultValue: null;
|
|
620
|
-
formType: string;
|
|
621
|
-
propType: string;
|
|
622
|
-
};
|
|
623
|
-
enablesReturnKeyAutomatically: {
|
|
624
|
-
group: string;
|
|
625
|
-
label: string;
|
|
626
|
-
description: string;
|
|
627
|
-
editable: boolean;
|
|
628
|
-
required: boolean;
|
|
629
|
-
defaultValue: null;
|
|
630
|
-
formType: string;
|
|
631
|
-
propType: string;
|
|
632
|
-
};
|
|
633
|
-
underlineColorAndroid: {
|
|
634
|
-
group: string;
|
|
635
|
-
label: string;
|
|
636
|
-
description: string;
|
|
637
|
-
editable: boolean;
|
|
638
|
-
required: boolean;
|
|
639
|
-
defaultValue: null;
|
|
640
|
-
formType: string;
|
|
641
|
-
propType: string;
|
|
642
|
-
};
|
|
643
|
-
};
|
|
644
|
-
})[];
|
|
393
|
+
}[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.2.
|
|
3
|
+
"version": "46.2.1-327d47.2+327d47fe",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
]
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "327d47feb57a60c010c5a43d7801150936787101"
|
|
83
83
|
}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, FIELD_NAME, Triggers, } from "@draftbit/types";
|
|
2
|
+
const NUMBER_INPUT_PROPS = {
|
|
3
|
+
allowFontScaling: {
|
|
4
|
+
group: GROUPS.advanced,
|
|
5
|
+
label: "Allow Font Scaling",
|
|
6
|
+
description: "Whether fonts should scale to respect Text Size in the user's accessibility settings. (Default: true)",
|
|
7
|
+
editable: true,
|
|
8
|
+
required: false,
|
|
9
|
+
defaultValue: null,
|
|
10
|
+
formType: FORM_TYPES.boolean,
|
|
11
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
12
|
+
},
|
|
13
|
+
autoFocus: {
|
|
14
|
+
group: GROUPS.basic,
|
|
15
|
+
label: "Auto Focus",
|
|
16
|
+
description: "Focuses the input on load in and brings up the keyboard",
|
|
17
|
+
editable: true,
|
|
18
|
+
required: false,
|
|
19
|
+
defaultValue: null,
|
|
20
|
+
formType: FORM_TYPES.boolean,
|
|
21
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
22
|
+
},
|
|
23
|
+
caretHidden: {
|
|
24
|
+
group: GROUPS.advanced,
|
|
25
|
+
label: "Hide Caret",
|
|
26
|
+
description: "Hides the caret(the line small line underneath each showing where you're editing/typing",
|
|
27
|
+
editable: true,
|
|
28
|
+
required: false,
|
|
29
|
+
defaultValue: null,
|
|
30
|
+
formType: FORM_TYPES.boolean,
|
|
31
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
32
|
+
},
|
|
33
|
+
contextMenuHidden: {
|
|
34
|
+
group: GROUPS.advanced,
|
|
35
|
+
label: "Hide Context Menu",
|
|
36
|
+
description: "Hides the system context menu (Default: false)",
|
|
37
|
+
editable: true,
|
|
38
|
+
required: false,
|
|
39
|
+
defaultValue: null,
|
|
40
|
+
formType: FORM_TYPES.boolean,
|
|
41
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
42
|
+
},
|
|
43
|
+
editable: {
|
|
44
|
+
group: GROUPS.advanced,
|
|
45
|
+
label: "Editable",
|
|
46
|
+
description: "If false, the text is not editable",
|
|
47
|
+
editable: true,
|
|
48
|
+
required: false,
|
|
49
|
+
defaultValue: true,
|
|
50
|
+
formType: FORM_TYPES.boolean,
|
|
51
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
52
|
+
},
|
|
53
|
+
keyboardAppearance: {
|
|
54
|
+
group: GROUPS.advanced,
|
|
55
|
+
label: "Keyboard Appearance",
|
|
56
|
+
description: "Determines the color of the keyboard.(iOS Only)",
|
|
57
|
+
editable: true,
|
|
58
|
+
required: false,
|
|
59
|
+
defaultValue: null,
|
|
60
|
+
options: ["default", "light", "dark"],
|
|
61
|
+
formType: FORM_TYPES.flatArray,
|
|
62
|
+
propType: PROP_TYPES.STRING,
|
|
63
|
+
},
|
|
64
|
+
keyboardType: {
|
|
65
|
+
group: GROUPS.advanced,
|
|
66
|
+
label: "Keyboard Type",
|
|
67
|
+
description: "Determines what keyboard is given to the user.",
|
|
68
|
+
editable: true,
|
|
69
|
+
required: false,
|
|
70
|
+
defaultValue: null,
|
|
71
|
+
options: ["numeric", "numbers-and-punctuation", "number-pad"],
|
|
72
|
+
formType: FORM_TYPES.flatArray,
|
|
73
|
+
propType: PROP_TYPES.STRING,
|
|
74
|
+
},
|
|
75
|
+
maxLength: {
|
|
76
|
+
group: GROUPS.basic,
|
|
77
|
+
label: "Max Length",
|
|
78
|
+
description: "Limits the input to a set number of characters.",
|
|
79
|
+
editable: true,
|
|
80
|
+
required: false,
|
|
81
|
+
defaultValue: null,
|
|
82
|
+
min: 0,
|
|
83
|
+
step: 1,
|
|
84
|
+
precision: 0,
|
|
85
|
+
formType: FORM_TYPES.number,
|
|
86
|
+
propType: PROP_TYPES.NUMBER,
|
|
87
|
+
},
|
|
88
|
+
placeholder: {
|
|
89
|
+
group: GROUPS.basic,
|
|
90
|
+
label: "Placeholder Text",
|
|
91
|
+
description: "The text that is shown on load when no value is available.",
|
|
92
|
+
editable: true,
|
|
93
|
+
required: false,
|
|
94
|
+
defaultValue: "Enter a number...",
|
|
95
|
+
formType: FORM_TYPES.string,
|
|
96
|
+
propType: PROP_TYPES.STRING,
|
|
97
|
+
},
|
|
98
|
+
placeholderTextColor: {
|
|
99
|
+
group: GROUPS.basic,
|
|
100
|
+
label: "Placeholder Text Color",
|
|
101
|
+
description: "The color of the placeholder text.",
|
|
102
|
+
editable: true,
|
|
103
|
+
required: false,
|
|
104
|
+
defaultValue: null,
|
|
105
|
+
formType: FORM_TYPES.color,
|
|
106
|
+
propType: PROP_TYPES.STRING,
|
|
107
|
+
},
|
|
108
|
+
returnKeyLabel: {
|
|
109
|
+
group: GROUPS.advanced,
|
|
110
|
+
label: "Return Key Label",
|
|
111
|
+
description: "(Android Only) Sets the label on the return key (use this instead of rewturnKeyType)",
|
|
112
|
+
editable: true,
|
|
113
|
+
required: false,
|
|
114
|
+
defaultValue: null,
|
|
115
|
+
formType: FORM_TYPES.string,
|
|
116
|
+
propType: PROP_TYPES.STRING,
|
|
117
|
+
},
|
|
118
|
+
returnKeyType: {
|
|
119
|
+
group: GROUPS.advanced,
|
|
120
|
+
label: "Return Key Type",
|
|
121
|
+
description: "Determines how the return key should look like",
|
|
122
|
+
editable: true,
|
|
123
|
+
required: false,
|
|
124
|
+
defaultValue: null,
|
|
125
|
+
options: [
|
|
126
|
+
"done",
|
|
127
|
+
"go",
|
|
128
|
+
"next",
|
|
129
|
+
"search",
|
|
130
|
+
"send",
|
|
131
|
+
"none",
|
|
132
|
+
"previous",
|
|
133
|
+
"default",
|
|
134
|
+
"emergency-call",
|
|
135
|
+
"google",
|
|
136
|
+
"join",
|
|
137
|
+
"route",
|
|
138
|
+
"yahoo",
|
|
139
|
+
],
|
|
140
|
+
formType: FORM_TYPES.flatArray,
|
|
141
|
+
propType: PROP_TYPES.STRING,
|
|
142
|
+
},
|
|
143
|
+
selectionColor: {
|
|
144
|
+
group: GROUPS.advanced,
|
|
145
|
+
label: "Selection Color",
|
|
146
|
+
description: "Color of the highlighted portion when selecting.",
|
|
147
|
+
editable: true,
|
|
148
|
+
required: false,
|
|
149
|
+
defaultValue: null,
|
|
150
|
+
formType: FORM_TYPES.color,
|
|
151
|
+
propType: PROP_TYPES.STRING,
|
|
152
|
+
},
|
|
153
|
+
selectTextOnFocus: {
|
|
154
|
+
group: GROUPS.advanced,
|
|
155
|
+
label: "Select Text on Focus",
|
|
156
|
+
description: "If true, all the text will automatically be selected on focus",
|
|
157
|
+
editable: true,
|
|
158
|
+
required: false,
|
|
159
|
+
defaultValue: null,
|
|
160
|
+
formType: FORM_TYPES.boolean,
|
|
161
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
export const SEED_DATA_PROPS = {
|
|
165
|
+
style: {
|
|
166
|
+
group: GROUPS.basic,
|
|
167
|
+
label: "Style",
|
|
168
|
+
description: "Text Style",
|
|
169
|
+
editable: false,
|
|
170
|
+
required: false,
|
|
171
|
+
formType: FORM_TYPES.typeStyle,
|
|
172
|
+
propType: PROP_TYPES.THEME,
|
|
173
|
+
defaultValue: null,
|
|
174
|
+
},
|
|
175
|
+
clearButtonMode: {
|
|
176
|
+
group: GROUPS.basic,
|
|
177
|
+
label: "Clear Button Mode",
|
|
178
|
+
description: "Enables a button within the textInput to clear the data entered",
|
|
179
|
+
editable: true,
|
|
180
|
+
required: false,
|
|
181
|
+
options: ["never", "while-editing", "unless-editing", "always"],
|
|
182
|
+
defaultValue: null,
|
|
183
|
+
formType: FORM_TYPES.flatArray,
|
|
184
|
+
propType: PROP_TYPES.STRING,
|
|
185
|
+
},
|
|
186
|
+
clearTextOnFocus: {
|
|
187
|
+
group: GROUPS.basic,
|
|
188
|
+
label: "Clear Text on Focus",
|
|
189
|
+
description: "If true, clears the text field automatically when its focused.",
|
|
190
|
+
editable: true,
|
|
191
|
+
required: false,
|
|
192
|
+
defaultValue: null,
|
|
193
|
+
formType: FORM_TYPES.boolean,
|
|
194
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
195
|
+
},
|
|
196
|
+
enablesReturnKeyAutomatically: {
|
|
197
|
+
group: GROUPS.basic,
|
|
198
|
+
label: "Enables Return Key Automatically",
|
|
199
|
+
description: "If true, the keyboard disables the return key when there is no text and automatically enables it when there is (Default: false)",
|
|
200
|
+
editable: true,
|
|
201
|
+
required: false,
|
|
202
|
+
defaultValue: null,
|
|
203
|
+
formType: FORM_TYPES.boolean,
|
|
204
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
205
|
+
},
|
|
206
|
+
underlineColorAndroid: {
|
|
207
|
+
group: GROUPS.basic,
|
|
208
|
+
label: "Underline color",
|
|
209
|
+
description: "(Android Only) The color of the underline(the line underneath the text when finished typing.",
|
|
210
|
+
editable: true,
|
|
211
|
+
required: false,
|
|
212
|
+
defaultValue: null,
|
|
213
|
+
formType: FORM_TYPES.color,
|
|
214
|
+
propType: PROP_TYPES.THEME,
|
|
215
|
+
},
|
|
216
|
+
fieldName: {
|
|
217
|
+
...FIELD_NAME,
|
|
218
|
+
defaultValue: "numberInputValue",
|
|
219
|
+
handlerPropName: "onChangeText",
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
export const SEED_DATA = [
|
|
223
|
+
{
|
|
224
|
+
name: "Number Input",
|
|
225
|
+
tag: "NumberInput",
|
|
226
|
+
description: "An input field that allows users to type in data.",
|
|
227
|
+
category: COMPONENT_TYPES.input,
|
|
228
|
+
preview_image_url: "https://res.cloudinary.com/altos/image/upload/draftbit/Jigsaw/TextInput.png",
|
|
229
|
+
supports_list_render: false,
|
|
230
|
+
layout: {
|
|
231
|
+
borderLeftWidth: 1,
|
|
232
|
+
borderRightWidth: 1,
|
|
233
|
+
borderTopWidth: 1,
|
|
234
|
+
borderBottomWidth: 1,
|
|
235
|
+
borderColor: "divider",
|
|
236
|
+
paddingLeft: 8,
|
|
237
|
+
paddingRight: 8,
|
|
238
|
+
paddingTop: 8,
|
|
239
|
+
paddingBottom: 8,
|
|
240
|
+
borderRadius: 8,
|
|
241
|
+
},
|
|
242
|
+
triggers: [Triggers.OnChangeText],
|
|
243
|
+
props: {
|
|
244
|
+
...SEED_DATA_PROPS,
|
|
245
|
+
...NUMBER_INPUT_PROPS,
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
];
|