@kaspernj/api-maker 1.0.398 → 1.0.400
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/package.json +1 -1
- package/src/router/route.jsx +1 -1
- package/src/table/filters/filter.jsx +24 -19
package/package.json
CHANGED
package/src/router/route.jsx
CHANGED
|
@@ -120,7 +120,7 @@ const Route = memo(shapeComponent(class Route extends BaseComponent {
|
|
|
120
120
|
break
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
const routePart = this.routeParts[pathPartIndex]
|
|
123
|
+
const routePart = decodeURIComponent(this.routeParts[pathPartIndex])
|
|
124
124
|
|
|
125
125
|
if (pathPart.startsWith(":") && routePart) {
|
|
126
126
|
const paramName = pathPart.slice(1, pathPart.length)
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import {Pressable, Text, View} from "react-native"
|
|
1
2
|
import BaseComponent from "../../base-component"
|
|
2
|
-
import {digg} from "diggerize"
|
|
3
3
|
import PropTypes from "prop-types"
|
|
4
4
|
import PropTypesExact from "prop-types-exact"
|
|
5
5
|
import {memo} from "react"
|
|
6
6
|
import {shapeComponent} from "set-state-compare/src/shape-component"
|
|
7
7
|
|
|
8
8
|
export default memo(shapeComponent(class ApiMakerTableFilter extends BaseComponent {
|
|
9
|
+
static defaultProps = {
|
|
10
|
+
a: null,
|
|
11
|
+
pre: null
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
static propTypes = PropTypesExact({
|
|
10
15
|
a: PropTypes.string,
|
|
11
16
|
filterIndex: PropTypes.number.isRequired,
|
|
@@ -22,23 +27,25 @@ export default memo(shapeComponent(class ApiMakerTableFilter extends BaseCompone
|
|
|
22
27
|
const {a, pre, sc} = this.props
|
|
23
28
|
|
|
24
29
|
return (
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
<View style={{display: "flex", flexDirection: "row", backgroundColor: "grey", paddingVertical: 10, paddingHorizontal: 6}}>
|
|
31
|
+
<Pressable dataSet={{class: "filter-label"}} onPress={this.tt.onFilterPressed}>
|
|
32
|
+
<Text>
|
|
33
|
+
{p.length > 0 &&
|
|
34
|
+
`${p.join(".")}.`
|
|
35
|
+
}
|
|
36
|
+
{a} {sc} {pre} {v}
|
|
37
|
+
</Text>
|
|
38
|
+
</Pressable>
|
|
39
|
+
<Pressable dataSet={{class: "remove-filter-button"}} onPress={this.tt.onRemoveFilterPressed} style={{marginLeft: 6}}>
|
|
40
|
+
<Text>
|
|
41
|
+
✖
|
|
42
|
+
</Text>
|
|
43
|
+
</Pressable>
|
|
44
|
+
</View>
|
|
38
45
|
)
|
|
39
46
|
}
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
onFilterPressed = (e) => {
|
|
42
49
|
e.preventDefault()
|
|
43
50
|
|
|
44
51
|
const {a, filterIndex, p, pre, v} = this.p
|
|
@@ -46,11 +53,9 @@ export default memo(shapeComponent(class ApiMakerTableFilter extends BaseCompone
|
|
|
46
53
|
this.props.onClick({a, filterIndex, p, pre, v})
|
|
47
54
|
}
|
|
48
55
|
|
|
49
|
-
|
|
56
|
+
onRemoveFilterPressed = (e) => {
|
|
50
57
|
e.preventDefault()
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.props.onRemoveClicked({filterIndex})
|
|
59
|
+
this.props.onRemoveClicked({filterIndex: this.p.filterIndex})
|
|
55
60
|
}
|
|
56
61
|
}))
|