@draftbit/core 46.10.3-fb35c9.2 → 46.10.3-fbd333.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/BottomSheet/BottomSheetComponent.js +0 -41
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -5
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +23 -6
- package/lib/commonjs/components/DeprecatedCardWrapper.js +40 -0
- package/lib/commonjs/components/DeprecatedFAB.js +157 -0
- package/lib/commonjs/components/Portal/PortalConsumer.js +0 -7
- package/lib/commonjs/components/Portal/PortalHost.js +0 -1
- package/lib/commonjs/components/ProgressIndicator.js +55 -0
- package/lib/commonjs/components/ResizeMode.js +5 -0
- package/lib/commonjs/components/Text.js +0 -1
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/CardBlock.js +126 -0
- package/lib/commonjs/mappings/CardContainer.js +108 -0
- package/lib/commonjs/mappings/CardContainerRating.js +130 -0
- package/lib/commonjs/mappings/CardContainerShortImage.js +124 -0
- package/lib/commonjs/mappings/CardInline.js +59 -0
- package/lib/commonjs/mappings/ProgressIndicator.js +188 -0
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +0 -41
- package/lib/module/components/DeprecatedCardWrapper.js +32 -0
- package/lib/module/components/DeprecatedFAB.js +147 -0
- package/lib/module/components/Portal/PortalConsumer.js +0 -7
- package/lib/module/components/Portal/PortalHost.js +0 -1
- package/lib/module/components/Portal/PortalManager.js +7 -33
- package/lib/module/components/ProgressIndicator.js +45 -0
- package/lib/module/components/ResizeMode.js +1 -0
- package/lib/module/components/Text.js +0 -1
- package/lib/module/mappings/CardBlock.js +119 -0
- package/lib/module/mappings/CardContainer.js +101 -0
- package/lib/module/mappings/CardContainerRating.js +123 -0
- package/lib/module/mappings/CardContainerShortImage.js +117 -0
- package/lib/module/mappings/CardInline.js +52 -0
- package/lib/module/mappings/ProgressIndicator.js +181 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +15 -0
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts.map +1 -0
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +56 -0
- package/lib/typescript/src/components/DeprecatedFAB.d.ts.map +1 -0
- package/lib/typescript/src/components/ProgressIndicator.d.ts +24 -0
- package/lib/typescript/src/components/ProgressIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/ResizeMode.d.ts +2 -0
- package/lib/typescript/src/components/ResizeMode.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardBlock.d.ts +289 -0
- package/lib/typescript/src/mappings/CardBlock.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainer.d.ts +102 -0
- package/lib/typescript/src/mappings/CardContainer.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainerRating.d.ts +108 -0
- package/lib/typescript/src/mappings/CardContainerRating.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts +139 -0
- package/lib/typescript/src/mappings/CardContainerShortImage.d.ts.map +1 -0
- package/lib/typescript/src/mappings/CardInline.d.ts +62 -0
- package/lib/typescript/src/mappings/CardInline.d.ts.map +1 -0
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts +181 -0
- package/lib/typescript/src/mappings/ProgressIndicator.d.ts.map +1 -0
- package/package.json +15 -10
- package/src/components/DeprecatedCardWrapper.js +18 -0
- package/src/components/DeprecatedCardWrapper.tsx +46 -0
- package/src/components/DeprecatedFAB.js +114 -0
- package/src/components/DeprecatedFAB.tsx +231 -0
- package/src/components/ProgressIndicator.js +27 -0
- package/src/components/ProgressIndicator.tsx +71 -0
- package/src/components/ResizeMode.js +1 -0
- package/src/components/ResizeMode.ts +7 -0
- package/src/mappings/CardBlock.js +123 -0
- package/src/mappings/CardBlock.ts +136 -0
- package/src/mappings/CardContainer.js +104 -0
- package/src/mappings/CardContainer.ts +116 -0
- package/src/mappings/CardContainerRating.js +126 -0
- package/src/mappings/CardContainerRating.ts +137 -0
- package/src/mappings/CardContainerShortImage.js +120 -0
- package/src/mappings/CardContainerShortImage.ts +130 -0
- package/src/mappings/CardInline.js +52 -0
- package/src/mappings/CardInline.ts +61 -0
- package/src/mappings/ProgressIndicator.js +181 -0
- package/src/mappings/ProgressIndicator.ts +190 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
var _types = require("@draftbit/types");
|
|
8
|
+
const SEED_DATA_PROPS = {
|
|
9
|
+
image: {
|
|
10
|
+
label: "Image",
|
|
11
|
+
description: "Image",
|
|
12
|
+
formType: _types.FORM_TYPES.image,
|
|
13
|
+
propType: _types.PROP_TYPES.ASSET,
|
|
14
|
+
defaultValue: null,
|
|
15
|
+
editable: true,
|
|
16
|
+
required: true,
|
|
17
|
+
group: _types.GROUPS.data
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
label: "Title",
|
|
21
|
+
description: "Text to display",
|
|
22
|
+
formType: _types.FORM_TYPES.string,
|
|
23
|
+
propType: _types.PROP_TYPES.STRING,
|
|
24
|
+
defaultValue: "Beautiful West Coast Villa",
|
|
25
|
+
editable: true,
|
|
26
|
+
required: false,
|
|
27
|
+
group: _types.GROUPS.data
|
|
28
|
+
},
|
|
29
|
+
leftDescription: {
|
|
30
|
+
label: "Left description",
|
|
31
|
+
description: "Text to display on the left",
|
|
32
|
+
formType: _types.FORM_TYPES.string,
|
|
33
|
+
propType: _types.PROP_TYPES.STRING,
|
|
34
|
+
defaultValue: "San Diego",
|
|
35
|
+
editable: true,
|
|
36
|
+
required: false,
|
|
37
|
+
group: _types.GROUPS.data
|
|
38
|
+
},
|
|
39
|
+
rightDescription: {
|
|
40
|
+
label: "Right description",
|
|
41
|
+
description: "Text to display on the right",
|
|
42
|
+
formType: _types.FORM_TYPES.string,
|
|
43
|
+
propType: _types.PROP_TYPES.STRING,
|
|
44
|
+
defaultValue: "$100",
|
|
45
|
+
editable: true,
|
|
46
|
+
required: false,
|
|
47
|
+
group: _types.GROUPS.data
|
|
48
|
+
},
|
|
49
|
+
icon: {
|
|
50
|
+
label: "Icon",
|
|
51
|
+
description: "Icon to display on the top right",
|
|
52
|
+
formType: _types.FORM_TYPES.icon,
|
|
53
|
+
propType: _types.PROP_TYPES.STRING /* OR ASSET TODO TEST ME */,
|
|
54
|
+
defaultValue: null,
|
|
55
|
+
editable: true,
|
|
56
|
+
required: false,
|
|
57
|
+
group: _types.GROUPS.basic
|
|
58
|
+
},
|
|
59
|
+
aspectRatio: {
|
|
60
|
+
label: "Aspect ratio",
|
|
61
|
+
description: "Aspect ratio of the image",
|
|
62
|
+
formType: _types.FORM_TYPES.aspectRatio,
|
|
63
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
64
|
+
defaultValue: 1.5,
|
|
65
|
+
editable: true,
|
|
66
|
+
required: false,
|
|
67
|
+
group: _types.GROUPS.basic
|
|
68
|
+
},
|
|
69
|
+
textCentered: {
|
|
70
|
+
label: "Centered Text",
|
|
71
|
+
description: "Whether to center the text",
|
|
72
|
+
formType: _types.FORM_TYPES.boolean,
|
|
73
|
+
propType: _types.PROP_TYPES.BOOLEAN,
|
|
74
|
+
defaultValue: false,
|
|
75
|
+
editable: true,
|
|
76
|
+
required: false,
|
|
77
|
+
group: _types.GROUPS.basic
|
|
78
|
+
},
|
|
79
|
+
elevation: (0, _types.createElevationType)(2)
|
|
80
|
+
};
|
|
81
|
+
const SEED_DATA = [{
|
|
82
|
+
name: "Medium Card",
|
|
83
|
+
tag: "CardContainer",
|
|
84
|
+
description: "An elevated card with a title and description, that takes up half of its container.",
|
|
85
|
+
category: _types.COMPONENT_TYPES.card,
|
|
86
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
87
|
+
layout: null,
|
|
88
|
+
props: {
|
|
89
|
+
...SEED_DATA_PROPS,
|
|
90
|
+
numColumns: (0, _types.createNumColumnsType)({
|
|
91
|
+
defaultValue: 2
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
name: "Large Card",
|
|
96
|
+
tag: "CardContainer",
|
|
97
|
+
description: "An elevated card with a title and description, that takes up its full container.",
|
|
98
|
+
category: _types.COMPONENT_TYPES.card,
|
|
99
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
100
|
+
layout: null,
|
|
101
|
+
props: {
|
|
102
|
+
...SEED_DATA_PROPS,
|
|
103
|
+
numColumns: (0, _types.createNumColumnsType)({
|
|
104
|
+
defaultValue: 3
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
}];
|
|
108
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
var _types = require("@draftbit/types");
|
|
8
|
+
const SEED_DATA_PROPS = {
|
|
9
|
+
image: {
|
|
10
|
+
group: _types.GROUPS.data,
|
|
11
|
+
label: "Image",
|
|
12
|
+
description: "Image",
|
|
13
|
+
formType: _types.FORM_TYPES.image,
|
|
14
|
+
propType: _types.PROP_TYPES.ASSET,
|
|
15
|
+
defaultValue: null,
|
|
16
|
+
editable: true,
|
|
17
|
+
required: false
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
group: _types.GROUPS.data,
|
|
21
|
+
label: "Title",
|
|
22
|
+
description: "Text to display",
|
|
23
|
+
formType: _types.FORM_TYPES.string,
|
|
24
|
+
propType: _types.PROP_TYPES.STRING,
|
|
25
|
+
defaultValue: "Beautiful West Coast Villa",
|
|
26
|
+
editable: true,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
leftDescription: {
|
|
30
|
+
group: _types.GROUPS.data,
|
|
31
|
+
label: "Left description",
|
|
32
|
+
description: "Text to display on the left",
|
|
33
|
+
formType: _types.FORM_TYPES.string,
|
|
34
|
+
propType: _types.PROP_TYPES.STRING,
|
|
35
|
+
defaultValue: "San Diego",
|
|
36
|
+
editable: true,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
rightDescription: {
|
|
40
|
+
group: _types.GROUPS.data,
|
|
41
|
+
label: "Right description",
|
|
42
|
+
description: "Text to display on the right",
|
|
43
|
+
formType: _types.FORM_TYPES.string,
|
|
44
|
+
propType: _types.PROP_TYPES.STRING,
|
|
45
|
+
defaultValue: "$100",
|
|
46
|
+
editable: true,
|
|
47
|
+
required: false
|
|
48
|
+
},
|
|
49
|
+
icon: {
|
|
50
|
+
group: _types.GROUPS.basic,
|
|
51
|
+
label: "Icon",
|
|
52
|
+
description: "Icon to display on the top right",
|
|
53
|
+
formType: _types.FORM_TYPES.icon,
|
|
54
|
+
propType: _types.PROP_TYPES.ASSET,
|
|
55
|
+
defaultValue: null,
|
|
56
|
+
editable: true,
|
|
57
|
+
required: false
|
|
58
|
+
},
|
|
59
|
+
aspectRatio: {
|
|
60
|
+
group: _types.GROUPS.basic,
|
|
61
|
+
label: "Aspect ratio",
|
|
62
|
+
description: "Aspect ratio of the image",
|
|
63
|
+
formType: _types.FORM_TYPES.aspectRatio,
|
|
64
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
65
|
+
defaultValue: 1.5,
|
|
66
|
+
editable: true,
|
|
67
|
+
required: false
|
|
68
|
+
},
|
|
69
|
+
rating: {
|
|
70
|
+
group: _types.GROUPS.data,
|
|
71
|
+
label: "Rating",
|
|
72
|
+
description: "Number of stars to show. A number 0-5.",
|
|
73
|
+
formType: _types.FORM_TYPES.number,
|
|
74
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
75
|
+
defaultValue: 5,
|
|
76
|
+
min: 0,
|
|
77
|
+
max: 5,
|
|
78
|
+
step: 1,
|
|
79
|
+
precision: 0,
|
|
80
|
+
editable: true,
|
|
81
|
+
required: false
|
|
82
|
+
},
|
|
83
|
+
elevation: (0, _types.createElevationType)(2)
|
|
84
|
+
};
|
|
85
|
+
const SEED_DATA = [{
|
|
86
|
+
name: "Medium Card (Rating)",
|
|
87
|
+
tag: "CardContainerRating",
|
|
88
|
+
description: "An elevated card with a title and description, that takes up half of its container.",
|
|
89
|
+
category: _types.COMPONENT_TYPES.card,
|
|
90
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
91
|
+
preview_image_url: "{CLOUDINARY_URL}/Card_ContainerRating_2col.png",
|
|
92
|
+
supports_list_render: true,
|
|
93
|
+
props: {
|
|
94
|
+
...SEED_DATA_PROPS,
|
|
95
|
+
numColumns: {
|
|
96
|
+
label: "Number of Columns",
|
|
97
|
+
description: "Numbre of columns",
|
|
98
|
+
group: _types.GROUPS.uncategorized,
|
|
99
|
+
formType: _types.FORM_TYPES.number,
|
|
100
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
101
|
+
defaultValue: 2,
|
|
102
|
+
editable: false,
|
|
103
|
+
required: false
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
layout: {}
|
|
107
|
+
}, {
|
|
108
|
+
name: "Large Card (Rating)",
|
|
109
|
+
tag: "CardContainerRating",
|
|
110
|
+
description: "An elevated card with a title and description, that takes up its full container.",
|
|
111
|
+
category: _types.COMPONENT_TYPES.card,
|
|
112
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
113
|
+
preview_image_url: "{CLOUDINARY_URL}/Card_ContainerRating_3col.png",
|
|
114
|
+
supports_list_render: true,
|
|
115
|
+
props: {
|
|
116
|
+
...SEED_DATA_PROPS,
|
|
117
|
+
numColumns: {
|
|
118
|
+
label: "Number of Columns",
|
|
119
|
+
description: "Numbre of columns",
|
|
120
|
+
group: _types.GROUPS.uncategorized,
|
|
121
|
+
formType: _types.FORM_TYPES.number,
|
|
122
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
123
|
+
defaultValue: 3,
|
|
124
|
+
editable: false,
|
|
125
|
+
required: false
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
layout: {}
|
|
129
|
+
}];
|
|
130
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
var _types = require("@draftbit/types");
|
|
8
|
+
const SEED_DATA = [{
|
|
9
|
+
name: "Short Card (Left)",
|
|
10
|
+
tag: "CardContainerShortImage",
|
|
11
|
+
description: "An elevated card with a left aligned image and a title and subtitle",
|
|
12
|
+
category: _types.COMPONENT_TYPES.card,
|
|
13
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
14
|
+
preview_image_url: "{CLOUDINARY_URL}/Card_ContainerShortLeftImage.png",
|
|
15
|
+
supports_list_render: true,
|
|
16
|
+
props: {
|
|
17
|
+
image: {
|
|
18
|
+
group: _types.GROUPS.data,
|
|
19
|
+
label: "Image",
|
|
20
|
+
description: "Image",
|
|
21
|
+
formType: _types.FORM_TYPES.image,
|
|
22
|
+
propType: _types.PROP_TYPES.ASSET,
|
|
23
|
+
defaultValue: null,
|
|
24
|
+
editable: true,
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
title: {
|
|
28
|
+
group: _types.GROUPS.data,
|
|
29
|
+
label: "Title",
|
|
30
|
+
description: "Title to display",
|
|
31
|
+
formType: _types.FORM_TYPES.string,
|
|
32
|
+
propType: _types.PROP_TYPES.STRING,
|
|
33
|
+
defaultValue: "Beautiful West Coast Villa",
|
|
34
|
+
editable: true,
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
subtitle: {
|
|
38
|
+
group: _types.GROUPS.data,
|
|
39
|
+
label: "Subtitle",
|
|
40
|
+
description: "Subtitle to display",
|
|
41
|
+
formType: _types.FORM_TYPES.string,
|
|
42
|
+
propType: _types.PROP_TYPES.STRING,
|
|
43
|
+
defaultValue: "San Diego",
|
|
44
|
+
editable: true,
|
|
45
|
+
required: false
|
|
46
|
+
},
|
|
47
|
+
aspectRatio: {
|
|
48
|
+
group: _types.GROUPS.basic,
|
|
49
|
+
label: "Aspect ratio",
|
|
50
|
+
description: "Aspect ratio of the image",
|
|
51
|
+
formType: _types.FORM_TYPES.aspectRatio,
|
|
52
|
+
propType: _types.PROP_TYPES.STRING,
|
|
53
|
+
defaultValue: null,
|
|
54
|
+
editable: true,
|
|
55
|
+
required: false
|
|
56
|
+
},
|
|
57
|
+
elevation: (0, _types.createElevationType)(2),
|
|
58
|
+
mode: {
|
|
59
|
+
group: _types.GROUPS.uncategorized,
|
|
60
|
+
label: "Image Side",
|
|
61
|
+
description: "The side on which the image is on (left or right)",
|
|
62
|
+
formType: _types.FORM_TYPES.flatArray,
|
|
63
|
+
propType: _types.PROP_TYPES.STRING,
|
|
64
|
+
defaultValue: "left",
|
|
65
|
+
options: ["left", "right"],
|
|
66
|
+
editable: false,
|
|
67
|
+
required: false
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
layout: {}
|
|
71
|
+
}, {
|
|
72
|
+
name: "Short Card (Right)",
|
|
73
|
+
tag: "CardContainerShortImage",
|
|
74
|
+
description: "An elevated card with a right aligned image and a title and subtitle",
|
|
75
|
+
category: _types.COMPONENT_TYPES.card,
|
|
76
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
77
|
+
preview_image_url: "{CLOUDINARY_URL}/Card_ContainerShortRightImage.png",
|
|
78
|
+
supports_list_render: true,
|
|
79
|
+
props: {
|
|
80
|
+
image: {
|
|
81
|
+
group: _types.GROUPS.data,
|
|
82
|
+
label: "Image",
|
|
83
|
+
description: "Image",
|
|
84
|
+
formType: _types.FORM_TYPES.image,
|
|
85
|
+
propType: _types.PROP_TYPES.ASSET,
|
|
86
|
+
defaultValue: null,
|
|
87
|
+
editable: true,
|
|
88
|
+
required: false
|
|
89
|
+
},
|
|
90
|
+
title: {
|
|
91
|
+
group: _types.GROUPS.data,
|
|
92
|
+
label: "Title",
|
|
93
|
+
description: "Title to display",
|
|
94
|
+
formType: _types.FORM_TYPES.string,
|
|
95
|
+
propType: _types.PROP_TYPES.STRING,
|
|
96
|
+
defaultValue: "Beautiful West Coast Villa",
|
|
97
|
+
editable: true,
|
|
98
|
+
required: false
|
|
99
|
+
},
|
|
100
|
+
subtitle: {
|
|
101
|
+
group: _types.GROUPS.data,
|
|
102
|
+
label: "Subtitle",
|
|
103
|
+
description: "Subtitle to display",
|
|
104
|
+
formType: _types.FORM_TYPES.string,
|
|
105
|
+
propType: _types.PROP_TYPES.STRING,
|
|
106
|
+
defaultValue: "San Diego",
|
|
107
|
+
editable: true,
|
|
108
|
+
required: false
|
|
109
|
+
},
|
|
110
|
+
elevation: (0, _types.createElevationType)(2),
|
|
111
|
+
mode: {
|
|
112
|
+
label: "Mode",
|
|
113
|
+
description: "Mode",
|
|
114
|
+
group: _types.GROUPS.uncategorized,
|
|
115
|
+
formType: _types.FORM_TYPES.string,
|
|
116
|
+
propType: _types.PROP_TYPES.STRING,
|
|
117
|
+
defaultValue: "right",
|
|
118
|
+
editable: false,
|
|
119
|
+
required: false
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
layout: {}
|
|
123
|
+
}];
|
|
124
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
var _types = require("@draftbit/types");
|
|
8
|
+
const SEED_DATA = {
|
|
9
|
+
name: "Inline Card",
|
|
10
|
+
tag: "CardInline",
|
|
11
|
+
description: "An elevated card with image and a title and description overlayed, that takes up the full width of its container.",
|
|
12
|
+
category: _types.COMPONENT_TYPES.card,
|
|
13
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
14
|
+
layout: {},
|
|
15
|
+
props: {
|
|
16
|
+
image: {
|
|
17
|
+
group: _types.GROUPS.data,
|
|
18
|
+
label: "Image",
|
|
19
|
+
description: "Image",
|
|
20
|
+
formType: _types.FORM_TYPES.image,
|
|
21
|
+
propType: _types.PROP_TYPES.ASSET,
|
|
22
|
+
defaultValue: null,
|
|
23
|
+
editable: true,
|
|
24
|
+
required: false
|
|
25
|
+
},
|
|
26
|
+
title: {
|
|
27
|
+
group: _types.GROUPS.data,
|
|
28
|
+
label: "Title",
|
|
29
|
+
description: "Text to display",
|
|
30
|
+
formType: _types.FORM_TYPES.string,
|
|
31
|
+
propType: _types.PROP_TYPES.STRING,
|
|
32
|
+
defaultValue: "Beautiful West Coast Villa",
|
|
33
|
+
editable: true,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
subtitle: {
|
|
37
|
+
group: _types.GROUPS.data,
|
|
38
|
+
label: "Subtitle",
|
|
39
|
+
description: "Subtitle text",
|
|
40
|
+
formType: _types.FORM_TYPES.string,
|
|
41
|
+
propType: _types.PROP_TYPES.STRING,
|
|
42
|
+
defaultValue: "San Diego",
|
|
43
|
+
editable: true,
|
|
44
|
+
required: false
|
|
45
|
+
},
|
|
46
|
+
aspectRatio: {
|
|
47
|
+
group: _types.GROUPS.basic,
|
|
48
|
+
label: "Aspect ratio",
|
|
49
|
+
description: "Aspect ratio of the image",
|
|
50
|
+
formType: _types.FORM_TYPES.aspectRatio,
|
|
51
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
52
|
+
defaultValue: 1.5,
|
|
53
|
+
editable: true,
|
|
54
|
+
required: false
|
|
55
|
+
},
|
|
56
|
+
elevation: (0, _types.createElevationType)(2)
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SEED_DATA = void 0;
|
|
7
|
+
var _types = require("@draftbit/types");
|
|
8
|
+
const SEED_DATA = {
|
|
9
|
+
name: "Progress Indicator",
|
|
10
|
+
tag: "ProgressIndicator",
|
|
11
|
+
description: "A component used to show current Step in a process",
|
|
12
|
+
category: _types.COMPONENT_TYPES.deprecated,
|
|
13
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
14
|
+
preview_image_url: "{CLOUDINARY_URL}/Control_Slider.png",
|
|
15
|
+
supports_list_render: false,
|
|
16
|
+
layout: {},
|
|
17
|
+
props: {
|
|
18
|
+
numberOfSteps: {
|
|
19
|
+
group: _types.GROUPS.data,
|
|
20
|
+
label: "Number of Steps",
|
|
21
|
+
description: "The border radius for the thumb",
|
|
22
|
+
editable: true,
|
|
23
|
+
required: false,
|
|
24
|
+
formType: _types.FORM_TYPES.number,
|
|
25
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
26
|
+
min: 0,
|
|
27
|
+
max: 10,
|
|
28
|
+
step: 1,
|
|
29
|
+
precision: 0,
|
|
30
|
+
defaultValue: 5
|
|
31
|
+
},
|
|
32
|
+
currentStep: {
|
|
33
|
+
group: _types.GROUPS.data,
|
|
34
|
+
label: "Current Step",
|
|
35
|
+
description: "The step that the user is on",
|
|
36
|
+
editable: true,
|
|
37
|
+
required: false,
|
|
38
|
+
formType: _types.FORM_TYPES.number,
|
|
39
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
40
|
+
min: 0,
|
|
41
|
+
max: 10,
|
|
42
|
+
step: 1,
|
|
43
|
+
precision: 0,
|
|
44
|
+
defaultValue: 5
|
|
45
|
+
},
|
|
46
|
+
stepIndicatorSize: {
|
|
47
|
+
group: _types.GROUPS.basic,
|
|
48
|
+
label: "Step Size",
|
|
49
|
+
description: "The size of the step circle",
|
|
50
|
+
editable: true,
|
|
51
|
+
required: false,
|
|
52
|
+
formType: _types.FORM_TYPES.number,
|
|
53
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
54
|
+
min: 10,
|
|
55
|
+
max: 100,
|
|
56
|
+
step: 5,
|
|
57
|
+
precision: 0,
|
|
58
|
+
defaultValue: 25
|
|
59
|
+
},
|
|
60
|
+
stepIndicatorLabelFontSize: {
|
|
61
|
+
group: _types.GROUPS.basic,
|
|
62
|
+
label: "Step Font Size",
|
|
63
|
+
description: "The font size of the step number",
|
|
64
|
+
editable: true,
|
|
65
|
+
required: false,
|
|
66
|
+
formType: _types.FORM_TYPES.number,
|
|
67
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
68
|
+
min: 6,
|
|
69
|
+
max: 36,
|
|
70
|
+
step: 1,
|
|
71
|
+
precision: 0,
|
|
72
|
+
defaultValue: 15
|
|
73
|
+
},
|
|
74
|
+
currentStepIndicatorLabelFontSize: {
|
|
75
|
+
group: _types.GROUPS.basic,
|
|
76
|
+
label: "Current Step Font Size",
|
|
77
|
+
description: "The font size of the current step number",
|
|
78
|
+
editable: true,
|
|
79
|
+
required: false,
|
|
80
|
+
formType: _types.FORM_TYPES.number,
|
|
81
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
82
|
+
min: 6,
|
|
83
|
+
max: 36,
|
|
84
|
+
step: 1,
|
|
85
|
+
precision: 0,
|
|
86
|
+
defaultValue: 15
|
|
87
|
+
},
|
|
88
|
+
unfinishedColor: {
|
|
89
|
+
group: _types.GROUPS.basic,
|
|
90
|
+
label: "Unfinished Color",
|
|
91
|
+
description: "The color of the step and divider when the step is either not the current step or not finished",
|
|
92
|
+
editable: true,
|
|
93
|
+
required: false,
|
|
94
|
+
formType: _types.FORM_TYPES.color,
|
|
95
|
+
propType: _types.PROP_TYPES.THEME,
|
|
96
|
+
defaultValue: null
|
|
97
|
+
},
|
|
98
|
+
finishedColor: {
|
|
99
|
+
group: _types.GROUPS.basic,
|
|
100
|
+
label: "Finished Color",
|
|
101
|
+
description: "The color of the step and divider when the step is the current step or finished",
|
|
102
|
+
editable: true,
|
|
103
|
+
required: false,
|
|
104
|
+
formType: _types.FORM_TYPES.color,
|
|
105
|
+
propType: _types.PROP_TYPES.THEME,
|
|
106
|
+
defaultValue: null
|
|
107
|
+
},
|
|
108
|
+
stepNumberUnfinishedColor: {
|
|
109
|
+
group: _types.GROUPS.basic,
|
|
110
|
+
label: "Unfinished Number Color",
|
|
111
|
+
description: "The color of the number within the step when unfinished",
|
|
112
|
+
editable: true,
|
|
113
|
+
required: false,
|
|
114
|
+
formType: _types.FORM_TYPES.color,
|
|
115
|
+
propType: _types.PROP_TYPES.THEME,
|
|
116
|
+
defaultValue: null
|
|
117
|
+
},
|
|
118
|
+
stepNumberFinishedColor: {
|
|
119
|
+
group: _types.GROUPS.basic,
|
|
120
|
+
label: "Finished Number Color",
|
|
121
|
+
description: "The color of the number within the step when finished",
|
|
122
|
+
editable: true,
|
|
123
|
+
required: false,
|
|
124
|
+
formType: _types.FORM_TYPES.color,
|
|
125
|
+
propType: _types.PROP_TYPES.THEME,
|
|
126
|
+
defaultValue: null
|
|
127
|
+
},
|
|
128
|
+
stepIndicatorCurrentColor: {
|
|
129
|
+
group: _types.GROUPS.basic,
|
|
130
|
+
label: "Current Step Color",
|
|
131
|
+
description: "The color of current step circle",
|
|
132
|
+
editable: true,
|
|
133
|
+
required: false,
|
|
134
|
+
formType: _types.FORM_TYPES.color,
|
|
135
|
+
propType: _types.PROP_TYPES.THEME,
|
|
136
|
+
defaultValue: null
|
|
137
|
+
},
|
|
138
|
+
stepIndicatorLabelCurrentColor: {
|
|
139
|
+
group: _types.GROUPS.basic,
|
|
140
|
+
label: "Current Step Number Color",
|
|
141
|
+
description: "The color of current number within the step circle",
|
|
142
|
+
editable: true,
|
|
143
|
+
required: false,
|
|
144
|
+
formType: _types.FORM_TYPES.color,
|
|
145
|
+
propType: _types.PROP_TYPES.THEME,
|
|
146
|
+
defaultValue: null
|
|
147
|
+
},
|
|
148
|
+
stepStrokeCurrentColor: {
|
|
149
|
+
group: _types.GROUPS.basic,
|
|
150
|
+
label: "Current Step Border Color",
|
|
151
|
+
description: "The color of current border color of the step",
|
|
152
|
+
editable: true,
|
|
153
|
+
required: false,
|
|
154
|
+
formType: _types.FORM_TYPES.color,
|
|
155
|
+
propType: _types.PROP_TYPES.THEME,
|
|
156
|
+
defaultValue: null
|
|
157
|
+
},
|
|
158
|
+
currentStepStrokeWidth: {
|
|
159
|
+
group: _types.GROUPS.basic,
|
|
160
|
+
label: "Current Step Border Width",
|
|
161
|
+
description: "The width of the border for the current step",
|
|
162
|
+
editable: true,
|
|
163
|
+
required: false,
|
|
164
|
+
formType: _types.FORM_TYPES.number,
|
|
165
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
166
|
+
min: 1,
|
|
167
|
+
max: 20,
|
|
168
|
+
step: 1,
|
|
169
|
+
precision: 0,
|
|
170
|
+
defaultValue: 0
|
|
171
|
+
},
|
|
172
|
+
currentStepIndicatorSize: {
|
|
173
|
+
group: _types.GROUPS.basic,
|
|
174
|
+
label: "Current Step Size",
|
|
175
|
+
description: "The size of the current step circle",
|
|
176
|
+
editable: true,
|
|
177
|
+
required: false,
|
|
178
|
+
formType: _types.FORM_TYPES.number,
|
|
179
|
+
propType: _types.PROP_TYPES.NUMBER,
|
|
180
|
+
min: 10,
|
|
181
|
+
max: 100,
|
|
182
|
+
step: 5,
|
|
183
|
+
precision: 0,
|
|
184
|
+
defaultValue: null
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -85,22 +85,6 @@ export class ScrollBottomSheet extends Component {
|
|
|
85
85
|
* Gesture Handler references
|
|
86
86
|
*/
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* ScrollView prop
|
|
90
|
-
*/
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Pan gesture handler events for drawer handle and content
|
|
94
|
-
*/
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Main Animated Value that drives the top position of the UI drawer at any point in time
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Animated value that keeps track of the position: 0 => closed, 1 => opened
|
|
102
|
-
*/
|
|
103
|
-
|
|
104
88
|
/**
|
|
105
89
|
* Flag to indicate imperative snapping
|
|
106
90
|
*/
|
|
@@ -109,15 +93,6 @@ export class ScrollBottomSheet extends Component {
|
|
|
109
93
|
* Manual snapping amount
|
|
110
94
|
*/
|
|
111
95
|
|
|
112
|
-
/**
|
|
113
|
-
* Keeps track of the current index
|
|
114
|
-
*/
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Deceleration rate of the scroll component. This is used only on Android to
|
|
118
|
-
* compensate the unexpected glide it gets sometimes.
|
|
119
|
-
*/
|
|
120
|
-
|
|
121
96
|
constructor(props) {
|
|
122
97
|
var _props$animationConfi, _this;
|
|
123
98
|
super(props);
|
|
@@ -126,15 +101,8 @@ export class ScrollBottomSheet extends Component {
|
|
|
126
101
|
_defineProperty(this, "drawerHandleRef", /*#__PURE__*/React.createRef());
|
|
127
102
|
_defineProperty(this, "drawerContentRef", /*#__PURE__*/React.createRef());
|
|
128
103
|
_defineProperty(this, "scrollComponentRef", /*#__PURE__*/React.createRef());
|
|
129
|
-
_defineProperty(this, "onScrollBeginDrag", void 0);
|
|
130
|
-
_defineProperty(this, "onHandleGestureEvent", void 0);
|
|
131
|
-
_defineProperty(this, "onDrawerGestureEvent", void 0);
|
|
132
|
-
_defineProperty(this, "translateY", void 0);
|
|
133
|
-
_defineProperty(this, "position", void 0);
|
|
134
104
|
_defineProperty(this, "isManuallySetValue", new Value(0));
|
|
135
105
|
_defineProperty(this, "manualYOffset", new Value(0));
|
|
136
|
-
_defineProperty(this, "nextSnapIndex", void 0);
|
|
137
|
-
_defineProperty(this, "decelerationRate", void 0);
|
|
138
106
|
_defineProperty(this, "prevSnapIndex", -1);
|
|
139
107
|
_defineProperty(this, "dragY", new Value(0));
|
|
140
108
|
_defineProperty(this, "prevDragY", new Value(0));
|
|
@@ -146,18 +114,9 @@ export class ScrollBottomSheet extends Component {
|
|
|
146
114
|
_defineProperty(this, "animationFrameTime", new Value(0));
|
|
147
115
|
_defineProperty(this, "velocityY", new Value(0));
|
|
148
116
|
_defineProperty(this, "lastStartScrollY", new Value(0));
|
|
149
|
-
_defineProperty(this, "prevTranslateYOffset", void 0);
|
|
150
|
-
_defineProperty(this, "translationY", void 0);
|
|
151
117
|
_defineProperty(this, "destSnapPoint", new Value(0));
|
|
152
|
-
_defineProperty(this, "lastSnap", void 0);
|
|
153
118
|
_defineProperty(this, "dragWithHandle", new Value(0));
|
|
154
119
|
_defineProperty(this, "scrollUpAndPullDown", new Value(0));
|
|
155
|
-
_defineProperty(this, "didGestureFinish", void 0);
|
|
156
|
-
_defineProperty(this, "didScrollUpAndPullDown", void 0);
|
|
157
|
-
_defineProperty(this, "setTranslationY", void 0);
|
|
158
|
-
_defineProperty(this, "extraOffset", void 0);
|
|
159
|
-
_defineProperty(this, "calculateNextSnapPoint", void 0);
|
|
160
|
-
_defineProperty(this, "scrollComponent", void 0);
|
|
161
120
|
_defineProperty(this, "convertPercentageToDp", str => Number(str.split("%")[0]) * (windowHeight - this.props.topInset) / 100);
|
|
162
121
|
_defineProperty(this, "getNormalisedSnapPoints", () => {
|
|
163
122
|
return this.props.snapPoints.map(p => {
|