@stubber/form-fields 1.4.0 → 1.4.2
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/fields/components/Code.svelte +1 -3
- package/dist/fields/definitions/index.d.ts +8 -8
- package/dist/fields/definitions/index.js +10 -11
- package/package.json +1 -1
- /package/dist/fields/definitions/{_all.json → all.json} +0 -0
- /package/dist/fields/definitions/{_placeholder.json → placeholder.json} +0 -0
- /package/dist/fields/definitions/{smart_text.json → smarttext.json} +0 -0
- /package/dist/fields/definitions/{_valid_fieldtype.json → validfieldtype.json} +0 -0
|
@@ -6,8 +6,6 @@ import { Label } from "@stubber/ui/label";
|
|
|
6
6
|
import { basicSetup } from "codemirror";
|
|
7
7
|
export let field;
|
|
8
8
|
let value = $field.data.base || "";
|
|
9
|
-
let params = $field.spec?.params || {};
|
|
10
|
-
let globals = params?.globals || {};
|
|
11
9
|
let editor_view;
|
|
12
10
|
$: state_key = $field.state?.state_key;
|
|
13
11
|
$: label = $field.spec?.title;
|
|
@@ -29,7 +27,7 @@ function globalCompletions(ctx) {
|
|
|
29
27
|
const text = m?.text ?? "";
|
|
30
28
|
const trailingDot = text.endsWith(".");
|
|
31
29
|
const parts = (trailingDot ? text.slice(0, -1) : text).split(".").filter(Boolean);
|
|
32
|
-
let container = globals;
|
|
30
|
+
let container = $field.spec?.params?.globals || {};
|
|
33
31
|
for (let i = 0; i < Math.max(0, parts.length - (trailingDot ? 0 : 1)); i++) {
|
|
34
32
|
container = container?.[parts[i]];
|
|
35
33
|
if (!container) break;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export namespace definitions {
|
|
2
|
-
export { _all };
|
|
3
|
-
export { _valid_fieldtype };
|
|
2
|
+
export { all as _all };
|
|
3
|
+
export { validfieldtype as _valid_fieldtype };
|
|
4
|
+
export { placeholder as _placeholder };
|
|
4
5
|
export { arraybuilder };
|
|
5
6
|
export { checkbox };
|
|
6
7
|
export { code };
|
|
@@ -36,18 +37,18 @@ export namespace definitions {
|
|
|
36
37
|
export { selectresource };
|
|
37
38
|
export { signature };
|
|
38
39
|
export { slider };
|
|
39
|
-
export { smart_text };
|
|
40
|
+
export { smarttext as smart_text };
|
|
40
41
|
export { telephone };
|
|
41
42
|
export { text };
|
|
42
43
|
export { voicenote };
|
|
43
|
-
export { _placeholder };
|
|
44
44
|
}
|
|
45
45
|
export const selectableFieldtypes: ({
|
|
46
46
|
label: string;
|
|
47
47
|
value: string;
|
|
48
48
|
} | null)[];
|
|
49
|
-
import
|
|
50
|
-
import
|
|
49
|
+
import all from "./all.json";
|
|
50
|
+
import validfieldtype from "./validfieldtype.json";
|
|
51
|
+
import placeholder from "./placeholder.json";
|
|
51
52
|
import arraybuilder from "./arraybuilder.json";
|
|
52
53
|
import checkbox from "./checkbox.json";
|
|
53
54
|
import code from "./code.json";
|
|
@@ -83,8 +84,7 @@ import select from "./select.json";
|
|
|
83
84
|
import selectresource from "./selectresource.json";
|
|
84
85
|
import signature from "./signature.json";
|
|
85
86
|
import slider from "./slider.json";
|
|
86
|
-
import
|
|
87
|
+
import smarttext from "./smarttext.json";
|
|
87
88
|
import telephone from "./telephone.json";
|
|
88
89
|
import text from "./text.json";
|
|
89
90
|
import voicenote from "./voicenote.json";
|
|
90
|
-
import _placeholder from "$lib/fields/definitions/_placeholder.json";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
//
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
// special non-field definitions
|
|
2
|
+
import all from "./all.json";
|
|
3
|
+
import validfieldtype from "./validfieldtype.json";
|
|
4
|
+
import placeholder from "./placeholder.json";
|
|
5
|
+
|
|
4
6
|
import arraybuilder from "./arraybuilder.json";
|
|
5
7
|
import checkbox from "./checkbox.json";
|
|
6
8
|
import code from "./code.json";
|
|
@@ -28,7 +30,6 @@ import objectbuilder from "./objectbuilder.json";
|
|
|
28
30
|
import qrcodescanner from "./qrcodescanner.json";
|
|
29
31
|
import radio from "./radio.json";
|
|
30
32
|
import renderfield from "./renderfield.json";
|
|
31
|
-
// import richtext from "./richtext.json";
|
|
32
33
|
import screenrecorder from "./screenrecorder.json";
|
|
33
34
|
import screenshot from "./screenshot.json";
|
|
34
35
|
import scrollandreaddisplay from "./scrollandreaddisplay.json";
|
|
@@ -37,15 +38,15 @@ import select from "./select.json";
|
|
|
37
38
|
import selectresource from "./selectresource.json";
|
|
38
39
|
import signature from "./signature.json";
|
|
39
40
|
import slider from "./slider.json";
|
|
40
|
-
import
|
|
41
|
+
import smarttext from "./smarttext.json";
|
|
41
42
|
import telephone from "./telephone.json";
|
|
42
43
|
import text from "./text.json";
|
|
43
44
|
import voicenote from "./voicenote.json";
|
|
44
|
-
import _placeholder from "$lib/fields/definitions/_placeholder.json";
|
|
45
45
|
|
|
46
46
|
export const definitions = {
|
|
47
|
-
_all,
|
|
48
|
-
_valid_fieldtype,
|
|
47
|
+
_all: all,
|
|
48
|
+
_valid_fieldtype: validfieldtype,
|
|
49
|
+
_placeholder: placeholder,
|
|
49
50
|
arraybuilder,
|
|
50
51
|
checkbox,
|
|
51
52
|
code,
|
|
@@ -73,7 +74,6 @@ export const definitions = {
|
|
|
73
74
|
qrcodescanner,
|
|
74
75
|
radio,
|
|
75
76
|
renderfield,
|
|
76
|
-
// richtext,
|
|
77
77
|
screenrecorder,
|
|
78
78
|
screenshot,
|
|
79
79
|
scrollandreaddisplay,
|
|
@@ -82,11 +82,10 @@ export const definitions = {
|
|
|
82
82
|
selectresource,
|
|
83
83
|
signature,
|
|
84
84
|
slider,
|
|
85
|
-
smart_text,
|
|
85
|
+
smart_text: smarttext,
|
|
86
86
|
telephone,
|
|
87
87
|
text,
|
|
88
88
|
voicenote,
|
|
89
|
-
_placeholder,
|
|
90
89
|
};
|
|
91
90
|
|
|
92
91
|
export const selectableFieldtypes = Object.entries(definitions)
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|