@kaspernj/api-maker 1.0.287 → 1.0.288
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
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
18
|
"name": "@kaspernj/api-maker",
|
|
19
|
-
"version": "1.0.
|
|
19
|
+
"version": "1.0.288",
|
|
20
20
|
"type": "module",
|
|
21
21
|
"description": "",
|
|
22
22
|
"main": "index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@rails/actioncable": ">= 6.1.0",
|
|
40
40
|
"clone-deep": ">= 4.0.1",
|
|
41
|
-
"debounce": ">=
|
|
41
|
+
"debounce": ">= 2.0.0",
|
|
42
42
|
"diggerize": ">= 1.0.5",
|
|
43
43
|
"epic-locks": ">= 1.0.2",
|
|
44
44
|
"form-data-objectizer": ">= 1.0.0",
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
"eslint-plugin-react": "^7.23.2",
|
|
77
77
|
"i18n-on-steroids": "^1.0.7",
|
|
78
78
|
"jest": "^29.0.1",
|
|
79
|
-
"jsdom": "^
|
|
79
|
+
"jsdom": "^23.0.0"
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -2,7 +2,7 @@ import Card from "./card"
|
|
|
2
2
|
import classNames from "classnames"
|
|
3
3
|
import Collection from "../collection"
|
|
4
4
|
import CollectionLoader from "../collection-loader"
|
|
5
|
-
import
|
|
5
|
+
import debounce from "debounce"
|
|
6
6
|
import {digg, digs} from "diggerize"
|
|
7
7
|
import instanceOfClassName from "../instance-of-class-name"
|
|
8
8
|
import ModelRow from "./live-table/model-row"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Collection from "./collection"
|
|
2
|
-
import
|
|
2
|
+
import debounce from "debounce"
|
|
3
3
|
import {digg, digs} from "diggerize"
|
|
4
4
|
import EventCreated from "./event-created"
|
|
5
5
|
import EventDestroyed from "./event-destroyed"
|
|
@@ -87,6 +87,8 @@ class CollectionLoader extends React.PureComponent {
|
|
|
87
87
|
changed = true
|
|
88
88
|
} else if (prevProps.queryParams[querySName] != this.props.queryParams[querySName]) {
|
|
89
89
|
changed = true
|
|
90
|
+
} else if (prevProps.collection != this.props.collection) {
|
|
91
|
+
changed = true
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
if (changed) {
|
package/src/devise.mjs
CHANGED
|
@@ -12,8 +12,9 @@ export default class ApiMakerDevise {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
static current () {
|
|
15
|
-
if (!globalThis.currentApiMakerDevise)
|
|
16
|
-
|
|
15
|
+
if (!globalThis.currentApiMakerDevise) {
|
|
16
|
+
globalThis.currentApiMakerDevise = new ApiMakerDevise()
|
|
17
|
+
}
|
|
17
18
|
|
|
18
19
|
return globalThis.currentApiMakerDevise
|
|
19
20
|
}
|
|
@@ -151,7 +151,7 @@ const inputWrapper = (WrapperComponentClass, wrapperOptions = {}) => {
|
|
|
151
151
|
label() {
|
|
152
152
|
if ("label" in this.props) {
|
|
153
153
|
return this.props.label
|
|
154
|
-
} else if (this.props.model) {
|
|
154
|
+
} else if (this.props.attribute && this.props.model) {
|
|
155
155
|
return this.props.model.modelClass().humanAttributeName(this.props.attribute)
|
|
156
156
|
}
|
|
157
157
|
}
|
package/src/table/table.jsx
CHANGED
|
@@ -4,7 +4,7 @@ import classNames from "classnames"
|
|
|
4
4
|
import Collection from "../collection"
|
|
5
5
|
import CollectionLoader from "../collection-loader"
|
|
6
6
|
import columnVisible from "./column-visible.mjs"
|
|
7
|
-
import
|
|
7
|
+
import debounce from "debounce"
|
|
8
8
|
import {digg, digs} from "diggerize"
|
|
9
9
|
import Filters from "./filters"
|
|
10
10
|
import * as inflection from "inflection"
|
package/src/with-collection.jsx
CHANGED