@draftbit/core 48.0.3-faf64f.2 → 48.1.0
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/src/components/SectionList/SectionHeader.d.ts +15 -0
- package/lib/src/components/SectionList/SectionHeader.js +14 -0
- package/lib/src/components/SectionList/SectionHeader.js.map +1 -0
- package/lib/src/components/SectionList/SectionList.d.ts +20 -0
- package/lib/src/components/SectionList/SectionList.js +95 -0
- package/lib/src/components/SectionList/SectionList.js.map +1 -0
- package/lib/src/components/SectionList/index.d.ts +2 -0
- package/lib/src/components/SectionList/index.js +3 -0
- package/lib/src/components/SectionList/index.js.map +1 -0
- package/lib/src/components/Table/TableCell.d.ts +1 -0
- package/lib/src/components/Table/TableCell.js +4 -2
- package/lib/src/components/Table/TableCell.js.map +1 -1
- package/lib/src/components/Table/TableRow.d.ts +1 -0
- package/lib/src/components/Table/TableRow.js +4 -2
- package/lib/src/components/Table/TableRow.js.map +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -0
- package/lib/src/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +19 -4
- package/src/components/SectionList/SectionHeader.js +14 -0
- package/src/components/SectionList/SectionHeader.js.map +1 -0
- package/src/components/SectionList/SectionHeader.tsx +37 -0
- package/src/components/SectionList/SectionList.js +95 -0
- package/src/components/SectionList/SectionList.js.map +1 -0
- package/src/components/SectionList/SectionList.tsx +171 -0
- package/src/components/SectionList/index.js +3 -0
- package/src/components/SectionList/index.js.map +1 -0
- package/src/components/SectionList/index.tsx +2 -0
- package/src/components/Table/TableCell.js +4 -2
- package/src/components/Table/TableCell.js.map +1 -1
- package/src/components/Table/TableCell.tsx +8 -2
- package/src/components/Table/TableRow.js +4 -2
- package/src/components/Table/TableRow.js.map +1 -1
- package/src/components/Table/TableRow.tsx +8 -2
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/index.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "48.0
|
|
3
|
+
"version": "48.1.0",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/src/index.js",
|
|
6
6
|
"types": "lib/src/index.d.ts",
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"clean": "rimraf lib",
|
|
17
17
|
"clean:modules": "rimraf node_modules",
|
|
18
|
-
"build": "yarn clean && yarn tsc"
|
|
18
|
+
"build": "yarn clean && yarn tsc",
|
|
19
|
+
"test": "jest",
|
|
20
|
+
"test:coverage": "jest --coverage"
|
|
19
21
|
},
|
|
20
22
|
"keywords": [
|
|
21
23
|
"react-native",
|
|
@@ -39,7 +41,7 @@
|
|
|
39
41
|
"dependencies": {
|
|
40
42
|
"@date-io/date-fns": "^1.3.13",
|
|
41
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
42
|
-
"@draftbit/types": "
|
|
44
|
+
"@draftbit/types": "48.1.0",
|
|
43
45
|
"@expo/vector-icons": "^13.0.0",
|
|
44
46
|
"@material-ui/core": "^4.11.0",
|
|
45
47
|
"@material-ui/pickers": "^3.2.10",
|
|
@@ -79,5 +81,18 @@
|
|
|
79
81
|
"node_modules/",
|
|
80
82
|
"lib/"
|
|
81
83
|
],
|
|
82
|
-
"
|
|
84
|
+
"jest": {
|
|
85
|
+
"preset": "react-native",
|
|
86
|
+
"setupFiles": [
|
|
87
|
+
"./jest-setup.js"
|
|
88
|
+
],
|
|
89
|
+
"setupFilesAfterEnv": [
|
|
90
|
+
"@testing-library/jest-native/extend-expect"
|
|
91
|
+
],
|
|
92
|
+
"testPathIgnorePatterns": [
|
|
93
|
+
"lib",
|
|
94
|
+
"__mocks__"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"gitHead": "0d9c14348aea3bb6caf120cc80354be5e9788ccf"
|
|
83
98
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View, Text } from "react-native";
|
|
3
|
+
import { withTheme } from "../../theming";
|
|
4
|
+
const SectionHeader = ({ style, children, }) => React.createElement(View, { style: [style] }, children);
|
|
5
|
+
export const DefaultSectionHeader = withTheme(({ title, theme }) => {
|
|
6
|
+
return (React.createElement(Text, { testID: "default-section-header", style: {
|
|
7
|
+
color: theme.colors.background,
|
|
8
|
+
backgroundColor: theme.colors.primary,
|
|
9
|
+
fontSize: 16,
|
|
10
|
+
padding: 10,
|
|
11
|
+
} }, title));
|
|
12
|
+
});
|
|
13
|
+
export default SectionHeader;
|
|
14
|
+
//# sourceMappingURL=SectionHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeader.js","sourceRoot":"","sources":["SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,IAAI,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAO1C,MAAM,aAAa,GAA0D,CAAC,EAC5E,KAAK,EACL,QAAQ,GACT,EAAE,EAAE,CAAC,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,KAAK,CAAC,IAAG,QAAQ,CAAQ,CAAC;AAM9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAC3C,CAAC,EAAE,KAAK,EAAE,KAAK,EAA6B,EAAE,EAAE;IAC9C,OAAO,CACL,oBAAC,IAAI,IACH,MAAM,EAAC,wBAAwB,EAC/B,KAAK,EAAE;YACL,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU;YAC9B,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO;YACrC,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;SACZ,IAEA,KAAK,CACD,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View, StyleProp, ViewStyle, Text } from "react-native";
|
|
3
|
+
import { withTheme } from "../../theming";
|
|
4
|
+
import type { Theme } from "../../styles/DefaultTheme";
|
|
5
|
+
|
|
6
|
+
interface SectionHeaderProps {
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const SectionHeader: React.FC<React.PropsWithChildren<SectionHeaderProps>> = ({
|
|
11
|
+
style,
|
|
12
|
+
children,
|
|
13
|
+
}) => <View style={[style]}>{children}</View>;
|
|
14
|
+
|
|
15
|
+
interface DefaultSectionHeaderProps {
|
|
16
|
+
title: string;
|
|
17
|
+
theme: Theme;
|
|
18
|
+
}
|
|
19
|
+
export const DefaultSectionHeader = withTheme(
|
|
20
|
+
({ title, theme }: DefaultSectionHeaderProps) => {
|
|
21
|
+
return (
|
|
22
|
+
<Text
|
|
23
|
+
testID="default-section-header"
|
|
24
|
+
style={{
|
|
25
|
+
color: theme.colors.background,
|
|
26
|
+
backgroundColor: theme.colors.primary,
|
|
27
|
+
fontSize: 16,
|
|
28
|
+
padding: 10,
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
31
|
+
{title}
|
|
32
|
+
</Text>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export default SectionHeader;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FlashList } from "@shopify/flash-list";
|
|
3
|
+
import { FlatList } from "react-native";
|
|
4
|
+
import SectionHeader, { DefaultSectionHeader } from "./SectionHeader";
|
|
5
|
+
export const DEFAULT_SECTION = "Uncategorized";
|
|
6
|
+
const SectionList = ({ sectionKey, listComponent = "FlatList", data: dataProp, renderItem: renderItemProp, ...rest }) => {
|
|
7
|
+
const data = React.useMemo(() => (dataProp || []), [dataProp]);
|
|
8
|
+
const dataWithSections = React.useMemo(() => {
|
|
9
|
+
var _a;
|
|
10
|
+
const result = [];
|
|
11
|
+
const sectionDataItems = {};
|
|
12
|
+
for (const item of data) {
|
|
13
|
+
const section = ((_a = item[sectionKey]) === null || _a === void 0 ? void 0 : _a.toString()) || DEFAULT_SECTION;
|
|
14
|
+
if (sectionDataItems[section]) {
|
|
15
|
+
sectionDataItems[section].push(item);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
sectionDataItems[section] = [item];
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
for (const section in sectionDataItems) {
|
|
22
|
+
result.push({ type: "SECTION_ITEM", title: section });
|
|
23
|
+
const sectionItems = sectionDataItems[section].map((item) => ({ type: "DATA_ITEM", data: item }));
|
|
24
|
+
result.push(...sectionItems);
|
|
25
|
+
}
|
|
26
|
+
return result;
|
|
27
|
+
}, [data, sectionKey]);
|
|
28
|
+
const extractSectionHeader = (element) => {
|
|
29
|
+
if (!element) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const props = element.props || {};
|
|
33
|
+
const children = React.Children.toArray(props.children).map((child) => child);
|
|
34
|
+
if (element.type === SectionHeader) {
|
|
35
|
+
return element;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
for (const child of children) {
|
|
39
|
+
if (child.type === SectionHeader) {
|
|
40
|
+
return child;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
};
|
|
46
|
+
const extractRemainingNonSectionHeader = (element) => {
|
|
47
|
+
if (!element) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
const props = element.props || {};
|
|
51
|
+
const children = React.Children.toArray(props.children).map((child) => child);
|
|
52
|
+
if (element.type === SectionHeader) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
const newChildren = [];
|
|
57
|
+
for (const child of children) {
|
|
58
|
+
if (child.type !== SectionHeader) {
|
|
59
|
+
newChildren.push(child);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return React.cloneElement(element, {
|
|
63
|
+
...props,
|
|
64
|
+
children: newChildren,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const renderItem = ({ item, index, }) => {
|
|
69
|
+
switch (item.type) {
|
|
70
|
+
case "SECTION_ITEM": {
|
|
71
|
+
const renderedItem = renderItemProp({
|
|
72
|
+
index,
|
|
73
|
+
section: item.title,
|
|
74
|
+
});
|
|
75
|
+
return (extractSectionHeader(renderedItem) || (React.createElement(DefaultSectionHeader, { title: item.title })));
|
|
76
|
+
}
|
|
77
|
+
case "DATA_ITEM": {
|
|
78
|
+
const renderedItem = renderItemProp({
|
|
79
|
+
item: item.data,
|
|
80
|
+
index,
|
|
81
|
+
section: item.data[sectionKey] || DEFAULT_SECTION,
|
|
82
|
+
});
|
|
83
|
+
return extractRemainingNonSectionHeader(renderedItem);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
switch (listComponent) {
|
|
88
|
+
case "FlatList":
|
|
89
|
+
return (React.createElement(FlatList, { ...rest, data: dataWithSections, renderItem: renderItem }));
|
|
90
|
+
case "FlashList":
|
|
91
|
+
return (React.createElement(FlashList, { ...rest, data: dataWithSections, renderItem: renderItem }));
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
export default SectionList;
|
|
95
|
+
//# sourceMappingURL=SectionList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionList.js","sourceRoot":"","sources":["SectionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAkB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,aAAa,EAAE,EAAE,oBAAoB,EAAE,MAAM,iBAAiB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iBACzB;aACF;YACD,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE;gBACjC,GAAG,KAAK;gBACR,QAAQ,EAAE,WAAW;aACtB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;IAEF,MAAM,UAAU,GAAG,CAAC,EAClB,IAAI,EACJ,KAAK,GAIN,EAAE,EAAE;QACH,QAAQ,IAAI,CAAC,IAAI,EAAE;YACjB,KAAK,cAAc,CAAC,CAAC;gBACnB,MAAM,YAAY,GAAG,cAAc,CAAC;oBAClC,KAAK;oBACL,OAAO,EAAE,IAAI,CAAC,KAAK;iBACpB,CAAC,CAAC;gBACH,OAAO,CACL,oBAAoB,CAAC,YAAY,CAAC,IAAI,CACpC,oBAAC,oBAAoB,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI,CAC5C,CACF,CAAC;aACH;YACD,KAAK,WAAW,CAAC,CAAC;gBAChB,MAAM,YAAY,GAAG,cAAc,CAAC;oBAClC,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,KAAK;oBACL,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,eAAe;iBAClD,CAAC,CAAC;gBACH,OAAO,gCAAgC,CAAC,YAAY,CAAC,CAAC;aACvD;SACF;IACH,CAAC,CAAC;IAEF,QAAQ,aAAa,EAAE;QACrB,KAAK,UAAU;YACb,OAAO,CACL,oBAAC,QAAQ,OACF,IAA0C,EAC/C,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;QACJ,KAAK,WAAW;YACd,OAAO,CACL,oBAAC,SAAS,OACH,IAA2C,EAChD,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;KACL;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FlashListProps, FlashList } from "@shopify/flash-list";
|
|
3
|
+
import { FlatListProps, FlatList } from "react-native";
|
|
4
|
+
import SectionHeader, { DefaultSectionHeader } from "./SectionHeader";
|
|
5
|
+
|
|
6
|
+
type ListComponentType = "FlatList" | "FlashList";
|
|
7
|
+
|
|
8
|
+
interface AdditionalSectionListProps<T> {
|
|
9
|
+
sectionKey: string;
|
|
10
|
+
renderItem: (itemInfo: {
|
|
11
|
+
item?: T;
|
|
12
|
+
index: number;
|
|
13
|
+
section: string;
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
listComponent?: ListComponentType;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
type FlatListSectionListProps<T> = Omit<FlatListProps<T>, "renderItem"> &
|
|
19
|
+
AdditionalSectionListProps<T>;
|
|
20
|
+
|
|
21
|
+
type FlashListSectionListProps<T> = Omit<FlashListProps<T>, "renderItem"> &
|
|
22
|
+
AdditionalSectionListProps<T>;
|
|
23
|
+
|
|
24
|
+
interface SectionListDataItem<T> {
|
|
25
|
+
type: "DATA_ITEM";
|
|
26
|
+
data: T;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
interface SectionListSectionItem {
|
|
30
|
+
type: "SECTION_ITEM";
|
|
31
|
+
title: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type SectionListItem<T> = SectionListDataItem<T> | SectionListSectionItem;
|
|
35
|
+
|
|
36
|
+
export const DEFAULT_SECTION = "Uncategorized";
|
|
37
|
+
|
|
38
|
+
const SectionList = <T extends { [key: string]: any }>({
|
|
39
|
+
sectionKey,
|
|
40
|
+
listComponent = "FlatList",
|
|
41
|
+
data: dataProp,
|
|
42
|
+
renderItem: renderItemProp,
|
|
43
|
+
...rest
|
|
44
|
+
}: FlatListSectionListProps<T> | FlashListSectionListProps<T>) => {
|
|
45
|
+
const data = React.useMemo(() => (dataProp || []) as T[], [dataProp]);
|
|
46
|
+
|
|
47
|
+
const dataWithSections = React.useMemo(() => {
|
|
48
|
+
const result: SectionListItem<T>[] = [];
|
|
49
|
+
const sectionDataItems: { [key: string]: T[] } = {};
|
|
50
|
+
|
|
51
|
+
for (const item of data) {
|
|
52
|
+
const section = item[sectionKey]?.toString() || DEFAULT_SECTION;
|
|
53
|
+
if (sectionDataItems[section]) {
|
|
54
|
+
sectionDataItems[section].push(item);
|
|
55
|
+
} else {
|
|
56
|
+
sectionDataItems[section] = [item];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
for (const section in sectionDataItems) {
|
|
61
|
+
result.push({ type: "SECTION_ITEM", title: section });
|
|
62
|
+
const sectionItems: SectionListDataItem<T>[] = sectionDataItems[
|
|
63
|
+
section
|
|
64
|
+
].map((item) => ({ type: "DATA_ITEM", data: item }));
|
|
65
|
+
result.push(...sectionItems);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return result;
|
|
69
|
+
}, [data, sectionKey]);
|
|
70
|
+
|
|
71
|
+
const extractSectionHeader = (
|
|
72
|
+
element: JSX.Element | null
|
|
73
|
+
): JSX.Element | null => {
|
|
74
|
+
if (!element) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const props = element.props || {};
|
|
79
|
+
const children = React.Children.toArray(props.children).map(
|
|
80
|
+
(child) => child as React.ReactElement
|
|
81
|
+
);
|
|
82
|
+
if (element.type === SectionHeader) {
|
|
83
|
+
return element;
|
|
84
|
+
} else {
|
|
85
|
+
for (const child of children) {
|
|
86
|
+
if (child.type === SectionHeader) {
|
|
87
|
+
return child;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const extractRemainingNonSectionHeader = (
|
|
95
|
+
element: JSX.Element | null
|
|
96
|
+
): JSX.Element | null => {
|
|
97
|
+
if (!element) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const props = element.props || {};
|
|
102
|
+
const children = React.Children.toArray(props.children).map(
|
|
103
|
+
(child) => child as React.ReactElement
|
|
104
|
+
);
|
|
105
|
+
if (element.type === SectionHeader) {
|
|
106
|
+
return null;
|
|
107
|
+
} else {
|
|
108
|
+
const newChildren = [];
|
|
109
|
+
for (const child of children) {
|
|
110
|
+
if (child.type !== SectionHeader) {
|
|
111
|
+
newChildren.push(child);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return React.cloneElement(element, {
|
|
115
|
+
...props,
|
|
116
|
+
children: newChildren,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const renderItem = ({
|
|
122
|
+
item,
|
|
123
|
+
index,
|
|
124
|
+
}: {
|
|
125
|
+
item: SectionListItem<T>;
|
|
126
|
+
index: number;
|
|
127
|
+
}) => {
|
|
128
|
+
switch (item.type) {
|
|
129
|
+
case "SECTION_ITEM": {
|
|
130
|
+
const renderedItem = renderItemProp({
|
|
131
|
+
index,
|
|
132
|
+
section: item.title,
|
|
133
|
+
});
|
|
134
|
+
return (
|
|
135
|
+
extractSectionHeader(renderedItem) || (
|
|
136
|
+
<DefaultSectionHeader title={item.title} />
|
|
137
|
+
)
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
case "DATA_ITEM": {
|
|
141
|
+
const renderedItem = renderItemProp({
|
|
142
|
+
item: item.data,
|
|
143
|
+
index,
|
|
144
|
+
section: item.data[sectionKey] || DEFAULT_SECTION,
|
|
145
|
+
});
|
|
146
|
+
return extractRemainingNonSectionHeader(renderedItem);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
switch (listComponent) {
|
|
152
|
+
case "FlatList":
|
|
153
|
+
return (
|
|
154
|
+
<FlatList
|
|
155
|
+
{...(rest as FlatListProps<SectionListItem<T>>)}
|
|
156
|
+
data={dataWithSections}
|
|
157
|
+
renderItem={renderItem}
|
|
158
|
+
/>
|
|
159
|
+
);
|
|
160
|
+
case "FlashList":
|
|
161
|
+
return (
|
|
162
|
+
<FlashList
|
|
163
|
+
{...(rest as FlashListProps<SectionListItem<T>>)}
|
|
164
|
+
data={dataWithSections}
|
|
165
|
+
renderItem={renderItem}
|
|
166
|
+
/>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export default SectionList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleSheet } from "react-native";
|
|
3
3
|
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
4
|
-
|
|
4
|
+
import Pressable from "../Pressable";
|
|
5
|
+
const TableCell = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = true, cellVerticalPadding, cellHorizontalPadding, children, onPress, style, }) => {
|
|
5
6
|
const parentContextValue = React.useContext(TableStyleContext);
|
|
6
7
|
const borderViewStyle = generateBorderStyles({
|
|
7
8
|
borderColor: borderColor || parentContextValue.borderColor,
|
|
@@ -12,7 +13,8 @@ const TableCell = ({ borderWidth, borderColor, borderStyle, drawTopBorder = fals
|
|
|
12
13
|
drawStartBorder,
|
|
13
14
|
drawEndBorder,
|
|
14
15
|
});
|
|
15
|
-
|
|
16
|
+
const ContainerComponent = onPress ? Pressable : View;
|
|
17
|
+
return (React.createElement(ContainerComponent, { onPress: onPress, style: [
|
|
16
18
|
styles.cellContainer,
|
|
17
19
|
borderViewStyle,
|
|
18
20
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.js","sourceRoot":"","sources":["TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAA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,CAAC,mBAAmB;gBAC/D,iBAAiB,EACf,qBAAqB,IAAI,kBAAkB,CAAC,qBAAqB;aACpE;YACD,KAAK;SACN,IAEA,QAAQ,CACU,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,aAAa,EAAE,KAAK;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
TableProps,
|
|
6
6
|
TableStyleContext,
|
|
7
7
|
} from "./TableCommon";
|
|
8
|
+
import Pressable from "../Pressable";
|
|
8
9
|
|
|
9
10
|
export interface Props extends TableProps {
|
|
11
|
+
onPress?: () => void;
|
|
10
12
|
style?: StyleProp<ViewStyle>;
|
|
11
13
|
}
|
|
12
14
|
|
|
@@ -21,6 +23,7 @@ const TableCell: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
21
23
|
cellVerticalPadding,
|
|
22
24
|
cellHorizontalPadding,
|
|
23
25
|
children,
|
|
26
|
+
onPress,
|
|
24
27
|
style,
|
|
25
28
|
}) => {
|
|
26
29
|
const parentContextValue = React.useContext(TableStyleContext);
|
|
@@ -34,8 +37,11 @@ const TableCell: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
34
37
|
drawStartBorder,
|
|
35
38
|
drawEndBorder,
|
|
36
39
|
});
|
|
40
|
+
|
|
41
|
+
const ContainerComponent = onPress ? Pressable : View;
|
|
37
42
|
return (
|
|
38
|
-
<
|
|
43
|
+
<ContainerComponent
|
|
44
|
+
onPress={onPress}
|
|
39
45
|
style={[
|
|
40
46
|
styles.cellContainer,
|
|
41
47
|
borderViewStyle,
|
|
@@ -49,7 +55,7 @@ const TableCell: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
49
55
|
]}
|
|
50
56
|
>
|
|
51
57
|
{children}
|
|
52
|
-
</
|
|
58
|
+
</ContainerComponent>
|
|
53
59
|
);
|
|
54
60
|
};
|
|
55
61
|
|
|
@@ -2,7 +2,8 @@ import React from "react";
|
|
|
2
2
|
import { View, StyleSheet } from "react-native";
|
|
3
3
|
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
4
4
|
import { withTheme } from "../../theming";
|
|
5
|
-
|
|
5
|
+
import Pressable from "../Pressable";
|
|
6
|
+
const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = true, drawStartBorder = true, drawEndBorder = false, cellVerticalPadding, cellHorizontalPadding, isTableHeader = false, children, onPress, style, theme, }) => {
|
|
6
7
|
const parentContextValue = React.useContext(TableStyleContext);
|
|
7
8
|
//Create context to use and pass to children based on own props or fall back to parent provided context
|
|
8
9
|
const contextValue = {
|
|
@@ -21,8 +22,9 @@ const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false
|
|
|
21
22
|
drawStartBorder,
|
|
22
23
|
drawEndBorder,
|
|
23
24
|
});
|
|
25
|
+
const ContainerComponent = onPress ? Pressable : View;
|
|
24
26
|
return (React.createElement(TableStyleContext.Provider, { value: contextValue },
|
|
25
|
-
React.createElement(
|
|
27
|
+
React.createElement(ContainerComponent, { onPress: onPress, style: [
|
|
26
28
|
borderViewStyle,
|
|
27
29
|
isTableHeader ? { backgroundColor: theme.colors.primary } : {},
|
|
28
30
|
style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAElB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["TableRow.tsx"],"names":[],"m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D,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY;QAC7C,oBAAC,kBAAkB,IACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;gBACL,eAAe;gBACf,aAAa,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;gBAC9D,KAAK;gBACL,MAAM,CAAC,cAAc;aACtB,IAEA,QAAQ,CACU,CACM,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,aAAa,EAAE,KAAK;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -8,8 +8,10 @@ import {
|
|
|
8
8
|
} from "./TableCommon";
|
|
9
9
|
import { Theme } from "../../styles/DefaultTheme";
|
|
10
10
|
import { withTheme } from "../../theming";
|
|
11
|
+
import Pressable from "../Pressable";
|
|
11
12
|
|
|
12
13
|
export interface Props extends TableProps {
|
|
14
|
+
onPress?: () => void;
|
|
13
15
|
isTableHeader?: boolean;
|
|
14
16
|
style?: StyleProp<ViewStyle>;
|
|
15
17
|
theme: Theme;
|
|
@@ -27,6 +29,7 @@ const TableRow: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
27
29
|
cellHorizontalPadding,
|
|
28
30
|
isTableHeader = false,
|
|
29
31
|
children,
|
|
32
|
+
onPress,
|
|
30
33
|
style,
|
|
31
34
|
theme,
|
|
32
35
|
}) => {
|
|
@@ -52,9 +55,12 @@ const TableRow: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
52
55
|
drawStartBorder,
|
|
53
56
|
drawEndBorder,
|
|
54
57
|
});
|
|
58
|
+
|
|
59
|
+
const ContainerComponent = onPress ? Pressable : View;
|
|
55
60
|
return (
|
|
56
61
|
<TableStyleContext.Provider value={contextValue}>
|
|
57
|
-
<
|
|
62
|
+
<ContainerComponent
|
|
63
|
+
onPress={onPress}
|
|
58
64
|
style={[
|
|
59
65
|
borderViewStyle,
|
|
60
66
|
isTableHeader ? { backgroundColor: theme.colors.primary } : {},
|
|
@@ -63,7 +69,7 @@ const TableRow: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
63
69
|
]}
|
|
64
70
|
>
|
|
65
71
|
{children}
|
|
66
|
-
</
|
|
72
|
+
</ContainerComponent>
|
|
67
73
|
</TableStyleContext.Provider>
|
|
68
74
|
);
|
|
69
75
|
};
|
package/src/index.js
CHANGED
|
@@ -35,6 +35,7 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
|
35
35
|
export { default as Picker } from "./components/Picker/Picker";
|
|
36
36
|
export { default as Slider } from "./components/Slider";
|
|
37
37
|
export { default as Stepper } from "./components/Stepper";
|
|
38
|
+
export { SectionList, SectionHeader } from "./components/SectionList";
|
|
38
39
|
/* Deprecated: Fix or Delete! */
|
|
39
40
|
export { default as AccordionItem } from "./deprecated-components/AccordionItem";
|
|
40
41
|
export { default as AvatarEdit } from "./deprecated-components/AvatarEdit";
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,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AqC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AACrG,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAC/F,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|
package/src/index.tsx
CHANGED
|
@@ -50,6 +50,7 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
|
50
50
|
export { default as Picker } from "./components/Picker/Picker";
|
|
51
51
|
export { default as Slider } from "./components/Slider";
|
|
52
52
|
export { default as Stepper } from "./components/Stepper";
|
|
53
|
+
export { SectionList, SectionHeader } from "./components/SectionList";
|
|
53
54
|
|
|
54
55
|
/* Deprecated: Fix or Delete! */
|
|
55
56
|
export { default as AccordionItem } from "./deprecated-components/AccordionItem";
|