From f5288cb8d33eb6da4102c6acee22c0cc3cbf2268 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 29 Jul 2021 18:14:49 +0200 Subject: [PATCH] [plugin] Allow ordering MenuLinks, widgets: renamed priority to order --- package.json | 10 ++++++---- types/plugin.d.ts | 16 +++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index eedaa71..ed871ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "license": "MIT", - "version": "1.0.0-alpha.1", + "version": "1.0.0-alpha.2", "name": "@flaschengeist/types", "author": "Ferdinand Thiessen ", "homepage": "https://flaschengeist.dev/", @@ -17,11 +17,13 @@ "valid": "tsc --noEmit", "pretty": "prettier --config ./package.json --write '{,!(node_modules)/**/}*.ts'" }, + "dependencies": { + "vue": "^3.1.5", + "vue-router": "^4.0.10" + }, "devDependencies": { "prettier": "^2.3.0", - "typescript": "^4.2.4", - "vue": "^3.0.11", - "vue-router": "^4.0.8" + "typescript": "^4.2.4" }, "prettier": { "singleQuote": true, diff --git a/types/plugin.d.ts b/types/plugin.d.ts index 2c3a99d..0af00eb 100644 --- a/types/plugin.d.ts +++ b/types/plugin.d.ts @@ -110,6 +110,11 @@ export namespace FG_Plugin { export interface MenuLink extends MenuEntry { /** Name of the target route */ link: RouteRecordName; + /** + * Order inside the menu, higher numbers come ahead of lower numbers + * @todo: Promote to required with first beta + */ + order?: number; } /** @@ -127,7 +132,16 @@ export namespace FG_Plugin { */ export interface Widget { name: string; - priority: number; + /** + * @deprecated Deprecated in favor of order + * @todo Remove with beta 1 + */ + priority?: number; + /** + * Default order on the dashboard, higher numbers come ahead of lower numbers + * @todo Promote to required if priority is removed + */ + order?: number; permissions: FG.Permission[]; widget: Component; }