@draftbit/core 47.0.1-5c6c55.2 → 47.0.1-ad0ed2.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/Button.js +3 -3
- package/lib/commonjs/components/Checkbox/Checkbox.js +1 -3
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +1 -2
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -2
- package/lib/commonjs/components/DeprecatedButton.js +3 -27
- package/lib/commonjs/components/DeprecatedFAB.js +1 -2
- package/lib/commonjs/components/Pressable.js +37 -0
- package/lib/commonjs/components/Touchable.js +8 -3
- package/lib/commonjs/mappings/Button.js +27 -9
- package/lib/commonjs/mappings/Touchable.js +39 -7
- package/lib/module/components/Button.js +3 -3
- package/lib/module/components/Checkbox/Checkbox.js +2 -3
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +2 -3
- package/lib/module/components/Checkbox/CheckboxRow.js +2 -3
- package/lib/module/components/DeprecatedButton.js +4 -28
- package/lib/module/components/DeprecatedFAB.js +2 -3
- package/lib/module/components/Pressable.js +30 -0
- package/lib/module/components/Touchable.js +8 -3
- package/lib/module/mappings/Button.js +28 -10
- package/lib/module/mappings/Touchable.js +41 -9
- package/lib/typescript/src/components/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +2 -2
- package/lib/typescript/src/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/components/Checkbox/CheckboxGroupRow.d.ts.map +1 -1
- package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts.map +1 -1
- package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedButton.d.ts.map +1 -1
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -1
- package/lib/typescript/src/components/Pressable.d.ts +16 -0
- package/lib/typescript/src/components/Pressable.d.ts.map +1 -0
- package/lib/typescript/src/components/Touchable.d.ts +7 -2
- package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Button.d.ts +93 -4
- package/lib/typescript/src/mappings/Button.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Touchable.d.ts +59 -5
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Button.js +3 -3
- package/src/components/Button.tsx +14 -4
- package/src/components/Checkbox/Checkbox.js +2 -3
- package/src/components/Checkbox/Checkbox.tsx +5 -7
- package/src/components/Checkbox/CheckboxGroupRow.js +2 -3
- package/src/components/Checkbox/CheckboxGroupRow.tsx +3 -3
- package/src/components/Checkbox/CheckboxRow.js +2 -3
- package/src/components/Checkbox/CheckboxRow.tsx +3 -3
- package/src/components/DeprecatedButton.js +4 -16
- package/src/components/DeprecatedButton.tsx +7 -31
- package/src/components/DeprecatedFAB.js +2 -3
- package/src/components/DeprecatedFAB.tsx +5 -5
- package/src/components/Pressable.js +12 -0
- package/src/components/Pressable.tsx +50 -0
- package/src/components/Touchable.js +3 -3
- package/src/components/Touchable.tsx +14 -4
- package/src/mappings/Button.js +27 -9
- package/src/mappings/Button.ts +29 -9
- package/src/mappings/Touchable.js +42 -7
- package/src/mappings/Touchable.ts +46 -6
- package/lib/commonjs/mappings/DatePickerModal.js +0 -75
- package/lib/module/mappings/DatePickerModal.js +0 -66
- package/lib/typescript/src/mappings/DatePickerModal.d.ts +0 -155
- package/lib/typescript/src/mappings/DatePickerModal.d.ts.map +0 -1
- package/src/mappings/DatePickerModal.js +0 -74
- package/src/mappings/DatePickerModal.ts +0 -92
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SHARED_SEED_DATA_PROPS = exports.SHARED_SEED_DATA = exports.SEED_DATA = void 0;
|
|
7
|
-
var _types = require("@draftbit/types");
|
|
8
|
-
const SHARED_SEED_DATA = {
|
|
9
|
-
packageName: "react-native-paper-dates",
|
|
10
|
-
triggers: [_types.Triggers.OnDismiss, _types.Triggers.OnConfirm, _types.Triggers.OnChange],
|
|
11
|
-
category: _types.COMPONENT_TYPES.input,
|
|
12
|
-
StylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position],
|
|
13
|
-
layout: null
|
|
14
|
-
};
|
|
15
|
-
exports.SHARED_SEED_DATA = SHARED_SEED_DATA;
|
|
16
|
-
const SHARED_SEED_DATA_PROPS = {
|
|
17
|
-
locale: {},
|
|
18
|
-
visible: (0, _types.createBoolProp)({
|
|
19
|
-
label: "Visible",
|
|
20
|
-
description: "If true, show the modal. If false, hide the modal.",
|
|
21
|
-
required: true
|
|
22
|
-
}),
|
|
23
|
-
label: (0, _types.createTextProp)({
|
|
24
|
-
label: "Label",
|
|
25
|
-
description: "Label used as the header in the component, defaults to `Select Date`"
|
|
26
|
-
}),
|
|
27
|
-
saveLabel: (0, _types.createTextProp)({
|
|
28
|
-
label: "Save Label",
|
|
29
|
-
description: "Label used to confirm a date selection. Defaults to `Save`."
|
|
30
|
-
}),
|
|
31
|
-
saveLabelDisabled: (0, _types.createStaticBoolProp)({
|
|
32
|
-
label: "Disable Save Label",
|
|
33
|
-
description: "Flag indicating if the save label should be disabled and unable to receive events"
|
|
34
|
-
}),
|
|
35
|
-
uppercase: (0, _types.createStaticBoolProp)({
|
|
36
|
-
label: "Uppercase",
|
|
37
|
-
description: "Flag indicating if the text in the component should be uppercase. Defaults to true."
|
|
38
|
-
}),
|
|
39
|
-
startYear: (0, _types.createStaticNumberProp)({
|
|
40
|
-
label: "Start Year",
|
|
41
|
-
description: "The start year when the component is rendered. Defaults to 1800.",
|
|
42
|
-
required: false
|
|
43
|
-
}),
|
|
44
|
-
endYear: (0, _types.createStaticNumberProp)({
|
|
45
|
-
label: "End Year",
|
|
46
|
-
description: "The end year when the component is rendered. Defaults to 2200.",
|
|
47
|
-
required: false
|
|
48
|
-
})
|
|
49
|
-
};
|
|
50
|
-
exports.SHARED_SEED_DATA_PROPS = SHARED_SEED_DATA_PROPS;
|
|
51
|
-
const SEED_DATA = [{
|
|
52
|
-
name: "Date Picker Modal",
|
|
53
|
-
tag: "DatePickerModal",
|
|
54
|
-
description: "A modal allowing date selection.",
|
|
55
|
-
...SHARED_SEED_DATA,
|
|
56
|
-
props: {
|
|
57
|
-
mode: (0, _types.createTextEnumProp)({
|
|
58
|
-
label: "Mode",
|
|
59
|
-
description: "The selection mode of the date picker",
|
|
60
|
-
required: true,
|
|
61
|
-
options: ["single", "multiple", "range"],
|
|
62
|
-
editable: false,
|
|
63
|
-
defaultValue: "single",
|
|
64
|
-
formType: _types.FORM_TYPES.flatArray
|
|
65
|
-
}),
|
|
66
|
-
fieldName: {
|
|
67
|
-
..._types.FIELD_NAME,
|
|
68
|
-
handlerPropName: "onConfirm",
|
|
69
|
-
valuePropName: "date",
|
|
70
|
-
defaultValue: "date"
|
|
71
|
-
},
|
|
72
|
-
...SHARED_SEED_DATA_PROPS
|
|
73
|
-
}
|
|
74
|
-
}];
|
|
75
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, FORM_TYPES, FIELD_NAME, Triggers, StylesPanelSections, createBoolProp, createTextProp, createTextEnumProp, createStaticBoolProp, createStaticNumberProp } from "@draftbit/types";
|
|
2
|
-
export const SHARED_SEED_DATA = {
|
|
3
|
-
packageName: "react-native-paper-dates",
|
|
4
|
-
triggers: [Triggers.OnDismiss, Triggers.OnConfirm, Triggers.OnChange],
|
|
5
|
-
category: COMPONENT_TYPES.input,
|
|
6
|
-
StylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position],
|
|
7
|
-
layout: null
|
|
8
|
-
};
|
|
9
|
-
export const SHARED_SEED_DATA_PROPS = {
|
|
10
|
-
locale: {},
|
|
11
|
-
visible: createBoolProp({
|
|
12
|
-
label: "Visible",
|
|
13
|
-
description: "If true, show the modal. If false, hide the modal.",
|
|
14
|
-
required: true
|
|
15
|
-
}),
|
|
16
|
-
label: createTextProp({
|
|
17
|
-
label: "Label",
|
|
18
|
-
description: "Label used as the header in the component, defaults to `Select Date`"
|
|
19
|
-
}),
|
|
20
|
-
saveLabel: createTextProp({
|
|
21
|
-
label: "Save Label",
|
|
22
|
-
description: "Label used to confirm a date selection. Defaults to `Save`."
|
|
23
|
-
}),
|
|
24
|
-
saveLabelDisabled: createStaticBoolProp({
|
|
25
|
-
label: "Disable Save Label",
|
|
26
|
-
description: "Flag indicating if the save label should be disabled and unable to receive events"
|
|
27
|
-
}),
|
|
28
|
-
uppercase: createStaticBoolProp({
|
|
29
|
-
label: "Uppercase",
|
|
30
|
-
description: "Flag indicating if the text in the component should be uppercase. Defaults to true."
|
|
31
|
-
}),
|
|
32
|
-
startYear: createStaticNumberProp({
|
|
33
|
-
label: "Start Year",
|
|
34
|
-
description: "The start year when the component is rendered. Defaults to 1800.",
|
|
35
|
-
required: false
|
|
36
|
-
}),
|
|
37
|
-
endYear: createStaticNumberProp({
|
|
38
|
-
label: "End Year",
|
|
39
|
-
description: "The end year when the component is rendered. Defaults to 2200.",
|
|
40
|
-
required: false
|
|
41
|
-
})
|
|
42
|
-
};
|
|
43
|
-
export const SEED_DATA = [{
|
|
44
|
-
name: "Date Picker Modal",
|
|
45
|
-
tag: "DatePickerModal",
|
|
46
|
-
description: "A modal allowing date selection.",
|
|
47
|
-
...SHARED_SEED_DATA,
|
|
48
|
-
props: {
|
|
49
|
-
mode: createTextEnumProp({
|
|
50
|
-
label: "Mode",
|
|
51
|
-
description: "The selection mode of the date picker",
|
|
52
|
-
required: true,
|
|
53
|
-
options: ["single", "multiple", "range"],
|
|
54
|
-
editable: false,
|
|
55
|
-
defaultValue: "single",
|
|
56
|
-
formType: FORM_TYPES.flatArray
|
|
57
|
-
}),
|
|
58
|
-
fieldName: {
|
|
59
|
-
...FIELD_NAME,
|
|
60
|
-
handlerPropName: "onConfirm",
|
|
61
|
-
valuePropName: "date",
|
|
62
|
-
defaultValue: "date"
|
|
63
|
-
},
|
|
64
|
-
...SHARED_SEED_DATA_PROPS
|
|
65
|
-
}
|
|
66
|
-
}];
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
export declare const SHARED_SEED_DATA: {
|
|
2
|
-
packageName: string;
|
|
3
|
-
triggers: string[];
|
|
4
|
-
category: string;
|
|
5
|
-
StylesPanelSections: string[];
|
|
6
|
-
layout: null;
|
|
7
|
-
};
|
|
8
|
-
export declare const SHARED_SEED_DATA_PROPS: {
|
|
9
|
-
locale: {};
|
|
10
|
-
visible: {
|
|
11
|
-
label: string;
|
|
12
|
-
description: string;
|
|
13
|
-
formType: string;
|
|
14
|
-
propType: string;
|
|
15
|
-
defaultValue: boolean;
|
|
16
|
-
editable: boolean;
|
|
17
|
-
required: boolean;
|
|
18
|
-
group: string;
|
|
19
|
-
};
|
|
20
|
-
label: any;
|
|
21
|
-
saveLabel: any;
|
|
22
|
-
saveLabelDisabled: {
|
|
23
|
-
label: string;
|
|
24
|
-
description: string;
|
|
25
|
-
formType: string;
|
|
26
|
-
propType: string;
|
|
27
|
-
defaultValue: boolean;
|
|
28
|
-
editable: boolean;
|
|
29
|
-
required: boolean;
|
|
30
|
-
group: string;
|
|
31
|
-
};
|
|
32
|
-
uppercase: {
|
|
33
|
-
label: string;
|
|
34
|
-
description: string;
|
|
35
|
-
formType: string;
|
|
36
|
-
propType: string;
|
|
37
|
-
defaultValue: boolean;
|
|
38
|
-
editable: boolean;
|
|
39
|
-
required: boolean;
|
|
40
|
-
group: string;
|
|
41
|
-
};
|
|
42
|
-
startYear: {
|
|
43
|
-
label: string;
|
|
44
|
-
description: string;
|
|
45
|
-
formType: string;
|
|
46
|
-
propType: string;
|
|
47
|
-
group: string;
|
|
48
|
-
defaultValue: null;
|
|
49
|
-
editable: boolean;
|
|
50
|
-
required: boolean;
|
|
51
|
-
step: number;
|
|
52
|
-
};
|
|
53
|
-
endYear: {
|
|
54
|
-
label: string;
|
|
55
|
-
description: string;
|
|
56
|
-
formType: string;
|
|
57
|
-
propType: string;
|
|
58
|
-
group: string;
|
|
59
|
-
defaultValue: null;
|
|
60
|
-
editable: boolean;
|
|
61
|
-
required: boolean;
|
|
62
|
-
step: number;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
export declare const SEED_DATA: {
|
|
66
|
-
props: {
|
|
67
|
-
locale: {};
|
|
68
|
-
visible: {
|
|
69
|
-
label: string;
|
|
70
|
-
description: string;
|
|
71
|
-
formType: string;
|
|
72
|
-
propType: string;
|
|
73
|
-
defaultValue: boolean;
|
|
74
|
-
editable: boolean;
|
|
75
|
-
required: boolean;
|
|
76
|
-
group: string;
|
|
77
|
-
};
|
|
78
|
-
label: any;
|
|
79
|
-
saveLabel: any;
|
|
80
|
-
saveLabelDisabled: {
|
|
81
|
-
label: string;
|
|
82
|
-
description: string;
|
|
83
|
-
formType: string;
|
|
84
|
-
propType: string;
|
|
85
|
-
defaultValue: boolean;
|
|
86
|
-
editable: boolean;
|
|
87
|
-
required: boolean;
|
|
88
|
-
group: string;
|
|
89
|
-
};
|
|
90
|
-
uppercase: {
|
|
91
|
-
label: string;
|
|
92
|
-
description: string;
|
|
93
|
-
formType: string;
|
|
94
|
-
propType: string;
|
|
95
|
-
defaultValue: boolean;
|
|
96
|
-
editable: boolean;
|
|
97
|
-
required: boolean;
|
|
98
|
-
group: string;
|
|
99
|
-
};
|
|
100
|
-
startYear: {
|
|
101
|
-
label: string;
|
|
102
|
-
description: string;
|
|
103
|
-
formType: string;
|
|
104
|
-
propType: string;
|
|
105
|
-
group: string;
|
|
106
|
-
defaultValue: null;
|
|
107
|
-
editable: boolean;
|
|
108
|
-
required: boolean;
|
|
109
|
-
step: number;
|
|
110
|
-
};
|
|
111
|
-
endYear: {
|
|
112
|
-
label: string;
|
|
113
|
-
description: string;
|
|
114
|
-
formType: string;
|
|
115
|
-
propType: string;
|
|
116
|
-
group: string;
|
|
117
|
-
defaultValue: null;
|
|
118
|
-
editable: boolean;
|
|
119
|
-
required: boolean;
|
|
120
|
-
step: number;
|
|
121
|
-
};
|
|
122
|
-
mode: {
|
|
123
|
-
group: string;
|
|
124
|
-
label: string;
|
|
125
|
-
description: string;
|
|
126
|
-
editable: boolean;
|
|
127
|
-
required: boolean;
|
|
128
|
-
formType: string;
|
|
129
|
-
propType: string;
|
|
130
|
-
defaultValue: null;
|
|
131
|
-
options: never[];
|
|
132
|
-
};
|
|
133
|
-
fieldName: {
|
|
134
|
-
handlerPropName: string;
|
|
135
|
-
valuePropName: string;
|
|
136
|
-
defaultValue: string;
|
|
137
|
-
group: string;
|
|
138
|
-
label: string;
|
|
139
|
-
description: string;
|
|
140
|
-
formType: string;
|
|
141
|
-
propType: string;
|
|
142
|
-
editable: boolean;
|
|
143
|
-
required: boolean;
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
packageName: string;
|
|
147
|
-
triggers: string[];
|
|
148
|
-
category: string;
|
|
149
|
-
StylesPanelSections: string[];
|
|
150
|
-
layout: null;
|
|
151
|
-
name: string;
|
|
152
|
-
tag: string;
|
|
153
|
-
description: string;
|
|
154
|
-
}[];
|
|
155
|
-
//# sourceMappingURL=DatePickerModal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DatePickerModal.d.ts","sourceRoot":"","sources":["../../../../src/mappings/DatePickerModal.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,gBAAgB;;;;;;CAY5B,CAAC;AACF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsClC,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyBrB,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, FORM_TYPES, FIELD_NAME, Triggers, StylesPanelSections, createBoolProp, createTextProp, createTextEnumProp, createStaticBoolProp, createStaticNumberProp, } from "@draftbit/types";
|
|
2
|
-
export const SHARED_SEED_DATA = {
|
|
3
|
-
packageName: "react-native-paper-dates",
|
|
4
|
-
triggers: [Triggers.OnDismiss, Triggers.OnConfirm, Triggers.OnChange],
|
|
5
|
-
category: COMPONENT_TYPES.input,
|
|
6
|
-
StylesPanelSections: [
|
|
7
|
-
StylesPanelSections.Typography,
|
|
8
|
-
StylesPanelSections.Background,
|
|
9
|
-
StylesPanelSections.Size,
|
|
10
|
-
StylesPanelSections.MarginsAndPaddings,
|
|
11
|
-
StylesPanelSections.Position,
|
|
12
|
-
],
|
|
13
|
-
layout: null,
|
|
14
|
-
};
|
|
15
|
-
export const SHARED_SEED_DATA_PROPS = {
|
|
16
|
-
locale: {},
|
|
17
|
-
visible: createBoolProp({
|
|
18
|
-
label: "Visible",
|
|
19
|
-
description: "If true, show the modal. If false, hide the modal.",
|
|
20
|
-
required: true,
|
|
21
|
-
}),
|
|
22
|
-
label: createTextProp({
|
|
23
|
-
label: "Label",
|
|
24
|
-
description: "Label used as the header in the component, defaults to `Select Date`",
|
|
25
|
-
}),
|
|
26
|
-
saveLabel: createTextProp({
|
|
27
|
-
label: "Save Label",
|
|
28
|
-
description: "Label used to confirm a date selection. Defaults to `Save`.",
|
|
29
|
-
}),
|
|
30
|
-
saveLabelDisabled: createStaticBoolProp({
|
|
31
|
-
label: "Disable Save Label",
|
|
32
|
-
description: "Flag indicating if the save label should be disabled and unable to receive events",
|
|
33
|
-
}),
|
|
34
|
-
uppercase: createStaticBoolProp({
|
|
35
|
-
label: "Uppercase",
|
|
36
|
-
description: "Flag indicating if the text in the component should be uppercase. Defaults to true.",
|
|
37
|
-
}),
|
|
38
|
-
startYear: createStaticNumberProp({
|
|
39
|
-
label: "Start Year",
|
|
40
|
-
description: "The start year when the component is rendered. Defaults to 1800.",
|
|
41
|
-
required: false,
|
|
42
|
-
}),
|
|
43
|
-
endYear: createStaticNumberProp({
|
|
44
|
-
label: "End Year",
|
|
45
|
-
description: "The end year when the component is rendered. Defaults to 2200.",
|
|
46
|
-
required: false,
|
|
47
|
-
}),
|
|
48
|
-
};
|
|
49
|
-
export const SEED_DATA = [
|
|
50
|
-
{
|
|
51
|
-
name: "Date Picker Modal",
|
|
52
|
-
tag: "DatePickerModal",
|
|
53
|
-
description: "A modal allowing date selection.",
|
|
54
|
-
...SHARED_SEED_DATA,
|
|
55
|
-
props: {
|
|
56
|
-
mode: createTextEnumProp({
|
|
57
|
-
label: "Mode",
|
|
58
|
-
description: "The selection mode of the date picker",
|
|
59
|
-
required: true,
|
|
60
|
-
options: ["single", "multiple", "range"],
|
|
61
|
-
editable: false,
|
|
62
|
-
defaultValue: "single",
|
|
63
|
-
formType: FORM_TYPES.flatArray,
|
|
64
|
-
}),
|
|
65
|
-
fieldName: {
|
|
66
|
-
...FIELD_NAME,
|
|
67
|
-
handlerPropName: "onConfirm",
|
|
68
|
-
valuePropName: "date",
|
|
69
|
-
defaultValue: "date",
|
|
70
|
-
},
|
|
71
|
-
...SHARED_SEED_DATA_PROPS,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
];
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
COMPONENT_TYPES,
|
|
3
|
-
FORM_TYPES,
|
|
4
|
-
FIELD_NAME,
|
|
5
|
-
Triggers,
|
|
6
|
-
StylesPanelSections,
|
|
7
|
-
createBoolProp,
|
|
8
|
-
createTextProp,
|
|
9
|
-
createTextEnumProp,
|
|
10
|
-
createStaticBoolProp,
|
|
11
|
-
createStaticNumberProp,
|
|
12
|
-
} from "@draftbit/types";
|
|
13
|
-
|
|
14
|
-
export const SHARED_SEED_DATA = {
|
|
15
|
-
packageName: "react-native-paper-dates",
|
|
16
|
-
triggers: [Triggers.OnDismiss, Triggers.OnConfirm, Triggers.OnChange],
|
|
17
|
-
category: COMPONENT_TYPES.input,
|
|
18
|
-
StylesPanelSections: [
|
|
19
|
-
StylesPanelSections.Typography,
|
|
20
|
-
StylesPanelSections.Background,
|
|
21
|
-
StylesPanelSections.Size,
|
|
22
|
-
StylesPanelSections.MarginsAndPaddings,
|
|
23
|
-
StylesPanelSections.Position,
|
|
24
|
-
],
|
|
25
|
-
layout: null,
|
|
26
|
-
};
|
|
27
|
-
export const SHARED_SEED_DATA_PROPS = {
|
|
28
|
-
locale: {},
|
|
29
|
-
visible: createBoolProp({
|
|
30
|
-
label: "Visible",
|
|
31
|
-
description: "If true, show the modal. If false, hide the modal.",
|
|
32
|
-
required: true,
|
|
33
|
-
}),
|
|
34
|
-
label: createTextProp({
|
|
35
|
-
label: "Label",
|
|
36
|
-
description:
|
|
37
|
-
"Label used as the header in the component, defaults to `Select Date`",
|
|
38
|
-
}),
|
|
39
|
-
saveLabel: createTextProp({
|
|
40
|
-
label: "Save Label",
|
|
41
|
-
description: "Label used to confirm a date selection. Defaults to `Save`.",
|
|
42
|
-
}),
|
|
43
|
-
saveLabelDisabled: createStaticBoolProp({
|
|
44
|
-
label: "Disable Save Label",
|
|
45
|
-
description:
|
|
46
|
-
"Flag indicating if the save label should be disabled and unable to receive events",
|
|
47
|
-
}),
|
|
48
|
-
uppercase: createStaticBoolProp({
|
|
49
|
-
label: "Uppercase",
|
|
50
|
-
description:
|
|
51
|
-
"Flag indicating if the text in the component should be uppercase. Defaults to true.",
|
|
52
|
-
}),
|
|
53
|
-
startYear: createStaticNumberProp({
|
|
54
|
-
label: "Start Year",
|
|
55
|
-
description:
|
|
56
|
-
"The start year when the component is rendered. Defaults to 1800.",
|
|
57
|
-
required: false,
|
|
58
|
-
}),
|
|
59
|
-
endYear: createStaticNumberProp({
|
|
60
|
-
label: "End Year",
|
|
61
|
-
description:
|
|
62
|
-
"The end year when the component is rendered. Defaults to 2200.",
|
|
63
|
-
required: false,
|
|
64
|
-
}),
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const SEED_DATA = [
|
|
68
|
-
{
|
|
69
|
-
name: "Date Picker Modal",
|
|
70
|
-
tag: "DatePickerModal",
|
|
71
|
-
description: "A modal allowing date selection.",
|
|
72
|
-
...SHARED_SEED_DATA,
|
|
73
|
-
props: {
|
|
74
|
-
mode: createTextEnumProp({
|
|
75
|
-
label: "Mode",
|
|
76
|
-
description: "The selection mode of the date picker",
|
|
77
|
-
required: true,
|
|
78
|
-
options: ["single", "multiple", "range"],
|
|
79
|
-
editable: false,
|
|
80
|
-
defaultValue: "single",
|
|
81
|
-
formType: FORM_TYPES.flatArray,
|
|
82
|
-
}),
|
|
83
|
-
fieldName: {
|
|
84
|
-
...FIELD_NAME,
|
|
85
|
-
handlerPropName: "onConfirm",
|
|
86
|
-
valuePropName: "date",
|
|
87
|
-
defaultValue: "date",
|
|
88
|
-
},
|
|
89
|
-
...SHARED_SEED_DATA_PROPS,
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
];
|