@uncharted.software/jsonforms-primevue 1.3.0 → 1.3.4
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/README.md +5 -1
- package/dist/jsonforms-primevue.cjs.map +1 -1
- package/dist/jsonforms-primevue.es.js.map +1 -1
- package/dist/types/components/blocks/Else.vue.d.ts +17 -0
- package/dist/types/components/blocks/ElseIf.vue.d.ts +17 -0
- package/dist/types/components/blocks/For.vue.d.ts +17 -0
- package/dist/types/components/blocks/If.vue.d.ts +17 -0
- package/dist/types/components/blocks/index.d.ts +4 -0
- package/dist/types/controls/ArrayControlRenderer.vue.d.ts +74 -0
- package/dist/types/controls/ArrayItemRenderer.vue.d.ts +81 -0
- package/dist/types/controls/BooleanControlRenderer.vue.d.ts +74 -0
- package/dist/types/controls/ControlWrapper.vue.d.ts +111 -0
- package/dist/types/controls/DateTimeControlRenderer.vue.d.ts +74 -0
- package/dist/types/controls/DurationControlRenderer.vue.d.ts +74 -0
- package/dist/types/controls/EnumControlRenderer.vue.d.ts +74 -0
- package/dist/types/controls/IntegerControlRenderer.vue.d.ts +74 -0
- package/dist/types/controls/NumberControlRenderer.vue.d.ts +74 -0
- package/dist/types/controls/ObjectControlRenderer.vue.d.ts +74 -0
- package/dist/types/controls/StringControlRenderer.vue.d.ts +74 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/layouts/GroupLayoutRenderer.vue.d.ts +74 -0
- package/dist/types/layouts/HorizontalLayoutRenderer.vue.d.ts +74 -0
- package/dist/types/layouts/LabelRenderer.vue.d.ts +74 -0
- package/dist/types/layouts/LayoutElementsDispatcher.vue.d.ts +74 -0
- package/dist/types/layouts/VerticalLayoutRenderer.vue.d.ts +74 -0
- package/dist/types/util/composition.d.ts +40 -0
- package/dist/types/util/dateTime.d.ts +4 -0
- package/dist/types/util/enumOptions.d.ts +12 -0
- package/dist/types/util/options.d.ts +70 -0
- package/package.json +10 -8
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Layout } from '@jsonforms/core';
|
|
2
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
3
|
+
schema: {
|
|
4
|
+
required: true;
|
|
5
|
+
type: import('vue').PropType<import('@jsonforms/core').JsonSchema>;
|
|
6
|
+
};
|
|
7
|
+
uischema: {
|
|
8
|
+
required: true;
|
|
9
|
+
type: import('vue').PropType<Layout>;
|
|
10
|
+
};
|
|
11
|
+
path: {
|
|
12
|
+
required: true;
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
};
|
|
15
|
+
enabled: {
|
|
16
|
+
required: false;
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: undefined;
|
|
19
|
+
};
|
|
20
|
+
renderers: {
|
|
21
|
+
required: boolean;
|
|
22
|
+
type: import('vue').PropType<import('@jsonforms/core').JsonFormsRendererRegistryEntry[]>;
|
|
23
|
+
default: undefined;
|
|
24
|
+
};
|
|
25
|
+
cells: {
|
|
26
|
+
required: boolean;
|
|
27
|
+
type: import('vue').PropType<import('@jsonforms/core').JsonFormsCellRendererRegistryEntry[]>;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
config: {
|
|
31
|
+
required: boolean;
|
|
32
|
+
type: ObjectConstructor;
|
|
33
|
+
default: undefined;
|
|
34
|
+
};
|
|
35
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
36
|
+
schema: {
|
|
37
|
+
required: true;
|
|
38
|
+
type: import('vue').PropType<import('@jsonforms/core').JsonSchema>;
|
|
39
|
+
};
|
|
40
|
+
uischema: {
|
|
41
|
+
required: true;
|
|
42
|
+
type: import('vue').PropType<Layout>;
|
|
43
|
+
};
|
|
44
|
+
path: {
|
|
45
|
+
required: true;
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
};
|
|
48
|
+
enabled: {
|
|
49
|
+
required: false;
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: undefined;
|
|
52
|
+
};
|
|
53
|
+
renderers: {
|
|
54
|
+
required: boolean;
|
|
55
|
+
type: import('vue').PropType<import('@jsonforms/core').JsonFormsRendererRegistryEntry[]>;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
cells: {
|
|
59
|
+
required: boolean;
|
|
60
|
+
type: import('vue').PropType<import('@jsonforms/core').JsonFormsCellRendererRegistryEntry[]>;
|
|
61
|
+
default: undefined;
|
|
62
|
+
};
|
|
63
|
+
config: {
|
|
64
|
+
required: boolean;
|
|
65
|
+
type: ObjectConstructor;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
}>> & Readonly<{}>, {
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
renderers: import('@jsonforms/core').JsonFormsRendererRegistryEntry[];
|
|
71
|
+
cells: import('@jsonforms/core').JsonFormsCellRendererRegistryEntry[];
|
|
72
|
+
config: Record<string, any>;
|
|
73
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
74
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { UISchemaElement } from '@jsonforms/core';
|
|
3
|
+
/**
|
|
4
|
+
* Adds isFocused, appliedOptions and onChange (TODO: styles)
|
|
5
|
+
*/
|
|
6
|
+
export declare const useControlCommon: <I extends {
|
|
7
|
+
control: any;
|
|
8
|
+
handleChange: any;
|
|
9
|
+
}>(input: I, adaptTarget?: (target: any) => any) => I & {
|
|
10
|
+
isFocused: import('vue').Ref<boolean, boolean>;
|
|
11
|
+
appliedOptions: ComputedRef<any>;
|
|
12
|
+
controlWrapper: ComputedRef<{
|
|
13
|
+
id: any;
|
|
14
|
+
description: any;
|
|
15
|
+
errors: any;
|
|
16
|
+
label: any;
|
|
17
|
+
visible: any;
|
|
18
|
+
required: any;
|
|
19
|
+
}>;
|
|
20
|
+
onChange: (value: any) => void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Adds appliedOptions (TODO: styles)
|
|
24
|
+
*/
|
|
25
|
+
export declare const useLayoutCommon: <T extends {
|
|
26
|
+
config: any;
|
|
27
|
+
uischema: UISchemaElement;
|
|
28
|
+
}, I extends {
|
|
29
|
+
layout: ComputedRef<T>;
|
|
30
|
+
}>(input: I) => I & {
|
|
31
|
+
appliedOptions: ComputedRef<any>;
|
|
32
|
+
};
|
|
33
|
+
export declare const useLabelCommon: <T extends {
|
|
34
|
+
config: any;
|
|
35
|
+
uischema: UISchemaElement;
|
|
36
|
+
}, I extends {
|
|
37
|
+
label: ComputedRef<T>;
|
|
38
|
+
}>(input: I) => I & {
|
|
39
|
+
appliedOptions: ComputedRef<any>;
|
|
40
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EnumOption } from '@jsonforms/core';
|
|
2
|
+
type EnumControlLike = {
|
|
3
|
+
schema?: {
|
|
4
|
+
enum?: unknown[];
|
|
5
|
+
oneOf?: {
|
|
6
|
+
const?: unknown;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
options?: EnumOption[];
|
|
10
|
+
};
|
|
11
|
+
export declare function getEnumValuesFromControl(control: EnumControlLike): unknown[];
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export interface Options {
|
|
2
|
+
showUnfocusedDescription?: boolean;
|
|
3
|
+
hideRequiredAsterisk?: boolean;
|
|
4
|
+
focus?: boolean;
|
|
5
|
+
displayOnly?: boolean;
|
|
6
|
+
compact?: boolean;
|
|
7
|
+
labelPlacement?: 'left' | 'right' | 'float' | 'hide' | 'top';
|
|
8
|
+
/** Enum controls: `select` (default) or `radio` */
|
|
9
|
+
format?: 'select' | 'radio';
|
|
10
|
+
layout?: 'default' | 'space-between';
|
|
11
|
+
descriptionDisplay?: 'always' | 'tooltip';
|
|
12
|
+
multi?: boolean;
|
|
13
|
+
rows?: number;
|
|
14
|
+
step?: number;
|
|
15
|
+
prefix?: string;
|
|
16
|
+
suffix?: string;
|
|
17
|
+
hourFormat?: string;
|
|
18
|
+
emptyMessage?: string;
|
|
19
|
+
encoding?: {
|
|
20
|
+
x?: {
|
|
21
|
+
field: string;
|
|
22
|
+
type: 'temporal' | 'quantitative' | 'nominal' | 'ordinal';
|
|
23
|
+
title?: string;
|
|
24
|
+
};
|
|
25
|
+
y?: {
|
|
26
|
+
field: string;
|
|
27
|
+
type: 'temporal' | 'quantitative' | 'nominal' | 'ordinal';
|
|
28
|
+
title?: string;
|
|
29
|
+
};
|
|
30
|
+
y2?: {
|
|
31
|
+
field: string;
|
|
32
|
+
type: 'temporal' | 'quantitative' | 'nominal' | 'ordinal';
|
|
33
|
+
title?: string;
|
|
34
|
+
};
|
|
35
|
+
color?: {
|
|
36
|
+
field: string;
|
|
37
|
+
type: 'temporal' | 'quantitative' | 'nominal' | 'ordinal';
|
|
38
|
+
title?: string;
|
|
39
|
+
};
|
|
40
|
+
size?: {
|
|
41
|
+
field: string;
|
|
42
|
+
type: 'temporal' | 'quantitative' | 'nominal' | 'ordinal';
|
|
43
|
+
title?: string;
|
|
44
|
+
};
|
|
45
|
+
yError?: {
|
|
46
|
+
field: string;
|
|
47
|
+
type: 'quantitative';
|
|
48
|
+
title?: string;
|
|
49
|
+
};
|
|
50
|
+
yError2?: {
|
|
51
|
+
field: string;
|
|
52
|
+
type: 'quantitative';
|
|
53
|
+
title?: string;
|
|
54
|
+
};
|
|
55
|
+
xError?: {
|
|
56
|
+
field: string;
|
|
57
|
+
type: 'quantitative';
|
|
58
|
+
title?: string;
|
|
59
|
+
};
|
|
60
|
+
xError2?: {
|
|
61
|
+
field: string;
|
|
62
|
+
type: 'quantitative';
|
|
63
|
+
title?: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
title?: string;
|
|
67
|
+
width?: number;
|
|
68
|
+
height?: number;
|
|
69
|
+
showAsErrorBand?: boolean;
|
|
70
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uncharted.software/jsonforms-primevue",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4",
|
|
4
4
|
"description": "Vue 3 renderer set for JSON Forms (jsonforms.io) using PrimeVue 4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/jsonforms-primevue.cjs",
|
|
@@ -68,20 +68,21 @@
|
|
|
68
68
|
"test:unit": "vitest",
|
|
69
69
|
"test:unit:ci": "vitest run",
|
|
70
70
|
"test:unit:coverage": "vitest run --coverage",
|
|
71
|
+
"test:types": "test -f dist/types/index.d.ts && grep -q 'JsonFormsRendererRegistryEntry' dist/types/index.d.ts && grep -q 'ControlWrapper' dist/types/index.d.ts",
|
|
71
72
|
"test:e2e": "playwright test",
|
|
72
73
|
"test:e2e:snapshots": "playwright test --update-snapshots",
|
|
73
|
-
"ci": "yarn build && yarn lint && yarn lint:fix && yarn format && yarn format:ci && yarn test:unit:ci"
|
|
74
|
+
"ci": "yarn build && yarn test:types && yarn lint && yarn lint:fix && yarn format && yarn format:ci && yarn test:unit:ci"
|
|
74
75
|
},
|
|
75
76
|
"peerDependencies": {
|
|
76
|
-
"@jsonforms/core": "3.
|
|
77
|
-
"@jsonforms/vue": "3.
|
|
78
|
-
"primeflex": "^
|
|
77
|
+
"@jsonforms/core": "3.7.0",
|
|
78
|
+
"@jsonforms/vue": "3.7.0",
|
|
79
|
+
"primeflex": "^4.0.0",
|
|
79
80
|
"primevue": "^4.4.0",
|
|
80
81
|
"vue": "^3.5.0"
|
|
81
82
|
},
|
|
82
83
|
"devDependencies": {
|
|
83
|
-
"@jsonforms/core": "
|
|
84
|
-
"@jsonforms/vue": "
|
|
84
|
+
"@jsonforms/core": "3.7.0",
|
|
85
|
+
"@jsonforms/vue": "3.7.0",
|
|
85
86
|
"@types/lodash": "^4",
|
|
86
87
|
"@types/lodash-es": "^4.17.12",
|
|
87
88
|
"@types/node": "^24.0.0",
|
|
@@ -89,11 +90,12 @@
|
|
|
89
90
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
90
91
|
"@vue/tsconfig": "^0.5.1",
|
|
91
92
|
"oxlint": "^0.16.12",
|
|
92
|
-
"primeflex": "
|
|
93
|
+
"primeflex": "4.0.0",
|
|
93
94
|
"primeicons": "7.0.0",
|
|
94
95
|
"primevue": "4.4.1",
|
|
95
96
|
"typescript": "^5.6.2",
|
|
96
97
|
"vite": "^6.4.3",
|
|
98
|
+
"vite-plugin-dts": "4.5.4",
|
|
97
99
|
"vitest": "^3.0.0",
|
|
98
100
|
"vue": "^3.5.0",
|
|
99
101
|
"vue-tsc": "^2.1.6"
|