@kaspernj/api-maker 1.0.434 → 1.0.435
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 +2 -2
- package/src/base-component.jsx +1 -4
- package/src/bootstrap/attribute-row/index.jsx +2 -1
- package/src/bootstrap/attribute-rows.jsx +1 -1
- package/src/bootstrap/card.jsx +2 -1
- package/src/bootstrap/input.jsx +1 -1
- package/src/bootstrap/paginate.jsx +2 -1
- package/src/bootstrap/sort-link.jsx +29 -44
- package/src/collection-loader.jsx +2 -1
- package/src/event-created.jsx +1 -1
- package/src/event-destroyed.jsx +1 -1
- package/src/event-emitter-listener.jsx +1 -1
- package/src/event-listener.jsx +1 -1
- package/src/event-updated.jsx +4 -3
- package/src/form.jsx +2 -1
- package/src/inputs/attachment.jsx +1 -1
- package/src/inputs/checkbox.jsx +1 -1
- package/src/inputs/checkboxes.jsx +1 -1
- package/src/inputs/input.jsx +2 -1
- package/src/inputs/money.jsx +2 -1
- package/src/inputs/select.jsx +1 -1
- package/src/link.jsx +12 -7
- package/src/modal.jsx +1 -1
- package/src/resize-observer.jsx +1 -1
- package/src/super-admin/edit-page/edit-attribute-checkbox.jsx +2 -1
- package/src/super-admin/edit-page/edit-attribute-content.jsx +1 -1
- package/src/super-admin/edit-page/edit-attribute-input.jsx +2 -1
- package/src/super-admin/edit-page/edit-attribute.jsx +1 -1
- package/src/super-admin/edit-page.jsx +1 -1
- package/src/super-admin/index-page.jsx +1 -1
- package/src/super-admin/index.jsx +2 -1
- package/src/super-admin/layout/header/index.jsx +2 -1
- package/src/super-admin/layout/index.jsx +2 -2
- package/src/super-admin/layout/menu/index.jsx +1 -1
- package/src/super-admin/layout/menu/menu-content.jsx +2 -1
- package/src/super-admin/layout/menu/menu-item/index.jsx +1 -1
- package/src/super-admin/layout/no-access.jsx +1 -1
- package/src/super-admin/model-class-table.jsx +2 -1
- package/src/super-admin/show-nav.jsx +1 -1
- package/src/super-admin/show-page/belongs-to-attribute-row.jsx +1 -1
- package/src/super-admin/show-page/index.jsx +2 -1
- package/src/super-admin/show-reflection-actions.jsx +2 -1
- package/src/super-admin/show-reflection-link.jsx +1 -1
- package/src/super-admin/show-reflection-page.jsx +1 -1
- package/src/table/components/column.jsx +1 -1
- package/src/table/components/flat-list.jsx +1 -1
- package/src/table/components/header.jsx +10 -2
- package/src/table/components/row.jsx +1 -1
- package/src/table/filters/attribute-element.jsx +1 -1
- package/src/table/filters/filter-form.jsx +2 -1
- package/src/table/filters/filter.jsx +1 -1
- package/src/table/filters/index.jsx +1 -1
- package/src/table/filters/load-search-modal.jsx +2 -1
- package/src/table/filters/reflection-element.jsx +1 -1
- package/src/table/filters/save-search-modal.jsx +1 -1
- package/src/table/filters/scope-element.jsx +1 -1
- package/src/table/header-column-content.jsx +54 -0
- package/src/table/header-column.jsx +3 -18
- package/src/table/header-select.jsx +72 -0
- package/src/table/model-column.jsx +3 -4
- package/src/table/model-row.jsx +2 -4
- package/src/table/settings/column-row.jsx +2 -1
- package/src/table/settings/download-action.jsx +1 -1
- package/src/table/settings/index.jsx +2 -1
- package/src/table/table.jsx +65 -41
- package/src/table/use-sorting.mjs +30 -0
- package/src/table/worker-plugins-check-all-checkbox.jsx +2 -1
- package/src/table/worker-plugins-checkbox.jsx +2 -1
- package/src/utils/card.jsx +49 -0
- package/src/utils/checkbox.jsx +1 -1
- package/src/utils/modal.jsx +59 -0
- package/src/with-can-can.jsx +1 -1
- package/src/with-collection.jsx +1 -1
- package/src/with-model.jsx +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import BaseComponent from "../base-component"
|
|
2
|
+
import memo from "set-state-compare/src/memo"
|
|
3
|
+
import PropTypes from "prop-types"
|
|
4
|
+
import propTypesExact from "prop-types-exact"
|
|
5
|
+
import {shapeComponent} from "set-state-compare/src/shape-component"
|
|
6
|
+
import Text from "./text"
|
|
7
|
+
|
|
8
|
+
export default memo(shapeComponent(class ApiMakerUtilsCard extends BaseComponent {
|
|
9
|
+
static propTypes = propTypesExact({
|
|
10
|
+
children: PropTypes.node,
|
|
11
|
+
controls: PropTypes.node,
|
|
12
|
+
dataSet: PropTypes.object,
|
|
13
|
+
header: PropTypes.string,
|
|
14
|
+
style: PropTypes.object
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
render() {
|
|
18
|
+
const {children, controls, dataSet, header, style} = this.props
|
|
19
|
+
const {component, ...restDataSet} = dataSet || {}
|
|
20
|
+
const actualDataSet = Object.assign(
|
|
21
|
+
{component: classNames("api-maker/utils/card", component)},
|
|
22
|
+
restDataSet
|
|
23
|
+
)
|
|
24
|
+
const actualStyle = Object.assign(
|
|
25
|
+
{
|
|
26
|
+
backgroundColor: "#fff",
|
|
27
|
+
borderRadius: 15,
|
|
28
|
+
padding: 30
|
|
29
|
+
},
|
|
30
|
+
style
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<View dataSet={actualDataSet} style={actualStyle}>
|
|
35
|
+
{controls &&
|
|
36
|
+
<View style={{position: "absolute", top: 15, right: 15}}>
|
|
37
|
+
{controls}
|
|
38
|
+
</View>
|
|
39
|
+
}
|
|
40
|
+
{header &&
|
|
41
|
+
<Text style={{fontSize: 24}}>
|
|
42
|
+
{header}
|
|
43
|
+
</Text>
|
|
44
|
+
}
|
|
45
|
+
{children}
|
|
46
|
+
</View>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
}))
|
package/src/utils/checkbox.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BaseComponent from "../base-component"
|
|
2
2
|
import {CheckBox, Pressable, View} from "react-native"
|
|
3
|
-
import
|
|
3
|
+
import memo from "set-state-compare/src/memo"
|
|
4
4
|
import PropTypes from "prop-types"
|
|
5
5
|
import propTypesExact from "prop-types-exact"
|
|
6
6
|
import {shapeComponent} from "set-state-compare/src/shape-component.js"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {Modal, Pressable, View} from "react-native"
|
|
2
|
+
import BaseComponent from "../base-component"
|
|
3
|
+
import Card from "./card"
|
|
4
|
+
import FontAwesomeIcon from "react-native-vector-icons/FontAwesome"
|
|
5
|
+
import memo from "set-state-compare/src/memo"
|
|
6
|
+
import {shapeComponent} from "set-state-compare/src/shape-component"
|
|
7
|
+
import useBreakpoint from "../use-breakpoint"
|
|
8
|
+
|
|
9
|
+
export default memo(shapeComponent(class ApiMakerUtilsComponent extends BaseComponent {
|
|
10
|
+
render() {
|
|
11
|
+
const {xs, sm} = useBreakpoint()
|
|
12
|
+
const {children, dataSet, ...restProps} = this.props
|
|
13
|
+
const actualDataSet = Object.assign(
|
|
14
|
+
{
|
|
15
|
+
component: "api-maker/utils/modal"
|
|
16
|
+
},
|
|
17
|
+
dataSet
|
|
18
|
+
)
|
|
19
|
+
let width, maxWidth
|
|
20
|
+
|
|
21
|
+
if (xs || sm) {
|
|
22
|
+
width = "95%"
|
|
23
|
+
} else {
|
|
24
|
+
width = "80%"
|
|
25
|
+
maxWidth = 800
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Modal dataSet={actualDataSet} {...restProps}>
|
|
30
|
+
<View
|
|
31
|
+
style={{
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
width: "100%",
|
|
35
|
+
height: "100%",
|
|
36
|
+
backgroundColor: "rgba(0, 0, 0, 0.8)"
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
<Card
|
|
40
|
+
controls={this.cardHeaderControls()}
|
|
41
|
+
style={{width, maxWidth}}
|
|
42
|
+
>
|
|
43
|
+
{children}
|
|
44
|
+
</Card>
|
|
45
|
+
</View>
|
|
46
|
+
</Modal>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
cardHeaderControls() {
|
|
51
|
+
return (
|
|
52
|
+
<Pressable onPress={this.tt.onModalClosePress} style={{marginLeft: "auto", padding: 5}}>
|
|
53
|
+
<FontAwesomeIcon name="remove" />
|
|
54
|
+
</Pressable>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
onModalClosePress = () => this.props.onRequestClose && this.props.onRequestClose()
|
|
59
|
+
}))
|
package/src/with-can-can.jsx
CHANGED
package/src/with-collection.jsx
CHANGED
package/src/with-model.jsx
CHANGED