From ef1d7d7833cc89069cc650b1a0614aa4dff89323 Mon Sep 17 00:00:00 2001 From: Antonio Vivone Date: Tue, 21 May 2024 15:55:27 +0200 Subject: [PATCH] [25-26] Fix VLDatePicker year/month dropdown disappearing + Fix VLCrud editItem function definition (#27) * Force display inline (rather than none) when selecting a year/month * Add highlight color to year and month selection * Fix editItem function definition * Bump version + update primevue dependency * Update shoelace version * Bump minor version --- package-lock.json | 20 ++++++++++---------- package.json | 6 +++--- src/components/VLCrud/VLCrud.vue | 4 ++-- src/components/VLCrud/types.ts | 2 +- src/components/VLDatePicker/VLDatePicker.vue | 6 ++++-- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 623f47a..e41c042 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@skillbill/vuelace-3", - "version": "1.0.9", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@skillbill/vuelace-3", - "version": "1.0.9", + "version": "1.1.0", "license": "MIT", "devDependencies": { "@chromatic-com/storybook": "^1.4.0", @@ -43,9 +43,9 @@ }, "peerDependencies": { "@mdi/svg": "^7.4.47", - "@shoelace-style/shoelace": "^2.13.0", + "@shoelace-style/shoelace": "^2.15.1", "pinia": "^2.1.7", - "primevue": "^3.51.0", + "primevue": "^3.52.0", "vue": "^3.4.25" } }, @@ -3863,9 +3863,9 @@ "peer": true }, "node_modules/@shoelace-style/shoelace": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/@shoelace-style/shoelace/-/shoelace-2.15.0.tgz", - "integrity": "sha512-Lcg938Y8U2VsHqIYewzlt+H1rbrXC4GRSUkTJgXyF8/0YAOlI+srd5OSfIw+/LYmwLP2Peyh398Kae/6tg4PDA==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/@shoelace-style/shoelace/-/shoelace-2.15.1.tgz", + "integrity": "sha512-3ecUw8gRwOtcZQ8kWWkjk4FTfObYQ/XIl3aRhxprESoOYV1cYhloYPsmQY38UoL3+pwJiZb5+LzX0l3u3Zl0GA==", "peer": true, "dependencies": { "@ctrl/tinycolor": "^4.0.2", @@ -11987,9 +11987,9 @@ } }, "node_modules/primevue": { - "version": "3.51.0", - "resolved": "https://registry.npmjs.org/primevue/-/primevue-3.51.0.tgz", - "integrity": "sha512-BdMveidLSr0fNJ5+mxuke8mMCHyiXwvfDP4iwPr6R98rl3E0Wcm1u4/RKVrL7o0Iq606SXyhPQL3LGyAfXngcA==", + "version": "3.52.0", + "resolved": "https://registry.npmjs.org/primevue/-/primevue-3.52.0.tgz", + "integrity": "sha512-HLOVP5YI0ArFKUhIyfZsWmTNMaBYNCBWC/3DYvdd/Po4LY5/WXf7yIYvArE2q/3OuwSXJXvjlR8UNQeJYRSQog==", "peer": true, "peerDependencies": { "vue": "^3.0.0" diff --git a/package.json b/package.json index 70c6d92..d9a8e00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@skillbill/vuelace-3", - "version": "1.0.10", + "version": "1.1.0", "private": false, "author": "skillbill", "license": "MIT", @@ -89,9 +89,9 @@ }, "peerDependencies": { "@mdi/svg": "^7.4.47", - "@shoelace-style/shoelace": "^2.13.0", + "@shoelace-style/shoelace": "^2.15.1", "pinia": "^2.1.7", - "primevue": "^3.51.0", + "primevue": "^3.52.0", "vue": "^3.4.25" } } diff --git a/src/components/VLCrud/VLCrud.vue b/src/components/VLCrud/VLCrud.vue index ba7c233..da4ea8b 100644 --- a/src/components/VLCrud/VLCrud.vue +++ b/src/components/VLCrud/VLCrud.vue @@ -253,8 +253,8 @@ const editAction = { } } as VLCrudActionType -const onEdit = async (id: any, data: any) => { - await props.editItem?.(id, data) +const onEdit = async (data: any) => { + await props.editItem?.(data) await onConfirm() } diff --git a/src/components/VLCrud/types.ts b/src/components/VLCrud/types.ts index 32fde94..98b2cf2 100644 --- a/src/components/VLCrud/types.ts +++ b/src/components/VLCrud/types.ts @@ -67,7 +67,7 @@ export interface VLCrudProps { | undefined > addItem?: (item: any) => any - editItem?: (id: any, item: any) => any + editItem?: (item: any) => any translationFn?: (key: string, props?: { [key: string]: any }) => string onFetchError?: () => void onError?: (error: VLFileInputErrorEvent) => void diff --git a/src/components/VLDatePicker/VLDatePicker.vue b/src/components/VLDatePicker/VLDatePicker.vue index b5f43a5..88e5967 100644 --- a/src/components/VLDatePicker/VLDatePicker.vue +++ b/src/components/VLDatePicker/VLDatePicker.vue @@ -42,7 +42,7 @@ :maxDate="maxDate" :showTime="withTime" :date-select="atDateSelect" - panelClass="min-w-min" + panelClass="min-w-min !inline" /> @@ -145,7 +145,9 @@ defineExpose({