@kids-reporter/cms-core 0.4.32 → 0.4.34
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.
|
@@ -15,7 +15,6 @@ const richTextEditor = ({
|
|
|
15
15
|
if (config.isIndexed === 'unique') {
|
|
16
16
|
throw Error("isIndexed: 'unique' is not a supported option for field type textEditor");
|
|
17
17
|
}
|
|
18
|
-
const resolve = val => val === undefined ? defaultValue : val;
|
|
19
18
|
return (0, _types.jsonFieldTypePolyfilledForSQLite)(meta.provider, {
|
|
20
19
|
...config,
|
|
21
20
|
input: {
|
|
@@ -24,14 +23,13 @@ const richTextEditor = ({
|
|
|
24
23
|
type: _core.graphql.JSON
|
|
25
24
|
}),
|
|
26
25
|
resolve(val) {
|
|
27
|
-
return
|
|
26
|
+
return val === undefined ? defaultValue : val;
|
|
28
27
|
}
|
|
29
28
|
},
|
|
30
29
|
update: {
|
|
31
30
|
arg: _core.graphql.arg({
|
|
32
31
|
type: _core.graphql.JSON
|
|
33
|
-
})
|
|
34
|
-
resolve
|
|
32
|
+
})
|
|
35
33
|
}
|
|
36
34
|
},
|
|
37
35
|
output: _core.graphql.field({
|
package/package.json
CHANGED
|
@@ -27,9 +27,6 @@ export const richTextEditor =
|
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const resolve = (val: JSONValue | undefined) =>
|
|
31
|
-
val === undefined ? defaultValue : val
|
|
32
|
-
|
|
33
30
|
return jsonFieldTypePolyfilledForSQLite(
|
|
34
31
|
meta.provider,
|
|
35
32
|
{
|
|
@@ -38,10 +35,10 @@ export const richTextEditor =
|
|
|
38
35
|
create: {
|
|
39
36
|
arg: graphql.arg({ type: graphql.JSON }),
|
|
40
37
|
resolve(val) {
|
|
41
|
-
return
|
|
38
|
+
return val === undefined ? defaultValue : val
|
|
42
39
|
},
|
|
43
40
|
},
|
|
44
|
-
update: { arg: graphql.arg({ type: graphql.JSON })
|
|
41
|
+
update: { arg: graphql.arg({ type: graphql.JSON }) },
|
|
45
42
|
},
|
|
46
43
|
output: graphql.field({ type: graphql.JSON }),
|
|
47
44
|
views: `@kids-reporter/cms-core/lib/custom-fields/rich-text-editor/views/index`,
|