@bonsae/nrg 0.13.1 → 0.15.0

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.
@@ -0,0 +1,117 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ value: {
3
+ type: (StringConstructor | ArrayConstructor)[];
4
+ default: () => string;
5
+ };
6
+ options: {
7
+ type: PropType<Array<{
8
+ value: string;
9
+ label: string;
10
+ }>>;
11
+ required: true;
12
+ validator: (value: Array<{
13
+ value: string;
14
+ label: string;
15
+ }>) => boolean;
16
+ };
17
+ multiple: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ label: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ icon: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ required: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ error: {
34
+ type: StringConstructor;
35
+ default: string;
36
+ };
37
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
+ value: {
39
+ type: (StringConstructor | ArrayConstructor)[];
40
+ default: () => string;
41
+ };
42
+ options: {
43
+ type: PropType<Array<{
44
+ value: string;
45
+ label: string;
46
+ }>>;
47
+ required: true;
48
+ validator: (value: Array<{
49
+ value: string;
50
+ label: string;
51
+ }>) => boolean;
52
+ };
53
+ multiple: {
54
+ type: BooleanConstructor;
55
+ default: boolean;
56
+ };
57
+ label: {
58
+ type: StringConstructor;
59
+ default: string;
60
+ };
61
+ icon: {
62
+ type: StringConstructor;
63
+ default: string;
64
+ };
65
+ required: {
66
+ type: BooleanConstructor;
67
+ default: boolean;
68
+ };
69
+ error: {
70
+ type: StringConstructor;
71
+ default: string;
72
+ };
73
+ }>> & Readonly<{
74
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
75
+ }>, {
76
+ label: string;
77
+ icon: string;
78
+ required: boolean;
79
+ value: string | unknown[];
80
+ error: string;
81
+ multiple: boolean;
82
+ }, {}, {
83
+ NodeRedInputLabel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
84
+ label: {
85
+ type: StringConstructor;
86
+ default: string;
87
+ };
88
+ icon: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ required: {
93
+ type: BooleanConstructor;
94
+ default: boolean;
95
+ };
96
+ }>, {}, {}, {
97
+ iconClass(): string;
98
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
99
+ label: {
100
+ type: StringConstructor;
101
+ default: string;
102
+ };
103
+ icon: {
104
+ type: StringConstructor;
105
+ default: string;
106
+ };
107
+ required: {
108
+ type: BooleanConstructor;
109
+ default: boolean;
110
+ };
111
+ }>> & Readonly<{}>, {
112
+ label: string;
113
+ icon: string;
114
+ required: boolean;
115
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
116
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
117
+ export default _default;
@@ -0,0 +1,36 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ modelValue: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ label: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ icon: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ }>, {}, {}, {
15
+ iconClass(): string;
16
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
+ modelValue: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ label: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ icon: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ }>> & Readonly<{
30
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
31
+ }>, {
32
+ label: string;
33
+ icon: string;
34
+ modelValue: boolean;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
36
+ export default _default;
@@ -0,0 +1,106 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
2
+ value: {
3
+ type: ObjectConstructor;
4
+ required: true;
5
+ validator: (obj: {
6
+ value: string;
7
+ type: string;
8
+ }) => boolean;
9
+ };
10
+ types: {
11
+ type: PropType<(NodeRED.DefaultTypedInputType | NodeRED.TypedInputTypeDefinition)[]>;
12
+ default: () => readonly ["msg", "flow", "global", "str", "num", "bool", "json", "bin", "re", "jsonata", "date", "env", "node", "cred"];
13
+ };
14
+ label: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ icon: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ required: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ error: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ }>, {}, {}, {
31
+ isProvidedValueTypeValid(): boolean;
32
+ }, {
33
+ onChange(): void;
34
+ }, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
35
+ value: {
36
+ type: ObjectConstructor;
37
+ required: true;
38
+ validator: (obj: {
39
+ value: string;
40
+ type: string;
41
+ }) => boolean;
42
+ };
43
+ types: {
44
+ type: PropType<(NodeRED.DefaultTypedInputType | NodeRED.TypedInputTypeDefinition)[]>;
45
+ default: () => readonly ["msg", "flow", "global", "str", "num", "bool", "json", "bin", "re", "jsonata", "date", "env", "node", "cred"];
46
+ };
47
+ label: {
48
+ type: StringConstructor;
49
+ default: string;
50
+ };
51
+ icon: {
52
+ type: StringConstructor;
53
+ default: string;
54
+ };
55
+ required: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ error: {
60
+ type: StringConstructor;
61
+ default: string;
62
+ };
63
+ }>> & Readonly<{
64
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
65
+ }>, {
66
+ label: string;
67
+ icon: string;
68
+ required: boolean;
69
+ error: string;
70
+ types: ("msg" | "flow" | "global" | "str" | "num" | "bool" | "json" | "bin" | "re" | "jsonata" | "date" | "env" | "node" | "cred" | NodeRED.TypedInputTypeDefinition)[];
71
+ }, {}, {
72
+ NodeRedInputLabel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
73
+ label: {
74
+ type: StringConstructor;
75
+ default: string;
76
+ };
77
+ icon: {
78
+ type: StringConstructor;
79
+ default: string;
80
+ };
81
+ required: {
82
+ type: BooleanConstructor;
83
+ default: boolean;
84
+ };
85
+ }>, {}, {}, {
86
+ iconClass(): string;
87
+ }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
88
+ label: {
89
+ type: StringConstructor;
90
+ default: string;
91
+ };
92
+ icon: {
93
+ type: StringConstructor;
94
+ default: string;
95
+ };
96
+ required: {
97
+ type: BooleanConstructor;
98
+ default: boolean;
99
+ };
100
+ }>> & Readonly<{}>, {
101
+ label: string;
102
+ icon: string;
103
+ required: boolean;
104
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
105
+ }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
106
+ export default _default;
@@ -176,7 +176,7 @@ declare namespace NodeRED {
176
176
  (typeof import("../constants").TYPED_INPUT_TYPES)[number];
177
177
 
178
178
  interface TypedInputTypeDefinition {
179
- value: string;
179
+ value?: string;
180
180
  label?: string;
181
181
  icon?: string;
182
182
  hasValue?: boolean;
@@ -0,0 +1,11 @@
1
+ export interface NrgSchemaExtensions {
2
+ format?: "node-id" | "flow-id" | "topic-path" | (string & {});
3
+ exportable?: boolean;
4
+ "x-nrg-node-type"?: string;
5
+ "x-nrg-form"?: {
6
+ icon?: string;
7
+ typedInputTypes?: string[];
8
+ editorLanguage?: string;
9
+ toggle?: boolean;
10
+ };
11
+ }
@@ -0,0 +1,10 @@
1
+ // This import makes the file a module, which is required for
2
+ // TypeScript module augmentation (declare module) to work correctly.
3
+ // Without it, the file is treated as a global script and the
4
+ // augmentation silently fails.
5
+ import type { NrgSchemaExtensions } from "./schema-options";
6
+
7
+ declare module "@sinclair/typebox" {
8
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
9
+ interface SchemaOptions extends NrgSchemaExtensions {}
10
+ }