@kaspernj/api-maker 1.0.462 → 1.0.464
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/build/bootstrap/sort-link.js +2 -2
- package/build/cable-subscription-pool.js +3 -3
- package/build/channels-consumer.js +7 -2
- package/build/collection.js +2 -1
- package/build/config.js +7 -1
- package/build/devise.js +9 -6
- package/build/event-emitter-listener.js +15 -0
- package/build/history-expo.js +24 -0
- package/build/history-react-native.js +20 -0
- package/build/router/route.js +2 -2
- package/build/router/switch.js +2 -2
- package/build/router.js +3 -4
- package/build/session-status-updater.js +11 -3
- package/build/super-admin/edit-page.js +2 -2
- package/build/super-admin/index.js +2 -2
- package/build/super-admin/layout/index.js +6 -5
- package/build/super-admin/show-nav.js +2 -2
- package/build/super-admin/show-reflection-page.js +2 -2
- package/build/table/filters/index.js +2 -2
- package/build/table/table.js +2 -2
- package/build/table/use-sorting.js +2 -2
- package/build/use-collection.js +2 -2
- package/build/use-current-user.js +6 -2
- package/build/use-model.js +2 -2
- package/package.json +3 -2
- package/src/bootstrap/sort-link.jsx +1 -1
- package/src/cable-subscription-pool.js +2 -2
- package/src/channels-consumer.js +7 -1
- package/src/collection.js +1 -0
- package/src/config.js +2 -0
- package/src/devise.js +7 -7
- package/src/event-emitter-listener.jsx +13 -0
- package/src/history-expo.js +25 -0
- package/src/history-react-native.js +25 -0
- package/src/models.js.erb +2 -1
- package/src/router/route.jsx +1 -1
- package/src/router/switch.jsx +1 -1
- package/src/router.jsx +2 -3
- package/src/session-status-updater.js +12 -2
- package/src/super-admin/edit-page.jsx +1 -1
- package/src/super-admin/index.jsx +1 -1
- package/src/super-admin/layout/index.jsx +5 -4
- package/src/super-admin/show-nav.jsx +1 -1
- package/src/super-admin/show-reflection-page.jsx +1 -1
- package/src/table/filters/index.jsx +1 -1
- package/src/table/table.jsx +1 -1
- package/src/table/use-sorting.js +1 -1
- package/src/use-collection.js +1 -1
- package/src/use-current-user.js +5 -2
- package/src/use-model.js +1 -1
- package/build/historyExpo.js +0 -10
- package/link.sh +0 -8
- package/src/historyExpo.js +0 -9
package/src/table/use-sorting.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {camelize} from "inflection"
|
|
2
|
-
import useQueryParams from "on-location-changed/
|
|
2
|
+
import useQueryParams from "on-location-changed/build/use-query-params"
|
|
3
3
|
|
|
4
4
|
const calculateQParams = (defaultParams, queryParams, searchKey) => {
|
|
5
5
|
if (searchKey in queryParams) {
|
package/src/use-collection.js
CHANGED
|
@@ -5,7 +5,7 @@ import ModelEvents from "./model-events"
|
|
|
5
5
|
import {useCallback, useLayoutEffect, useMemo} from "react"
|
|
6
6
|
import useCreatedEvent from "./use-created-event"
|
|
7
7
|
import useShape from "set-state-compare/src/use-shape"
|
|
8
|
-
import useQueryParams from "on-location-changed/
|
|
8
|
+
import useQueryParams from "on-location-changed/build/use-query-params"
|
|
9
9
|
|
|
10
10
|
const useCollection = (props, cacheKeys = []) => {
|
|
11
11
|
const {
|
package/src/use-current-user.js
CHANGED
|
@@ -2,6 +2,7 @@ import {useCallback, useMemo} from "react"
|
|
|
2
2
|
import {camelize} from "inflection"
|
|
3
3
|
import Devise from "./devise"
|
|
4
4
|
import {digg} from "diggerize"
|
|
5
|
+
import * as inflection from "inflection"
|
|
5
6
|
import Logger from "./logger"
|
|
6
7
|
import Services from "./services"
|
|
7
8
|
import useEventEmitter from "./use-event-emitter"
|
|
@@ -21,11 +22,13 @@ const useCurrentUser = (args) => {
|
|
|
21
22
|
|
|
22
23
|
const loadCurrentUserFromRequest = useCallback(async () => {
|
|
23
24
|
const {scope, scopeName} = s.m
|
|
25
|
+
const getArgsMethodName = `get${inflection.camelize(scope)}Args`
|
|
26
|
+
const args = Devise[getArgsMethodName]()
|
|
24
27
|
|
|
25
28
|
logger.debug(() => `Loading ${scope} with request`)
|
|
26
29
|
|
|
27
|
-
const result = await Services.current().sendRequest("Devise::Current", {scope})
|
|
28
|
-
const current = digg(result, "current")
|
|
30
|
+
const result = await Services.current().sendRequest("Devise::Current", {query: args.query, scope})
|
|
31
|
+
const current = digg(result, "current")[0]
|
|
29
32
|
|
|
30
33
|
if (!(scopeName in s.setStates)) throw new Error(`'${scopeName}' not found in setStates`)
|
|
31
34
|
if (current) Devise.updateSession(current)
|
package/src/use-model.js
CHANGED
|
@@ -2,7 +2,7 @@ import {useCallback, useLayoutEffect, useMemo} from "react"
|
|
|
2
2
|
import Devise from "./devise"
|
|
3
3
|
import * as inflection from "inflection"
|
|
4
4
|
import ModelEvents from "./model-events"
|
|
5
|
-
import useQueryParams from "on-location-changed/
|
|
5
|
+
import useQueryParams from "on-location-changed/build/use-query-params"
|
|
6
6
|
import useShape from "set-state-compare/src/use-shape"
|
|
7
7
|
|
|
8
8
|
const useModel = (modelClassArg, argsArg = {}) => {
|
package/build/historyExpo.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
class HistoryNative {
|
|
2
|
-
push(...args) {
|
|
3
|
-
throw new Error("Stub: Push from history.nativejs", {
|
|
4
|
-
args
|
|
5
|
-
});
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
const historyNative = new HistoryNative();
|
|
9
|
-
export default historyNative;
|
|
10
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJIaXN0b3J5TmF0aXZlIiwicHVzaCIsImFyZ3MiLCJFcnJvciIsImhpc3RvcnlOYXRpdmUiXSwic291cmNlcyI6WyIuLi9zcmMvaGlzdG9yeUV4cG8uanMiXSwic291cmNlc0NvbnRlbnQiOlsiY2xhc3MgSGlzdG9yeU5hdGl2ZSB7XG4gIHB1c2goLi4uYXJncykge1xuICAgIHRocm93IG5ldyBFcnJvcihcIlN0dWI6IFB1c2ggZnJvbSBoaXN0b3J5Lm5hdGl2ZWpzXCIsIHthcmdzfSlcbiAgfVxufVxuXG5jb25zdCBoaXN0b3J5TmF0aXZlID0gbmV3IEhpc3RvcnlOYXRpdmUoKVxuXG5leHBvcnQgZGVmYXVsdCBoaXN0b3J5TmF0aXZlXG4iXSwibWFwcGluZ3MiOiJBQUFBLE1BQU1BLGFBQWEsQ0FBQztFQUNsQkMsSUFBSUEsQ0FBQyxHQUFHQyxJQUFJLEVBQUU7SUFDWixNQUFNLElBQUlDLEtBQUssQ0FBQyxrQ0FBa0MsRUFBRTtNQUFDRDtJQUFJLENBQUMsQ0FBQztFQUM3RDtBQUNGO0FBRUEsTUFBTUUsYUFBYSxHQUFHLElBQUlKLGFBQWEsQ0FBQyxDQUFDO0FBRXpDLGVBQWVJLGFBQWEiLCJpZ25vcmVMaXN0IjpbXX0=
|
package/link.sh
DELETED