Skip to content

Commit b6ad627

Browse files
committed
chore: polish vue-vuetify integration
- adapt to latest 'master' state - fix 'useJsonFormsLabel' composition - align dependency versions over packages - type improvement in core/schema - fix example app - integrate in publish action - adapt bug and feature templates
1 parent d1e562e commit b6ad627

File tree

16 files changed

+73
-75
lines changed

16 files changed

+73
-75
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,18 @@ body:
4444
placeholder: v3.0.0
4545
- type: dropdown
4646
attributes:
47-
label: Framework
47+
label: Package
4848
multiple: true
4949
options:
5050
- Core
51-
- React
52-
- Angular
53-
- Vue
54-
- Other (please specify in the Additional context field)
55-
- type: dropdown
56-
attributes:
57-
label: RendererSet
58-
multiple: true
59-
options:
60-
- Material
61-
- Vanilla
51+
- React Bindings
52+
- React Material Renderers
53+
- React Vanilla Renderers
54+
- Angular Bindings
55+
- Angular Material Renderers
56+
- Vue Bindings
57+
- Vue Vanilla Renderers
58+
- Vue Vuetify Renderers
6259
- Other (please specify in the Additional context field)
6360
- type: textarea
6461
attributes:

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,18 @@ body:
3333
## Describe for which setup you like to have the improvement
3434
- type: dropdown
3535
attributes:
36-
label: Framework
36+
label: Package
3737
multiple: true
3838
options:
3939
- Core
40-
- React
41-
- Angular
42-
- Vue
43-
- Other (please specify in the Additional context field)
44-
- type: dropdown
45-
attributes:
46-
label: RendererSet
47-
multiple: true
48-
options:
49-
- Material
50-
- Vanilla
40+
- React Bindings
41+
- React Material Renderers
42+
- React Vanilla Renderers
43+
- Angular Bindings
44+
- Angular Material Renderers
45+
- Vue Bindings
46+
- Vue Vanilla Renderers
47+
- Vue Vuetify Renderers
5148
- Other (please specify in the Additional context field)
5249
- type: textarea
5350
attributes:

.github/workflows/publish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
cd ../vanilla-renderers && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}" && pnpm pkg set peerDependencies.@jsonforms/react="${{ github.event.inputs.next_version }}"
7272
cd ../vue && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}"
7373
cd ../vue-vanilla && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}" && pnpm pkg set peerDependencies.@jsonforms/vue="${{ github.event.inputs.next_version }}"
74+
cd ../vue-vuetify && pnpm pkg set peerDependencies.@jsonforms/core="${{ github.event.inputs.next_version }}" && pnpm pkg set peerDependencies.@jsonforms/vue="${{ github.event.inputs.next_version }}"
7475
7576
- name: "Tag and Commit"
7677
run: |

packages/angular-material/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@angular/router": "^17.0.0 || ^18.0.0",
7171
"@jsonforms/angular": "3.4.0-alpha.2",
7272
"@jsonforms/core": "3.4.0-alpha.2",
73-
"dayjs": "^1.11.7",
73+
"dayjs": "^1.11.10",
7474
"rxjs": "^6.6.0 || ^7.4.0"
7575
},
7676
"dependencies": {

packages/core/src/mappers/renderer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,7 @@ export const mapStateToLabelProps = (
12491249
config: getConfig(state),
12501250
renderers: props.renderers || getRenderers(state),
12511251
cells: props.cells || getCells(state),
1252+
uischema,
12521253
};
12531254
};
12541255

packages/core/src/util/schema.ts

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,27 @@
2626
import find from 'lodash/find';
2727
import type { JsonSchema } from '../models';
2828

29-
export const getFirstPrimitiveProp = (schema: any) => {
30-
if (schema.properties) {
31-
return find(Object.keys(schema.properties), (propName) => {
32-
const prop = schema.properties[propName];
33-
return (
34-
prop.type === 'string' ||
35-
prop.type === 'number' ||
36-
prop.type === 'integer'
37-
);
38-
});
29+
export const getFirstPrimitiveProp = (schema: unknown) => {
30+
if (
31+
schema &&
32+
typeof schema === 'object' &&
33+
'properties' in schema &&
34+
schema.properties
35+
) {
36+
return find(
37+
Object.keys(schema.properties),
38+
(propName: keyof typeof schema.properties) => {
39+
const prop: unknown = schema.properties[propName];
40+
return (
41+
prop &&
42+
typeof prop === 'object' &&
43+
'type' in prop &&
44+
(prop.type === 'string' ||
45+
prop.type === 'number' ||
46+
prop.type === 'integer')
47+
);
48+
}
49+
);
3950
}
4051
return undefined;
4152
};

packages/material-renderers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
]
8080
},
8181
"dependencies": {
82-
"@date-io/dayjs": "1.3.13",
82+
"@date-io/dayjs": "^3.0.0",
8383
"dayjs": "1.10.7",
8484
"lodash": "^4.17.21"
8585
},

packages/vue-vuetify/dev/App.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ const theme = computed(() => {
3636
<example-app-bar></example-app-bar>
3737
<example-drawer></example-drawer>
3838
<example-settings></example-settings>
39-
<v-main>
40-
<example-view v-if="example" :example="example"></example-view>
41-
<home-view v-else></home-view>
42-
</v-main>
39+
<suspense>
40+
<v-main>
41+
<example-view v-if="example" :example="example"></example-view>
42+
<home-view v-else></home-view>
43+
</v-main>
44+
</suspense>
4345
</v-app>
4446
</v-theme-provider>
4547
</v-locale-provider>

packages/vue-vuetify/dev/components/ExampleDrawer.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import examples from '../examples';
44
import { useAppStore } from '../store';
55
66
const appStore = useAppStore();
7+
8+
const handleExampleClick = (exampleName: string) => {
9+
appStore.exampleName = exampleName;
10+
};
711
</script>
812

913
<template>
@@ -28,10 +32,9 @@ const appStore = useAppStore();
2832
:value="example.name"
2933
link
3034
color="primary"
35+
@click="handleExampleClick(example.name)"
3136
>
32-
<v-list-item-title @click="appStore.exampleName = example.name">{{
33-
example.label
34-
}}</v-list-item-title>
37+
<v-list-item-title>{{ example.label }}</v-list-item-title>
3538
</v-list-item>
3639
</v-list>
3740
</v-navigation-drawer>

packages/vue-vuetify/example/index.bundled.html

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)