ywana-core8 0.0.793 → 0.0.795
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/dist/index.cjs +117 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +117 -46
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +117 -46
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain2/CollectionContext.js +16 -9
- package/src/domain2/DynamicForm.js +1 -1
package/package.json
CHANGED
@@ -48,6 +48,15 @@ export const CollectionContextProvider = (props) => {
|
|
48
48
|
}
|
49
49
|
return
|
50
50
|
}
|
51
|
+
|
52
|
+
async function reload() {
|
53
|
+
try {
|
54
|
+
const data = await load()
|
55
|
+
setAll(data)
|
56
|
+
} catch (error) {
|
57
|
+
console.log(error)
|
58
|
+
}
|
59
|
+
}
|
51
60
|
|
52
61
|
async function select(id) {
|
53
62
|
if (fetching) {
|
@@ -96,13 +105,6 @@ export const CollectionContextProvider = (props) => {
|
|
96
105
|
}
|
97
106
|
return
|
98
107
|
}
|
99
|
-
|
100
|
-
/*
|
101
|
-
async function reloadSelection() {
|
102
|
-
const result = await this.fetch(this.selected.id)
|
103
|
-
this.selected = result
|
104
|
-
}
|
105
|
-
|
106
108
|
|
107
109
|
async function update(form) {
|
108
110
|
try {
|
@@ -146,11 +148,10 @@ export const CollectionContextProvider = (props) => {
|
|
146
148
|
return
|
147
149
|
}
|
148
150
|
|
149
|
-
*/
|
150
|
-
|
151
151
|
const value = {
|
152
152
|
all,
|
153
153
|
load,
|
154
|
+
reload,
|
154
155
|
|
155
156
|
selected,
|
156
157
|
select,
|
@@ -167,6 +168,12 @@ export const CollectionContextProvider = (props) => {
|
|
167
168
|
queries,
|
168
169
|
setQueries,
|
169
170
|
|
171
|
+
create,
|
172
|
+
update,
|
173
|
+
patch,
|
174
|
+
updateProperty,
|
175
|
+
remove,
|
176
|
+
|
170
177
|
}
|
171
178
|
|
172
179
|
return (
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import { CheckBox, ColorField, DateRange, DropDown, TextField, TokenField } from '../html'
|
3
3
|
import { FORMATS } from './FORMATS'
|
4
|
-
import './DynamicForm.css'
|
5
4
|
import { TYPES } from './TYPES'
|
5
|
+
import './DynamicForm.css'
|
6
6
|
|
7
7
|
/**
|
8
8
|
* Dynamic Form
|