@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.
Files changed (74) hide show
  1. package/package.json +2 -2
  2. package/src/base-component.jsx +1 -4
  3. package/src/bootstrap/attribute-row/index.jsx +2 -1
  4. package/src/bootstrap/attribute-rows.jsx +1 -1
  5. package/src/bootstrap/card.jsx +2 -1
  6. package/src/bootstrap/input.jsx +1 -1
  7. package/src/bootstrap/paginate.jsx +2 -1
  8. package/src/bootstrap/sort-link.jsx +29 -44
  9. package/src/collection-loader.jsx +2 -1
  10. package/src/event-created.jsx +1 -1
  11. package/src/event-destroyed.jsx +1 -1
  12. package/src/event-emitter-listener.jsx +1 -1
  13. package/src/event-listener.jsx +1 -1
  14. package/src/event-updated.jsx +4 -3
  15. package/src/form.jsx +2 -1
  16. package/src/inputs/attachment.jsx +1 -1
  17. package/src/inputs/checkbox.jsx +1 -1
  18. package/src/inputs/checkboxes.jsx +1 -1
  19. package/src/inputs/input.jsx +2 -1
  20. package/src/inputs/money.jsx +2 -1
  21. package/src/inputs/select.jsx +1 -1
  22. package/src/link.jsx +12 -7
  23. package/src/modal.jsx +1 -1
  24. package/src/resize-observer.jsx +1 -1
  25. package/src/super-admin/edit-page/edit-attribute-checkbox.jsx +2 -1
  26. package/src/super-admin/edit-page/edit-attribute-content.jsx +1 -1
  27. package/src/super-admin/edit-page/edit-attribute-input.jsx +2 -1
  28. package/src/super-admin/edit-page/edit-attribute.jsx +1 -1
  29. package/src/super-admin/edit-page.jsx +1 -1
  30. package/src/super-admin/index-page.jsx +1 -1
  31. package/src/super-admin/index.jsx +2 -1
  32. package/src/super-admin/layout/header/index.jsx +2 -1
  33. package/src/super-admin/layout/index.jsx +2 -2
  34. package/src/super-admin/layout/menu/index.jsx +1 -1
  35. package/src/super-admin/layout/menu/menu-content.jsx +2 -1
  36. package/src/super-admin/layout/menu/menu-item/index.jsx +1 -1
  37. package/src/super-admin/layout/no-access.jsx +1 -1
  38. package/src/super-admin/model-class-table.jsx +2 -1
  39. package/src/super-admin/show-nav.jsx +1 -1
  40. package/src/super-admin/show-page/belongs-to-attribute-row.jsx +1 -1
  41. package/src/super-admin/show-page/index.jsx +2 -1
  42. package/src/super-admin/show-reflection-actions.jsx +2 -1
  43. package/src/super-admin/show-reflection-link.jsx +1 -1
  44. package/src/super-admin/show-reflection-page.jsx +1 -1
  45. package/src/table/components/column.jsx +1 -1
  46. package/src/table/components/flat-list.jsx +1 -1
  47. package/src/table/components/header.jsx +10 -2
  48. package/src/table/components/row.jsx +1 -1
  49. package/src/table/filters/attribute-element.jsx +1 -1
  50. package/src/table/filters/filter-form.jsx +2 -1
  51. package/src/table/filters/filter.jsx +1 -1
  52. package/src/table/filters/index.jsx +1 -1
  53. package/src/table/filters/load-search-modal.jsx +2 -1
  54. package/src/table/filters/reflection-element.jsx +1 -1
  55. package/src/table/filters/save-search-modal.jsx +1 -1
  56. package/src/table/filters/scope-element.jsx +1 -1
  57. package/src/table/header-column-content.jsx +54 -0
  58. package/src/table/header-column.jsx +3 -18
  59. package/src/table/header-select.jsx +72 -0
  60. package/src/table/model-column.jsx +3 -4
  61. package/src/table/model-row.jsx +2 -4
  62. package/src/table/settings/column-row.jsx +2 -1
  63. package/src/table/settings/download-action.jsx +1 -1
  64. package/src/table/settings/index.jsx +2 -1
  65. package/src/table/table.jsx +65 -41
  66. package/src/table/use-sorting.mjs +30 -0
  67. package/src/table/worker-plugins-check-all-checkbox.jsx +2 -1
  68. package/src/table/worker-plugins-checkbox.jsx +2 -1
  69. package/src/utils/card.jsx +49 -0
  70. package/src/utils/checkbox.jsx +1 -1
  71. package/src/utils/modal.jsx +59 -0
  72. package/src/with-can-can.jsx +1 -1
  73. package/src/with-collection.jsx +1 -1
  74. package/src/with-model.jsx +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaspernj/api-maker",
