@draftbit/core 46.8.2-3b498d.2 → 46.8.2-41c76e.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/index.js +0 -13
- package/lib/commonjs/mappings/FlashList.js +2 -8
- package/lib/module/index.js +0 -1
- package/lib/module/mappings/FlashList.js +3 -9
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +0 -6
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/package.json +3 -5
- package/src/index.js +0 -1
- package/src/index.tsx +0 -2
- package/src/mappings/FlashList.js +9 -9
- package/src/mappings/FlashList.ts +9 -9
- package/lib/commonjs/components/TabView/TabView.js +0 -113
- package/lib/commonjs/components/TabView/TabViewItem.js +0 -25
- package/lib/commonjs/components/TabView/index.js +0 -20
- package/lib/commonjs/mappings/TabView.js +0 -77
- package/lib/commonjs/mappings/TabViewItem.js +0 -37
- package/lib/module/components/TabView/TabView.js +0 -103
- package/lib/module/components/TabView/TabViewItem.js +0 -20
- package/lib/module/components/TabView/index.js +0 -2
- package/lib/module/mappings/TabView.js +0 -70
- package/lib/module/mappings/TabViewItem.js +0 -30
- package/lib/typescript/src/components/TabView/TabView.d.ts +0 -26
- package/lib/typescript/src/components/TabView/TabView.d.ts.map +0 -1
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -11
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts.map +0 -1
- package/lib/typescript/src/components/TabView/index.d.ts +0 -3
- package/lib/typescript/src/components/TabView/index.d.ts.map +0 -1
- package/lib/typescript/src/mappings/TabView.d.ts +0 -126
- package/lib/typescript/src/mappings/TabView.d.ts.map +0 -1
- package/lib/typescript/src/mappings/TabViewItem.d.ts +0 -25
- package/lib/typescript/src/mappings/TabViewItem.d.ts.map +0 -1
- package/src/components/TabView/TabView.js +0 -50
- package/src/components/TabView/TabView.tsx +0 -137
- package/src/components/TabView/TabViewItem.js +0 -11
- package/src/components/TabView/TabViewItem.tsx +0 -25
- package/src/components/TabView/index.js +0 -2
- package/src/components/TabView/index.tsx +0 -2
- package/src/mappings/TabView.js +0 -76
- package/src/mappings/TabView.ts +0 -86
- package/src/mappings/TabViewItem.js +0 -30
- package/src/mappings/TabViewItem.ts +0 -38
package/lib/commonjs/index.js
CHANGED
|
@@ -339,18 +339,6 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
339
339
|
return _Switch.SwitchRow;
|
|
340
340
|
}
|
|
341
341
|
});
|
|
342
|
-
Object.defineProperty(exports, "TabView", {
|
|
343
|
-
enumerable: true,
|
|
344
|
-
get: function () {
|
|
345
|
-
return _TabView.TabView;
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
Object.defineProperty(exports, "TabViewItem", {
|
|
349
|
-
enumerable: true,
|
|
350
|
-
get: function () {
|
|
351
|
-
return _TabView.TabViewItem;
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
342
|
Object.defineProperty(exports, "TextField", {
|
|
355
343
|
enumerable: true,
|
|
356
344
|
get: function () {
|
|
@@ -426,7 +414,6 @@ var _Swiper = require("./components/Swiper");
|
|
|
426
414
|
var _Layout = require("./components/Layout");
|
|
427
415
|
var _index = require("./components/RadioButton/index");
|
|
428
416
|
var _DeckSwiper = require("./components/DeckSwiper");
|
|
429
|
-
var _TabView = require("./components/TabView");
|
|
430
417
|
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
431
418
|
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
432
419
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
@@ -11,10 +11,7 @@ const SEED_DATA = [{
|
|
|
11
11
|
description: "Masonry Flashlist by Shopify",
|
|
12
12
|
packageName: "@shopify/flash-list",
|
|
13
13
|
category: _types.COMPONENT_TYPES.data,
|
|
14
|
-
stylesPanelSections: _types.
|
|
15
|
-
layout: {
|
|
16
|
-
flex: 1
|
|
17
|
-
},
|
|
14
|
+
stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.MarginsAndPaddings],
|
|
18
15
|
triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
|
|
19
16
|
props: {
|
|
20
17
|
onRefresh: (0, _types.createActionProp)(),
|
|
@@ -61,10 +58,7 @@ const SEED_DATA = [{
|
|
|
61
58
|
description: "Flashlist by Shopify",
|
|
62
59
|
packageName: "@shopify/flash-list",
|
|
63
60
|
category: _types.COMPONENT_TYPES.data,
|
|
64
|
-
stylesPanelSections: _types.
|
|
65
|
-
layout: {
|
|
66
|
-
flex: 1
|
|
67
|
-
},
|
|
61
|
+
stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.MarginsAndPaddings],
|
|
68
62
|
triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
|
|
69
63
|
props: {
|
|
70
64
|
onRefresh: (0, _types.createActionProp)(),
|
package/lib/module/index.js
CHANGED
|
@@ -32,7 +32,6 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
34
34
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
35
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
36
35
|
|
|
37
36
|
/* Deprecated: Fix or Delete! */
|
|
38
37
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp,
|
|
1
|
+
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = [{
|
|
3
3
|
name: "Masonry List",
|
|
4
4
|
tag: "MasonryFlashList",
|
|
5
5
|
description: "Masonry Flashlist by Shopify",
|
|
6
6
|
packageName: "@shopify/flash-list",
|
|
7
7
|
category: COMPONENT_TYPES.data,
|
|
8
|
-
stylesPanelSections:
|
|
9
|
-
layout: {
|
|
10
|
-
flex: 1
|
|
11
|
-
},
|
|
8
|
+
stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.MarginsAndPaddings],
|
|
12
9
|
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
13
10
|
props: {
|
|
14
11
|
onRefresh: createActionProp(),
|
|
@@ -55,10 +52,7 @@ export const SEED_DATA = [{
|
|
|
55
52
|
description: "Flashlist by Shopify",
|
|
56
53
|
packageName: "@shopify/flash-list",
|
|
57
54
|
category: COMPONENT_TYPES.data,
|
|
58
|
-
stylesPanelSections:
|
|
59
|
-
layout: {
|
|
60
|
-
flex: 1
|
|
61
|
-
},
|
|
55
|
+
stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.MarginsAndPaddings],
|
|
62
56
|
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
63
57
|
props: {
|
|
64
58
|
onRefresh: createActionProp(),
|
|
@@ -32,7 +32,6 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
34
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
35
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
36
35
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
37
36
|
export { default as Picker } from "./components/Picker/Picker";
|
|
38
37
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","s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BAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -5,9 +5,6 @@ export declare const SEED_DATA: ({
|
|
|
5
5
|
packageName: string;
|
|
6
6
|
category: string;
|
|
7
7
|
stylesPanelSections: string[];
|
|
8
|
-
layout: {
|
|
9
|
-
flex: number;
|
|
10
|
-
};
|
|
11
8
|
triggers: string[];
|
|
12
9
|
props: {
|
|
13
10
|
onRefresh: {
|
|
@@ -113,9 +110,6 @@ export declare const SEED_DATA: ({
|
|
|
113
110
|
packageName: string;
|
|
114
111
|
category: string;
|
|
115
112
|
stylesPanelSections: string[];
|
|
116
|
-
layout: {
|
|
117
|
-
flex: number;
|
|
118
|
-
};
|
|
119
113
|
triggers: string[];
|
|
120
114
|
props: {
|
|
121
115
|
onRefresh: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.8.2-
|
|
3
|
+
"version": "46.8.2-41c76e.2+41c76ef",
|
|
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.8.2-
|
|
44
|
+
"@draftbit/types": "^46.8.2-41c76e.2+41c76ef",
|
|
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",
|
|
@@ -55,9 +55,7 @@
|
|
|
55
55
|
"lodash.tonumber": "^4.0.3",
|
|
56
56
|
"react-native-deck-swiper": "^2.0.12",
|
|
57
57
|
"react-native-modal-datetime-picker": "^13.0.0",
|
|
58
|
-
"react-native-pager-view": "5.4.24",
|
|
59
58
|
"react-native-svg": "12.3.0",
|
|
60
|
-
"react-native-tab-view": "^3.4.0",
|
|
61
59
|
"react-native-typography": "^1.4.1",
|
|
62
60
|
"react-native-web-swiper": "^2.2.3"
|
|
63
61
|
},
|
|
@@ -94,5 +92,5 @@
|
|
|
94
92
|
]
|
|
95
93
|
]
|
|
96
94
|
},
|
|
97
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "41c76efe66d0d1d4a67333340e289517c242ef45"
|
|
98
96
|
}
|
package/src/index.js
CHANGED
|
@@ -32,7 +32,6 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
34
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
35
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
36
35
|
/* Deprecated: Fix or Delete! */
|
|
37
36
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
38
37
|
export { default as Picker } from "./components/Picker/Picker";
|
package/src/index.tsx
CHANGED
|
@@ -53,8 +53,6 @@ export {
|
|
|
53
53
|
|
|
54
54
|
export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
55
55
|
|
|
56
|
-
export { TabView, TabViewItem } from "./components/TabView";
|
|
57
|
-
|
|
58
56
|
/* Deprecated: Fix or Delete! */
|
|
59
57
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
60
58
|
export { default as Picker } from "./components/Picker/Picker";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp,
|
|
1
|
+
import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = [
|
|
3
3
|
{
|
|
4
4
|
name: "Masonry List",
|
|
@@ -6,10 +6,10 @@ export const SEED_DATA = [
|
|
|
6
6
|
description: "Masonry Flashlist by Shopify",
|
|
7
7
|
packageName: "@shopify/flash-list",
|
|
8
8
|
category: COMPONENT_TYPES.data,
|
|
9
|
-
stylesPanelSections:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
stylesPanelSections: [
|
|
10
|
+
StylesPanelSections.Background,
|
|
11
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
12
|
+
],
|
|
13
13
|
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
14
14
|
props: {
|
|
15
15
|
onRefresh: createActionProp(),
|
|
@@ -57,10 +57,10 @@ export const SEED_DATA = [
|
|
|
57
57
|
description: "Flashlist by Shopify",
|
|
58
58
|
packageName: "@shopify/flash-list",
|
|
59
59
|
category: COMPONENT_TYPES.data,
|
|
60
|
-
stylesPanelSections:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
stylesPanelSections: [
|
|
61
|
+
StylesPanelSections.Background,
|
|
62
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
63
|
+
],
|
|
64
64
|
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
65
65
|
props: {
|
|
66
66
|
onRefresh: createActionProp(),
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
createNumColumnsType,
|
|
4
4
|
createStaticBoolProp,
|
|
5
5
|
createNumberProp,
|
|
6
|
-
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
7
6
|
GROUPS,
|
|
8
7
|
Triggers,
|
|
9
8
|
createActionProp,
|
|
10
9
|
createStaticNumberProp,
|
|
11
10
|
createColorProp,
|
|
11
|
+
StylesPanelSections,
|
|
12
12
|
} from "@draftbit/types";
|
|
13
13
|
|
|
14
14
|
export const SEED_DATA = [
|
|
@@ -18,10 +18,10 @@ export const SEED_DATA = [
|
|
|
18
18
|
description: "Masonry Flashlist by Shopify",
|
|
19
19
|
packageName: "@shopify/flash-list",
|
|
20
20
|
category: COMPONENT_TYPES.data,
|
|
21
|
-
stylesPanelSections:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
stylesPanelSections: [
|
|
22
|
+
StylesPanelSections.Background,
|
|
23
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
24
|
+
],
|
|
25
25
|
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
26
26
|
props: {
|
|
27
27
|
onRefresh: createActionProp(),
|
|
@@ -72,10 +72,10 @@ export const SEED_DATA = [
|
|
|
72
72
|
description: "Flashlist by Shopify",
|
|
73
73
|
packageName: "@shopify/flash-list",
|
|
74
74
|
category: COMPONENT_TYPES.data,
|
|
75
|
-
stylesPanelSections:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
stylesPanelSections: [
|
|
76
|
+
StylesPanelSections.Background,
|
|
77
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
78
|
+
],
|
|
79
79
|
triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
|
|
80
80
|
props: {
|
|
81
81
|
onRefresh: createActionProp(),
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var React = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeTabView = require("react-native-tab-view");
|
|
10
|
-
var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
|
|
11
|
-
var _theming = require("../../theming");
|
|
12
|
-
var _utilities = require("../../utilities");
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
const TabViewComponent = _ref => {
|
|
18
|
-
let {
|
|
19
|
-
Icon,
|
|
20
|
-
onIndexChanged,
|
|
21
|
-
onEndReached,
|
|
22
|
-
tabBarPosition,
|
|
23
|
-
keyboardDismissMode,
|
|
24
|
-
swipeEnabled,
|
|
25
|
-
scrollEnabled,
|
|
26
|
-
activeColor,
|
|
27
|
-
inactiveColor,
|
|
28
|
-
pressColor,
|
|
29
|
-
indicatorColor,
|
|
30
|
-
tabsBackgroundColor,
|
|
31
|
-
style,
|
|
32
|
-
theme,
|
|
33
|
-
children
|
|
34
|
-
} = _ref;
|
|
35
|
-
const [index, setIndex] = React.useState(0);
|
|
36
|
-
const [routes, setRoutes] = React.useState([]);
|
|
37
|
-
const [tabScenes, setTabScenes] = React.useState({});
|
|
38
|
-
const {
|
|
39
|
-
textStyles,
|
|
40
|
-
viewStyles
|
|
41
|
-
} = (0, _utilities.extractStyles)(style);
|
|
42
|
-
|
|
43
|
-
//Populate routes and scenes based on children
|
|
44
|
-
React.useEffect(() => {
|
|
45
|
-
const newRoutes = [];
|
|
46
|
-
const scenes = {};
|
|
47
|
-
React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child) && child.type === _TabViewItem.default).forEach((item, idx) => {
|
|
48
|
-
const child = item;
|
|
49
|
-
newRoutes.push({
|
|
50
|
-
key: idx.toString(),
|
|
51
|
-
title: child.props.title,
|
|
52
|
-
icon: child.props.icon,
|
|
53
|
-
accessibilityLabel: child.props.accessibilityLabel
|
|
54
|
-
});
|
|
55
|
-
scenes[idx] = () => child;
|
|
56
|
-
});
|
|
57
|
-
setRoutes(newRoutes);
|
|
58
|
-
setTabScenes(scenes);
|
|
59
|
-
}, [children]);
|
|
60
|
-
const indexChangeHandler = i => {
|
|
61
|
-
setIndex(i);
|
|
62
|
-
onIndexChanged === null || onIndexChanged === void 0 ? void 0 : onIndexChanged(i);
|
|
63
|
-
if (i === routes.length) {
|
|
64
|
-
onEndReached === null || onEndReached === void 0 ? void 0 : onEndReached();
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
const renderTabBar = props => {
|
|
68
|
-
return /*#__PURE__*/React.createElement(_reactNativeTabView.TabBar, _extends({}, props, {
|
|
69
|
-
activeColor: activeColor || theme.colors.primary,
|
|
70
|
-
inactiveColor: inactiveColor || theme.colors.divider,
|
|
71
|
-
pressColor: pressColor || theme.colors.primary,
|
|
72
|
-
scrollEnabled: scrollEnabled,
|
|
73
|
-
indicatorStyle: {
|
|
74
|
-
backgroundColor: indicatorColor || theme.colors.primary
|
|
75
|
-
},
|
|
76
|
-
labelStyle: textStyles,
|
|
77
|
-
renderIcon: _ref2 => {
|
|
78
|
-
let {
|
|
79
|
-
route,
|
|
80
|
-
color
|
|
81
|
-
} = _ref2;
|
|
82
|
-
return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
83
|
-
name: route.icon,
|
|
84
|
-
color: color,
|
|
85
|
-
size: 36
|
|
86
|
-
}) : null;
|
|
87
|
-
},
|
|
88
|
-
style: {
|
|
89
|
-
backgroundColor: tabsBackgroundColor || theme.colors.background
|
|
90
|
-
}
|
|
91
|
-
}));
|
|
92
|
-
};
|
|
93
|
-
return /*#__PURE__*/React.createElement(_reactNativeTabView.TabView, {
|
|
94
|
-
style: [styles.tabView, viewStyles],
|
|
95
|
-
navigationState: {
|
|
96
|
-
index,
|
|
97
|
-
routes
|
|
98
|
-
},
|
|
99
|
-
renderScene: (0, _reactNativeTabView.SceneMap)(tabScenes),
|
|
100
|
-
renderTabBar: renderTabBar,
|
|
101
|
-
onIndexChange: indexChangeHandler,
|
|
102
|
-
tabBarPosition: tabBarPosition,
|
|
103
|
-
keyboardDismissMode: keyboardDismissMode,
|
|
104
|
-
swipeEnabled: swipeEnabled
|
|
105
|
-
});
|
|
106
|
-
};
|
|
107
|
-
const styles = _reactNative.StyleSheet.create({
|
|
108
|
-
tabView: {
|
|
109
|
-
flex: 1
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
var _default = (0, _theming.withTheme)(TabViewComponent);
|
|
113
|
-
exports.default = _default;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
const TabViewItem = _ref => {
|
|
11
|
-
let {
|
|
12
|
-
style,
|
|
13
|
-
children
|
|
14
|
-
} = _ref;
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
16
|
-
style: [styles.parentContainer, style]
|
|
17
|
-
}, children);
|
|
18
|
-
};
|
|
19
|
-
const styles = _reactNative.StyleSheet.create({
|
|
20
|
-
parentContainer: {
|
|
21
|
-
flex: 1
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _default = TabViewItem;
|
|
25
|
-
exports.default = _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "TabView", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _TabView.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "TabViewItem", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _TabViewItem.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _TabView = _interopRequireDefault(require("./TabView"));
|
|
19
|
-
var _TabViewItem = _interopRequireDefault(require("./TabViewItem"));
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,77 +0,0 @@
|
|
|
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: "Tab View",
|
|
10
|
-
tag: "TabView",
|
|
11
|
-
description: "Tab view container",
|
|
12
|
-
category: _types.COMPONENT_TYPES.swiper,
|
|
13
|
-
stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects, _types.StylesPanelSections.LayoutSelectedItem, _types.StylesPanelSections.Background, _types.StylesPanelSections.Typography],
|
|
14
|
-
layout: {
|
|
15
|
-
flex: 1
|
|
16
|
-
},
|
|
17
|
-
triggers: [_types.Triggers.OnIndexChanged, _types.Triggers.OnEndReached],
|
|
18
|
-
props: {
|
|
19
|
-
onIndexChanged: (0, _types.createActionProp)({
|
|
20
|
-
label: "On index changed",
|
|
21
|
-
description: "Action to execute when swipe to new index"
|
|
22
|
-
}),
|
|
23
|
-
onEndReached: (0, _types.createActionProp)({
|
|
24
|
-
label: "On end reached",
|
|
25
|
-
description: "Action to execute when end of swiping reached"
|
|
26
|
-
}),
|
|
27
|
-
tabBarPosition: (0, _types.createTextEnumProp)({
|
|
28
|
-
label: "Tab Bar Position",
|
|
29
|
-
description: "Position of tab bar",
|
|
30
|
-
options: ["top", "bottom"],
|
|
31
|
-
defaultValue: "top"
|
|
32
|
-
}),
|
|
33
|
-
keyboardDismissMode: (0, _types.createTextEnumProp)({
|
|
34
|
-
label: "Keyboard Dismiss Mode",
|
|
35
|
-
description: "Keyboard Dismiss Mode",
|
|
36
|
-
options: ["auto", "on-drag", "none"],
|
|
37
|
-
defaultValue: "auto"
|
|
38
|
-
}),
|
|
39
|
-
swipeEnabled: (0, _types.createStaticBoolProp)({
|
|
40
|
-
label: "Swipe Enabled",
|
|
41
|
-
description: "Whether swiping is enabled or not",
|
|
42
|
-
defaultValue: true
|
|
43
|
-
}),
|
|
44
|
-
scrollEnabled: (0, _types.createStaticBoolProp)({
|
|
45
|
-
label: "Tab Scroll Enabled",
|
|
46
|
-
description: "Whether scrolling of tabs is enabled or not",
|
|
47
|
-
defaultValue: false
|
|
48
|
-
}),
|
|
49
|
-
activeColor: (0, _types.createColorProp)({
|
|
50
|
-
label: "Active Color",
|
|
51
|
-
description: "Color of icon and text of active tab",
|
|
52
|
-
defaultValue: "primary"
|
|
53
|
-
}),
|
|
54
|
-
inactiveColor: (0, _types.createColorProp)({
|
|
55
|
-
label: "Inactive Color",
|
|
56
|
-
description: "Color of icon and text of inactive tab(s)",
|
|
57
|
-
defaultValue: null
|
|
58
|
-
}),
|
|
59
|
-
pressColor: (0, _types.createColorProp)({
|
|
60
|
-
label: "Press Color",
|
|
61
|
-
description: "Color of ripple when pressed",
|
|
62
|
-
defaultValue: "primary",
|
|
63
|
-
group: _types.GROUPS.android
|
|
64
|
-
}),
|
|
65
|
-
indicatorColor: (0, _types.createColorProp)({
|
|
66
|
-
label: "Indicator Color",
|
|
67
|
-
description: "Color of indicator",
|
|
68
|
-
defaultValue: "primary"
|
|
69
|
-
}),
|
|
70
|
-
tabsBackgroundColor: (0, _types.createColorProp)({
|
|
71
|
-
label: "Tabs Background Color",
|
|
72
|
-
description: "Background color of tabs container",
|
|
73
|
-
defaultValue: "background"
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,37 +0,0 @@
|
|
|
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: "Tab View Item",
|
|
10
|
-
tag: "TabViewItem",
|
|
11
|
-
description: "Single Tab View item to be used in TabView. Each item represents a single tab and its content",
|
|
12
|
-
category: _types.COMPONENT_TYPES.swiper,
|
|
13
|
-
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
-
layout: {
|
|
15
|
-
flex: 1
|
|
16
|
-
},
|
|
17
|
-
props: {
|
|
18
|
-
title: (0, _types.createTextProp)({
|
|
19
|
-
label: "Title",
|
|
20
|
-
description: "Title of tab item",
|
|
21
|
-
defaultValue: "Title",
|
|
22
|
-
required: true,
|
|
23
|
-
group: _types.GROUPS.basic
|
|
24
|
-
}),
|
|
25
|
-
icon: (0, _types.createIconProp)({
|
|
26
|
-
defaultValue: null,
|
|
27
|
-
required: false
|
|
28
|
-
}),
|
|
29
|
-
accessibilityLabel: (0, _types.createTextProp)({
|
|
30
|
-
label: "Accessibility Label",
|
|
31
|
-
description: "Accessibility Label",
|
|
32
|
-
defaultValue: null,
|
|
33
|
-
group: _types.GROUPS.accessibility
|
|
34
|
-
})
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { StyleSheet } from "react-native";
|
|
4
|
-
import { TabView, TabBar, SceneMap } from "react-native-tab-view";
|
|
5
|
-
import TabViewItem from "./TabViewItem";
|
|
6
|
-
import { withTheme } from "../../theming";
|
|
7
|
-
import { extractStyles } from "../../utilities";
|
|
8
|
-
const TabViewComponent = _ref => {
|
|
9
|
-
let {
|
|
10
|
-
Icon,
|
|
11
|
-
onIndexChanged,
|
|
12
|
-
onEndReached,
|
|
13
|
-
tabBarPosition,
|
|
14
|
-
keyboardDismissMode,
|
|
15
|
-
swipeEnabled,
|
|
16
|
-
scrollEnabled,
|
|
17
|
-
activeColor,
|
|
18
|
-
inactiveColor,
|
|
19
|
-
pressColor,
|
|
20
|
-
indicatorColor,
|
|
21
|
-
tabsBackgroundColor,
|
|
22
|
-
style,
|
|
23
|
-
theme,
|
|
24
|
-
children
|
|
25
|
-
} = _ref;
|
|
26
|
-
const [index, setIndex] = React.useState(0);
|
|
27
|
-
const [routes, setRoutes] = React.useState([]);
|
|
28
|
-
const [tabScenes, setTabScenes] = React.useState({});
|
|
29
|
-
const {
|
|
30
|
-
textStyles,
|
|
31
|
-
viewStyles
|
|
32
|
-
} = extractStyles(style);
|
|
33
|
-
|
|
34
|
-
//Populate routes and scenes based on children
|
|
35
|
-
React.useEffect(() => {
|
|
36
|
-
const newRoutes = [];
|
|
37
|
-
const scenes = {};
|
|
38
|
-
React.Children.toArray(children).filter(child => /*#__PURE__*/React.isValidElement(child) && child.type === TabViewItem).forEach((item, idx) => {
|
|
39
|
-
const child = item;
|
|
40
|
-
newRoutes.push({
|
|
41
|
-
key: idx.toString(),
|
|
42
|
-
title: child.props.title,
|
|
43
|
-
icon: child.props.icon,
|
|
44
|
-
accessibilityLabel: child.props.accessibilityLabel
|
|
45
|
-
});
|
|
46
|
-
scenes[idx] = () => child;
|
|
47
|
-
});
|
|
48
|
-
setRoutes(newRoutes);
|
|
49
|
-
setTabScenes(scenes);
|
|
50
|
-
}, [children]);
|
|
51
|
-
const indexChangeHandler = i => {
|
|
52
|
-
setIndex(i);
|
|
53
|
-
onIndexChanged === null || onIndexChanged === void 0 ? void 0 : onIndexChanged(i);
|
|
54
|
-
if (i === routes.length) {
|
|
55
|
-
onEndReached === null || onEndReached === void 0 ? void 0 : onEndReached();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const renderTabBar = props => {
|
|
59
|
-
return /*#__PURE__*/React.createElement(TabBar, _extends({}, props, {
|
|
60
|
-
activeColor: activeColor || theme.colors.primary,
|
|
61
|
-
inactiveColor: inactiveColor || theme.colors.divider,
|
|
62
|
-
pressColor: pressColor || theme.colors.primary,
|
|
63
|
-
scrollEnabled: scrollEnabled,
|
|
64
|
-
indicatorStyle: {
|
|
65
|
-
backgroundColor: indicatorColor || theme.colors.primary
|
|
66
|
-
},
|
|
67
|
-
labelStyle: textStyles,
|
|
68
|
-
renderIcon: _ref2 => {
|
|
69
|
-
let {
|
|
70
|
-
route,
|
|
71
|
-
color
|
|
72
|
-
} = _ref2;
|
|
73
|
-
return route !== null && route !== void 0 && route.icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
74
|
-
name: route.icon,
|
|
75
|
-
color: color,
|
|
76
|
-
size: 36
|
|
77
|
-
}) : null;
|
|
78
|
-
},
|
|
79
|
-
style: {
|
|
80
|
-
backgroundColor: tabsBackgroundColor || theme.colors.background
|
|
81
|
-
}
|
|
82
|
-
}));
|
|
83
|
-
};
|
|
84
|
-
return /*#__PURE__*/React.createElement(TabView, {
|
|
85
|
-
style: [styles.tabView, viewStyles],
|
|
86
|
-
navigationState: {
|
|
87
|
-
index,
|
|
88
|
-
routes
|
|
89
|
-
},
|
|
90
|
-
renderScene: SceneMap(tabScenes),
|
|
91
|
-
renderTabBar: renderTabBar,
|
|
92
|
-
onIndexChange: indexChangeHandler,
|
|
93
|
-
tabBarPosition: tabBarPosition,
|
|
94
|
-
keyboardDismissMode: keyboardDismissMode,
|
|
95
|
-
swipeEnabled: swipeEnabled
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
const styles = StyleSheet.create({
|
|
99
|
-
tabView: {
|
|
100
|
-
flex: 1
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
export default withTheme(TabViewComponent);
|