@draftbit/core 47.0.1-54c307.2 → 47.0.1-5c6c55.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.
@@ -328,7 +328,7 @@ const DatePicker = _ref => {
328
328
  onFocus: _handleFocus,
329
329
  onBlur: _handleBlur,
330
330
  underlineColorAndroid: "transparent",
331
- style: [inputStyles, textStyles, viewStyles]
331
+ style: [inputStyles, textStyles]
332
332
  }, props))), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
333
333
  name: rightIconName,
334
334
  size: ICON_SIZE,
@@ -0,0 +1,75 @@
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;
@@ -319,7 +319,7 @@ const DatePicker = _ref => {
319
319
  onFocus: _handleFocus,
320
320
  onBlur: _handleBlur,
321
321
  underlineColorAndroid: "transparent",
322
- style: [inputStyles, textStyles, viewStyles]
322
+ style: [inputStyles, textStyles]
323
323
  }, props))), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
324
324
  name: rightIconName,
325
325
  size: ICON_SIZE,
@@ -0,0 +1,66 @@
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
+ }];
@@ -0,0 +1,155 @@
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
@@ -0,0 +1 @@
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "47.0.1-54c307.2+54c307a",
3
+ "version": "47.0.1-5c6c55.2+5c6c558",
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": "^47.0.1-54c307.2+54c307a",
44
+ "@draftbit/types": "^47.0.1-5c6c55.2+5c6c558",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.4",
@@ -91,5 +91,5 @@
91
91
  ]
92
92
  ]
93
93
  },
94
- "gitHead": "54c307ae557205641ebd3e084b8b3ce1f5030fde"
94
+ "gitHead": "5c6c558c833f8d761b88c7698e34c7e7e4fdca56"
95
95
  }
@@ -311,7 +311,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
311
311
  ...leftIconStyle,
312
312
  marginLeft: type === "solid" ? 16 : 0,
313
313
  } })) : null,
314
- React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: [inputStyles, textStyles, viewStyles], ...props })),
314
+ React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: [inputStyles, textStyles], ...props })),
315
315
  rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.light, style: {
316
316
  position: "absolute",
317
317
  right: 16,
@@ -471,7 +471,7 @@ const DatePicker: React.FC<React.PropsWithChildren<Props>> = ({
471
471
  onFocus={_handleFocus}
472
472
  onBlur={_handleBlur}
473
473
  underlineColorAndroid={"transparent"}
474
- style={[inputStyles, textStyles, viewStyles]}
474
+ style={[inputStyles, textStyles]}
475
475
  {...props}
476
476
  />
477
477
  </View>
@@ -0,0 +1,74 @@
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
+ ];
@@ -0,0 +1,92 @@
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
+ ];