3
- "version": "1.0.434",
3
+ "version": "1.0.435",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "index.js",
@@ -37,7 +37,7 @@
37
37
  "qs": ">= 6.9.3",
38
38
  "react-native-vector-icons": "^10.2.0",
39
39
  "replaceall": ">= 0.1.6",
40
- "set-state-compare": "^1.0.49",
40
+ "set-state-compare": ">= 1.0.51",
41
41
  "spark-md5": "^3.0.2",
42
42
  "stacktrace-parser": "^0.1.10",
43
43
  "strftime": ">= 0.10.0",
@@ -1,8 +1,5 @@
1
- import fetchingObject from "fetching-object"
2
1
  import {ShapeComponent} from "set-state-compare/src/shape-component"
3
2
 
4
3
  export default class BaseComponent extends ShapeComponent {
5
- p = fetchingObject(() => this.props)
6
- s = fetchingObject(() => this.shape || this.state)
7
- tt = fetchingObject(this)
4
+ // Nothing yet.
8
5
  }
@@ -1,9 +1,10 @@
1
1
  import classNames from "classnames"
2
2
  import {digg} from "diggerize"
3
3
  import * as inflection from "inflection"
4
+ import memo from "set-state-compare/src/memo"
4
5
  import MoneyFormatter from "../../money-formatter"
5
6
  import PropTypes from "prop-types"
6
- import {memo, useMemo} from "react"
7
+ import {useMemo} from "react"
7
8
  import {shapeComponent, ShapeComponent} from "set-state-compare/src/shape-component.js"
8
9
  import strftime from "strftime"
9
10
  import useI18n from "i18n-on-steroids/src/use-i18n.mjs"
@@ -1,6 +1,6 @@
1
1
  import AttributeRow from "./attribute-row"
2
2
  import BaseComponent from "../base-component"
3
- import {memo} from "react"
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"
@@ -1,8 +1,9 @@
1
1
  import BaseComponent from "../base-component"
2
2
  import classNames from "classnames"
3
3
  import {digg, digs} from "diggerize"
4
+ import memo from "set-state-compare/src/memo"
4
5
  import PropTypes from "prop-types"
5
- import {memo, useRef} from "react"
6
+ import {useRef} from "react"
6
7
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
7
8
 
8
9
  export default memo(shapeComponent(class ApiMakerBootstrapCard extends BaseComponent {
@@ -4,7 +4,7 @@ import {Input} from "../inputs/input"
4
4
  import InvalidFeedback from "./invalid-feedback"
5
5
  import Money from "../inputs/money"
6
6
  import PropTypes from "prop-types"
7
- import {memo} from "react"
7
+ import memo from "set-state-compare/src/memo"
8
8
  import {shapeComponent, ShapeComponent} from "set-state-compare/src/shape-component.js"
9
9
 
10
10
  const ApiMakerBootstrapInput = memo(shapeComponent(class ApiMakerBootstrapInput extends ShapeComponent {
@@ -3,8 +3,9 @@ import instanceOfClassName from "../instance-of-class-name"
3
3
  import Link from "../link"
4
4
  import PropTypes from "prop-types"
5
5
  import propTypesExact from "prop-types-exact"
6
+ import memo from "set-state-compare/src/memo"
6
7
  import qs from "qs"
7
- import {memo, useMemo} from "react"
8
+ import {useMemo} from "react"
8
9
  import Text from "../utils/text"
9
10
  import Result from "../result"
10
11
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -3,10 +3,11 @@ import * as inflection from "inflection"
3
3
  import FontAwesomeIcon from "react-native-vector-icons/FontAwesome"
4
4
  import PropTypes from "prop-types"
5
5
  import qs from "qs"
6
- import {memo} from "react"
6
+ import memo from "set-state-compare/src/memo"
7
7
  import Text from "../utils/text"
8
8
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
9
9
  import urlEncode from "../url-encode.mjs"
10
+ import useSorting from "../table/use-sorting.mjs"
10
11
 
11
12
  import Link from "../link"
12
13
  import useQueryParams from "on-location-changed/src/use-query-params"
@@ -23,47 +24,23 @@ export default memo(shapeComponent(class ApiMakerBootstrapSortLink extends BaseC
23
24
  }
24
25
 
25
26
  setup() {
27
+ const {attribute, defaultParams, query} = this.props
28
+ const {qParams, searchKey, sortAttribute, sortMode} = useSorting({defaultParams, query})
29
+
30
+ this.setInstance({
31
+ isSortedByAttribute: sortAttribute == attribute,
32
+ qParams,
33
+ searchKey,
34
+ sortMode
35
+ })
36
+
26
37
  this.queryParams = useQueryParams()
27
38
  this.searchKey = this.p.query.queryArgs.searchKey || "q"
28
- this.qParams = this.calculateQParams()
29
39
  this.attribute = inflection.underscore(this.p.attribute)
30
- this.calculateIsSortedByAttribute()
31
- }
32
-
33
- calculateIsSortedByAttribute () {
34
- const {attribute} = this.tt
35
- const params = this.tt.qParams
36
-
37
- if (params.s == attribute) {
38
- this.isSortedByAttribute = true
39
- this.sortMode = "asc"
40
- } else if (params.s == `${attribute} asc`) {
41
- this.isSortedByAttribute = true
42
- this.sortMode = "asc"
43
- } else if (params.s == `${attribute} desc`) {
44
- this.isSortedByAttribute = true
45
- this.sortMode = "desc"
46
- } else {
47
- this.isSortedByAttribute = false
48
- this.sortMode = null
49
- }
50
- }
51
-
52
- calculateQParams() {
53
- const {defaultParams} = this.props
54
- const {queryParams, searchKey} = this.tt
55
-
56
- if (searchKey in queryParams) {
57
- return JSON.parse(queryParams[searchKey])
58
- } else if (defaultParams) {
59
- return {...defaultParams}
60
- }
61
-
62
- return {}
63
40
  }
64
41
 
65
42
  href () {
66
- const qParams = this.tt.qParams
43
+ const qParams = Object.assign({}, this.tt.qParams)
67
44
  const {attribute, queryParams, searchKey, sortMode} = this.tt
68
45
  const newQueryParams = {...queryParams}
69
46
 
@@ -80,17 +57,25 @@ export default memo(shapeComponent(class ApiMakerBootstrapSortLink extends BaseC
80
57
  render () {
81
58
  const {isSortedByAttribute, sortMode} = this.tt
82
59
  const LinkComponent = this.linkComponent()
83
- const {attribute, className, defaultParams, linkComponent, onChanged, query, textProps, title, ...restProps} = this.props
60
+ const {attribute, className, dataSet, defaultParams, linkComponent, onChanged, query, style, textProps, title, ...restProps} = this.props
61
+ const actualDataSet = Object.assign(
62
+ {
63
+ attribute,
64
+ class: className,
65
+ component: "api-maker/bootstrap/sort-link",
66
+ sortMode: this.tt.sortMode
67
+ },
68
+ dataSet
69
+ )
70
+ const actualStyle = Object.assign(
71
+ {display: "flex", flexDirection: "row", alignItems: "center"},
72
+ style
73
+ )
84
74
 
85
75
  return (
86
76
  <LinkComponent
87
- dataSet={{
88
- attribute,
89
- class: className,
90
- component: "api-maker--bootstrap--sort-link",
91
- sortMode: this.tt.sortMode
92
- }}
93
- style={{display: "flex", flexDirection: "row", alignItems: "center"}}
77
+ dataSet={actualDataSet}
78
+ style={actualStyle}
94
79
  to={this.href()}
95
80
  {...restProps}
96
81
  >
@@ -1,6 +1,7 @@
1
1
  import Collection from "./collection.mjs"
2
2
  import {digg} from "diggerize"
3
- import {memo, useMemo} from "react"
3
+ import memo from "set-state-compare/src/memo"
4
+ import {useMemo} from "react"
4
5
  import PropTypes from "prop-types"
5
6
  import PropTypesExact from "prop-types-exact"
6
7
  import useCollection from "./use-collection"
@@ -1,4 +1,4 @@
1
- import {memo} from "react"
1
+ import memo from "set-state-compare/src/memo"
2
2
  import useCreatedEvent from "./use-created-event.mjs"
3
3
 
4
4
  const ApiMakerEventCreated = memo((props) => {
@@ -1,4 +1,4 @@
1
- import {memo} from "react"
1
+ import memo from "set-state-compare/src/memo"
2
2
  import PropTypes from "prop-types"
3
3
  import propTypesExact from "prop-types-exact"
4
4
  import {shapeComponent, ShapeComponent} from "set-state-compare/src/shape-component.js"
@@ -1,4 +1,4 @@
1
- import {memo} from "react"
1
+ import memo from "set-state-compare/src/memo"
2
2
  import useEventEmitter from "./use-event-emitter.mjs"
3
3
 
4
4
  const ApiMakerEventEmitterListener = ({events, event, onCalled}) => {
@@ -1,6 +1,6 @@
1
+ import memo from "set-state-compare/src/memo"
1
2
  import PropTypes from "prop-types"
2
3
  import propTypesExact from "prop-types-exact"
3
- import {memo} from "react"
4
4
  import useEventListener from "./use-event-listener.mjs"
5
5
 
6
6
  const callEvent = (target, eventName, args = []) => {
@@ -1,10 +1,11 @@
1
+ import BaseComponent from "./base-component"
2
+ import memo from "set-state-compare/src/memo"
1
3
  import PropTypes from "prop-types"
2
4
  import propTypesExact from "prop-types-exact"
3
- import {memo} from "react"
4
- import {shapeComponent, ShapeComponent} from "set-state-compare/src/shape-component.js"
5
+ import {shapeComponent} from "set-state-compare/src/shape-component.js"
5
6
  import useUpdatedEvent from "./use-updated-event.mjs"
6
7
 
7
- export default memo(shapeComponent(class ApiMakerEventUpdated extends ShapeComponent {
8
+ export default memo(shapeComponent(class ApiMakerEventUpdated extends BaseComponent {
8
9
  static propTypes = propTypesExact({
9
10
  active: PropTypes.bool,
10
11
  debounce: PropTypes.oneOfType([
package/src/form.jsx CHANGED
@@ -1,6 +1,7 @@
1
- import {createContext, memo, useContext, useMemo} from "react"
1
+ import {createContext, useContext, useMemo} from "react"
2
2
  import BaseComponent from "./base-component"
3
3
  import FormDataObjectizer from "form-data-objectizer"
4
+ import memo from "set-state-compare/src/memo"
4
5
  import {Platform} from "react-native"
5
6
  import PropTypes from "prop-types"
6
7
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -1,7 +1,7 @@
1
1
  import BaseComponent from "../base-component"
2
2
  import {Input as ApiMakerInput} from "@kaspernj/api-maker/src/inputs/input"
3
3
  import {Checkbox} from "./checkbox"
4
- import {memo} from "react"
4
+ import memo from "set-state-compare/src/memo"
5
5
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
6
6
 
7
7
  export default memo(shapeComponent(class ApiMakerInputsAttachment extends BaseComponent {
@@ -4,7 +4,7 @@ import {digg, digs} from "diggerize"
4
4
  import EventUpdated from "../event-updated"
5
5
  import inputWrapper from "./input-wrapper"
6
6
  import PropTypes from "prop-types"
7
- import {memo} from "react"
7
+ import memo from "set-state-compare/src/memo"
8
8
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
9
9
  import {useForm} from "../form"
10
10
 
@@ -6,7 +6,7 @@ import * as inflection from "inflection"
6
6
  import InvalidFeedback from "../bootstrap/invalid-feedback"
7
7
  import PropTypes from "prop-types"
8
8
  import propTypesExact from "prop-types-exact"
9
- import {memo} from "react"
9
+ import memo from "set-state-compare/src/memo"
10
10
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
11
11
 
12
12
  const ApiMakerInputsCheckboxes = memo(shapeComponent(class ApiMakerInputsCheckboxes extends BaseComponent {
@@ -3,9 +3,10 @@ import BaseComponent from "../base-component"
3
3
  import {dig, digg, digs} from "diggerize"
4
4
  import EventUpdated from "../event-updated"
5
5
  import inputWrapper from "./input-wrapper"
6
+ import memo from "set-state-compare/src/memo"
6
7
  import Money from "./money"
7
8
  import PropTypes from "prop-types"
8
- import {memo, useMemo, useRef} from "react"
9
+ import {useMemo, useRef} from "react"
9
10
  import replaceall from "replaceall"
10
11
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
11
12
  import strftime from "strftime"
@@ -3,10 +3,11 @@ import Config from "../config.mjs"
3
3
  import {digg} from "diggerize"
4
4
  import idForComponent from "./id-for-component.mjs"
5
5
  import * as inflection from "inflection"
6
+ import memo from "set-state-compare/src/memo"
6
7
  import MoneyFormatter from "../money-formatter"
7
8
  import PropTypes from "prop-types"
8
9
  import PropTypesExact from "prop-types-exact"
9
- import {memo, useRef} from "react"
10
+ import {useRef} from "react"
10
11
  import {shapeComponent, ShapeComponent} from "set-state-compare/src/shape-component.js"
11
12
 
12
13
  export default memo(shapeComponent(class ApiMakerInputsMoney extends ShapeComponent {
@@ -1,7 +1,7 @@
1
1
  import BaseComponent from "../base-component"
2
2
  import inputWrapper from "./input-wrapper"
3
3
  import PropTypes from "prop-types"
4
- import {memo} from "react"
4
+ import memo from "set-state-compare/src/memo"
5
5
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
6
6
  import {useForm} from "../form"
7
7
 
package/src/link.jsx CHANGED
@@ -1,14 +1,19 @@
1
+ import {Platform, Pressable} from "react-native"
1
2
  import BaseComponent from "./base-component"
2
3
  import dataSetToAttributes from "./data-set-to-attributes.mjs"
3
- import {memo} from "react"
4
- import {Platform, Pressable} from "react-native"
4
+ import memo from "set-state-compare/src/memo"
5
+ import PropTypes from "prop-types"
5
6
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
6
7
 
7
- export default memo(shapeComponent(class Link extends BaseComponent {
8
+ export default memo(shapeComponent(class ApiMakerLink extends BaseComponent {
9
+ static propTypes = {
10
+ usePressable: PropTypes.bool
11
+ }
12
+
8
13
  render() {
9
- const {dataSet, to, onClick, onPress, ...restProps} = this.props
14
+ const {dataSet, to, onClick, onPress, usePressable, ...restProps} = this.props
10
15
 
11
- if (Platform.OS == "web") {
16
+ if (Platform.OS == "web" && !usePressable) {
12
17
  return (
13
18
  <a {...dataSetToAttributes(dataSet)} href={to} {...restProps} onClick={this.tt.onLinkClicked} />
14
19
  )
@@ -37,7 +42,7 @@ export default memo(shapeComponent(class Link extends BaseComponent {
37
42
  }
38
43
  }
39
44
 
40
- onPress() {
45
+ onPress = () => {
41
46
  const {onClick, onPress} = this.props
42
47
 
43
48
  if (onClick) {
@@ -51,7 +56,7 @@ export default memo(shapeComponent(class Link extends BaseComponent {
51
56
  this.redirect()
52
57
  }
53
58
 
54
- redirect() {
59
+ redirect = () => {
55
60
  const history = globalThis.apiMakerConfigGlobal?.history
56
61
 
57
62
  if (!history) throw new Error("History hasn't been set in the API maker configuration")
package/src/modal.jsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import BaseComponent from "./base-component"
2
- import {memo} from "react"
2
+ import memo from "set-state-compare/src/memo"
3
3
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
4
4
  import {Modal, Pressable, View} from "react-native"
5
5
 
@@ -1,4 +1,4 @@
1
- import {memo} from "react"
1
+ import memo from "set-state-compare/src/memo"
2
2
  import useResizeObserver from "./use-resize-observer.mjs"
3
3
 
4
4
  const ApiMakerResizeObserver = memo(({element, onResize}) => {
@@ -1,7 +1,8 @@
1
- import {memo, useMemo} from "react"
1
+ import {useMemo} from "react"
2
2
  import {StyleSheet, View} from "react-native"
3
3
  import Checkbox from "../../utils/checkbox"
4
4
  import BaseComponent from "../../base-component"
5
+ import memo from "set-state-compare/src/memo"
5
6
  import PropTypes from "prop-types"
6
7
  import propTypesExact from "prop-types-exact"
7
8
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -1,5 +1,5 @@
1
1
  import BaseComponent from "../../base-component"
2
- import {memo} from "react"
2
+ import memo from "set-state-compare/src/memo"
3
3
  import PropTypes from "prop-types"
4
4
  import propTypesExact from "prop-types-exact"
5
5
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -1,6 +1,7 @@
1
- import {memo, useMemo} from "react"
1
+ import {useMemo} from "react"
2
2
  import {TextInput, View} from "react-native"
3
3
  import BaseComponent from "../../base-component"
4
+ import memo from "set-state-compare/src/memo"
4
5
  import PropTypes from "prop-types"
5
6
  import propTypesExact from "prop-types-exact"
6
7
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -5,7 +5,7 @@ import EditAttributeContent from "./edit-attribute-content"
5
5
  import EditAttributeInput from "./edit-attribute-input"
6
6
  import * as inflection from "inflection"
7
7
  import Locales from "shared/locales"
8
- import {memo} from "react"
8
+ import memo from "set-state-compare/src/memo"
9
9
  import PropTypes from "prop-types"
10
10
  import propTypesExact from "prop-types-exact"
11
11
  import {View} from "react-native"
@@ -6,7 +6,7 @@ import EditAttribute from "./edit-page/edit-attribute"
6
6
  import {Form} from "../form"
7
7
  import * as inflection from "inflection"
8
8
  import Locales from "shared/locales"
9
- import {memo} from "react"
9
+ import memo from "set-state-compare/src/memo"
10
10
  import PropTypes from "prop-types"
11
11
  import propTypesExact from "prop-types-exact"
12
12
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -1,5 +1,5 @@
1
1
  import BaseComponent from "../base-component"
2
- import {memo} from "react"
2
+ import memo from "set-state-compare/src/memo"
3
3
  import ModelClassTable from "./model-class-table"
4
4
  import PropTypes from "prop-types"
5
5
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -6,7 +6,8 @@ import hasEditConfig from "./has-edit-config.js"
6
6
  import IndexPage from "./index-page"
7
7
  import Layout from "./layout"
8
8
  import Link from "../link"
9
- import {memo, useMemo} from "react"
9
+ import memo from "set-state-compare/src/memo"
10
+ import {useMemo} from "react"
10
11
  import * as modelsModule from "@kaspernj/api-maker/src/models.mjs.erb"
11
12
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
12
13
  import ShowPage from "./show-page"
@@ -1,7 +1,8 @@
1
1
  import "./style"
2
2
  import BaseComponent from "../../../base-component"
3
3
  import FontAwesomeIcon from "react-native-vector-icons/FontAwesome"
4
- import {memo, useRef} from "react"
4
+ import memo from "set-state-compare/src/memo"
5
+ import {useRef} from "react"
5
6
  import PropTypes from "prop-types"
6
7
  import PropTypesExact from "prop-types-exact"
7
8
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -1,13 +1,13 @@
1
1
  import "./style"
2
2
  import BaseComponent from "../../base-component"
3
- import classNames from "classnames"
4
3
  import CommandsPool from "../../commands-pool"
5
4
  import config from "super-admin/config"
6
5
  import Header from "./header"
6
+ import memo from "set-state-compare/src/memo"
7
7
  import Menu from "./menu"
8
8
  import PropTypes from "prop-types"
9
9
  import PropTypesExact from "prop-types-exact"
10
- import {memo, useMemo} from "react"
10
+ import {useMemo} from "react"
11
11
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
12
12
  import useCurrentUser from "../../use-current-user"
13
13
  import useI18n from "i18n-on-steroids/src/use-i18n.mjs"
@@ -1,6 +1,6 @@
1
1
  import "./style"
2
2
  import BaseComponent from "../../../base-component"
3
- import {memo} from "react"
3
+ import memo from "set-state-compare/src/memo"
4
4
  import Link from "../../../link"
5
5
  import MenuContent from "./menu-content"
6
6
  import MenuItem from "./menu-item"
@@ -1,6 +1,7 @@
1
1
  import BaseComponent from "../../../base-component"
2
2
  import {digg} from "diggerize"
3
- import {memo, useMemo} from "react"
3
+ import memo from "set-state-compare/src/memo"
4
+ import {useMemo} from "react"
4
5
  import MenuItem from "./menu-item"
5
6
  import models from "../../models"
6
7
  import Params from "../../../params"
@@ -2,7 +2,7 @@ import "./style"
2
2
  import BaseComponent from "../../../../base-component"
3
3
  import classNames from "classnames"
4
4
  import Link from "../../../../link"
5
- import {memo} from "react"
5
+ import memo from "set-state-compare/src/memo"
6
6
  import PropTypes from "prop-types"
7
7
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
8
8
  import Text from "../../../../utils/text"
@@ -1,5 +1,5 @@
1
1
  import BaseComponent from "../../base-component"
2
- import {memo} from "react"
2
+ import memo from "set-state-compare/src/memo"
3
3
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
4
4
  import useCurrentUser from "../../use-current-user"
5
5
  import useI18n from "i18n-on-steroids/src/use-i18n.mjs"
@@ -3,9 +3,10 @@ import ConfigReader from "./config-reader.jsx"
3
3
  import {digg} from "diggerize"
4
4
  import hasEditConfig from "./has-edit-config.js"
5
5
  import * as inflection from "inflection"
6
+ import memo from "set-state-compare/src/memo"
6
7
  import Params from "../params"
7
8
  import PropTypes from "prop-types"
8
- import {memo, useMemo} from "react"
9
+ import {useMemo} from "react"
9
10
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
10
11
  import Table from "../table/table"
11
12
  import useCurrentUser from "../use-current-user"
@@ -2,7 +2,7 @@ import BaseComponent from "../base-component"
2
2
  import Link from "../link"
3
3
  import PropTypes from "prop-types"
4
4
  import PropTypesExact from "prop-types-exact"
5
- import {memo} from "react"
5
+ import memo from "set-state-compare/src/memo"
6
6
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
7
7
  import ShowReflectionLink from "./show-reflection-link"
8
8
  import Text from "../utils/text"
@@ -2,7 +2,7 @@ import AttributeRow from "../../bootstrap/attribute-row"
2
2
  import BaseComponent from "../../base-component"
3
3
  import * as inflection from "inflection"
4
4
  import Link from "../../link"
5
- import {memo} from "react"
5
+ import memo from "set-state-compare/src/memo"
6
6
  import Params from "../../params"
7
7
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
8
8
  import Text from "../../utils/text"
@@ -3,9 +3,10 @@ import BaseComponent from "../../base-component"
3
3
  import BelongsToAttributeRow from "./belongs-to-attribute-row"
4
4
  import ConfigReader from "../config-reader.jsx"
5
5
  import {digg} from "diggerize"
6
+ import memo from "set-state-compare/src/memo"
6
7
  import * as inflection from "inflection"
7
8
  import PropTypes from "prop-types"
8
- import {memo, useMemo} from "react"
9
+ import {useMemo} from "react"
9
10
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
10
11
  import ShowNav from "../show-nav"
11
12
  import useModel from "../../use-model"
@@ -1,6 +1,7 @@
1
1
  import BaseComponent from "../base-component"
2
2
  import {digg} from "diggerize"
3
- import {memo, useMemo} from "react"
3
+ import memo from "set-state-compare/src/memo"
4
+ import {useMemo} from "react"
4
5
  import PropTypes from "prop-types"
5
6
  import propTypesExact from "prop-types-exact"
6
7
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
@@ -1,7 +1,7 @@
1
1
  import BaseComponent from "../base-component"
2
2
  import {digg} from "diggerize"
3
3
  import Link from "../link"
4
- import {memo} from "react"
4
+ import memo from "set-state-compare/src/memo"
5
5
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
6
6
  import Text from "../utils/text"
7
7
  import {useMemo} from "react"
@@ -2,7 +2,7 @@ import BaseComponent from "../base-component"
2
2
  import {digg} from "diggerize"
3
3
  import PropTypes from "prop-types"
4
4
  import propTypesExact from "prop-types-exact"
5
- import {memo} from "react"
5
+ import memo from "set-state-compare/src/memo"
6
6
  import ModelClassTable from "./model-class-table"
7
7
  import {shapeComponent} from "set-state-compare/src/shape-component.js"
8
8
  import ShowNav from "./show-nav"
@@ -1,5 +1,5 @@
1
1
  import BaseComponent from "../../base-component"
2
- import {memo} from "react"
2
+ import memo from "set-state-compare/src/memo"
3
3
  import {shapeComponent} from "set-state-compare/src/shape-component"
4
4
  import {View} from "react-native"
5
5
 
@@ -1,6 +1,6 @@
1
1
  import BaseComponent from "../../base-component"
2
2
  import {FlatList} from "react-native"
3
- import {memo} from "react"
3
+ import memo from "set-state-compare/src/memo"
4
4
  import {shapeComponent} from "set-state-compare/src/shape-component"
5
5
 
6
6
  export default memo(shapeComponent(class SharedTagble extends BaseComponent {