@backstage-community/plugin-shortcuts 0.3.24

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,99 @@
1
+ /// <reference types="react" />
2
+ import * as React from 'react';
3
+ import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
4
+ import { IconComponent, StorageApi } from '@backstage/core-plugin-api';
5
+ import { ShortcutApi as ShortcutApi$1, Shortcut as Shortcut$1 } from '@backstage-community/plugin-shortcuts';
6
+ import { Observable } from '@backstage/types';
7
+
8
+ /**
9
+ * ShortcutsProps
10
+ * Props for the {@link Shortcuts} component.
11
+ * @public
12
+ */
13
+ interface ShortcutsProps {
14
+ icon?: IconComponent;
15
+ allowExternalLinks?: boolean;
16
+ }
17
+
18
+ /** @public */
19
+ declare const shortcutsPlugin: _backstage_core_plugin_api.BackstagePlugin<{}, {}, {}>;
20
+ /** @public */
21
+ declare const Shortcuts: (props: ShortcutsProps) => React.JSX.Element;
22
+
23
+ /**
24
+ * Default implementation of the {@link ShortcutApi} that uses the
25
+ * {@link @backstage/core-plugin-api#StorageApi} to store shortcuts.
26
+ *
27
+ * @remarks
28
+ *
29
+ * Note that the storage API given is used directly, as in, this implementation
30
+ * does not itself dive into a sub-bucket. So you may want to provide a bucket
31
+ * that is scoped to the plugin (default: 'shortcuts').
32
+ *
33
+ * @public
34
+ */
35
+ declare class DefaultShortcutsApi implements ShortcutApi$1 {
36
+ private readonly storageApi;
37
+ private shortcuts;
38
+ private readonly subscribers;
39
+ private readonly observable;
40
+ constructor(storageApi: StorageApi);
41
+ shortcut$(): Observable<Shortcut$1[]>;
42
+ get(): Shortcut$1[];
43
+ add(shortcut: Omit<Shortcut$1, 'id'>): Promise<void>;
44
+ remove(id: string): Promise<void>;
45
+ update(shortcut: Shortcut$1): Promise<void>;
46
+ getColor(url: string): string;
47
+ private readonly THEME_MAP;
48
+ private sort;
49
+ private notifyChanges;
50
+ }
51
+
52
+ /** @public */
53
+ type Shortcut = {
54
+ id: string;
55
+ url: string;
56
+ title: string;
57
+ };
58
+
59
+ /** @public */
60
+ declare const shortcutsApiRef: _backstage_core_plugin_api.ApiRef<ShortcutApi>;
61
+ /** @public */
62
+ interface ShortcutApi {
63
+ /**
64
+ * Returns an Observable that will subscribe to changes.
65
+ */
66
+ shortcut$(): Observable<Shortcut[]>;
67
+ /**
68
+ * Returns an immediate snapshot of shortcuts, sorted by title
69
+ */
70
+ get(): Shortcut[];
71
+ /**
72
+ * Generates a unique id for the shortcut and then saves it.
73
+ */
74
+ add(shortcut: Omit<Shortcut, 'id'>): Promise<void>;
75
+ /**
76
+ * Removes the shortcut.
77
+ */
78
+ remove(id: string): Promise<void>;
79
+ /**
80
+ * Finds an existing shortcut that matches the ID of the
81
+ * supplied shortcut and updates its values.
82
+ */
83
+ update(shortcut: Shortcut): Promise<void>;
84
+ /**
85
+ * Each shortcut should get a color for its icon based on the url.
86
+ *
87
+ * Preferably using some abstraction between the url and the actual
88
+ * color value.
89
+ */
90
+ getColor(url: string): string;
91
+ }
92
+
93
+ /**
94
+ * @public
95
+ * @deprecated Use {@link DefaultShortcutsApi} instead.
96
+ */
97
+ declare const LocalStoredShortcuts: typeof DefaultShortcutsApi;
98
+
99
+ export { DefaultShortcutsApi, LocalStoredShortcuts, type Shortcut, type ShortcutApi, Shortcuts, type ShortcutsProps, shortcutsApiRef, shortcutsPlugin };
@@ -0,0 +1,97 @@
1
+ import { pageTheme } from '@backstage/theme';
2
+ import { v4 } from 'uuid';
3
+ import ObservableImpl from 'zen-observable';
4
+ import { createApiRef, createPlugin, createApiFactory, storageApiRef, createComponentExtension } from '@backstage/core-plugin-api';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __publicField = (obj, key, value) => {
9
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
10
+ return value;
11
+ };
12
+ class DefaultShortcutsApi {
13
+ constructor(storageApi) {
14
+ this.storageApi = storageApi;
15
+ __publicField(this, "shortcuts");
16
+ __publicField(this, "subscribers", /* @__PURE__ */ new Set());
17
+ __publicField(this, "observable", new ObservableImpl((subscriber) => {
18
+ subscriber.next(this.shortcuts);
19
+ this.subscribers.add(subscriber);
20
+ return () => {
21
+ this.subscribers.delete(subscriber);
22
+ };
23
+ }));
24
+ __publicField(this, "THEME_MAP", {
25
+ catalog: "home",
26
+ docs: "documentation"
27
+ });
28
+ var _a;
29
+ this.shortcuts = (_a = this.storageApi.snapshot("items").value) != null ? _a : [];
30
+ this.storageApi.observe$("items").subscribe({
31
+ next: (next) => {
32
+ var _a2;
33
+ this.shortcuts = (_a2 = next.value) != null ? _a2 : [];
34
+ this.notifyChanges();
35
+ }
36
+ });
37
+ }
38
+ shortcut$() {
39
+ return this.observable;
40
+ }
41
+ get() {
42
+ return this.shortcuts;
43
+ }
44
+ async add(shortcut) {
45
+ const shortcuts = this.sort([...this.get(), { ...shortcut, id: v4() }]);
46
+ await this.storageApi.set("items", shortcuts);
47
+ }
48
+ async remove(id) {
49
+ const shortcuts = this.get().filter((s) => s.id !== id);
50
+ await this.storageApi.set("items", shortcuts);
51
+ }
52
+ async update(shortcut) {
53
+ const shortcuts = this.get().filter((s) => s.id !== shortcut.id);
54
+ shortcuts.push(shortcut);
55
+ await this.storageApi.set("items", shortcuts);
56
+ }
57
+ getColor(url) {
58
+ var _a;
59
+ const type = url.split("/")[1];
60
+ const theme = (_a = this.THEME_MAP[type]) != null ? _a : Object.keys(pageTheme).includes(type) ? type : "tool";
61
+ return pageTheme[theme].colors[0];
62
+ }
63
+ sort(shortcuts) {
64
+ return shortcuts.slice().sort((a, b) => a.title >= b.title ? 1 : -1);
65
+ }
66
+ notifyChanges() {
67
+ for (const subscription of this.subscribers) {
68
+ subscription.next(this.shortcuts);
69
+ }
70
+ }
71
+ }
72
+
73
+ const shortcutsApiRef = createApiRef({
74
+ id: "plugin.shortcuts.api"
75
+ });
76
+
77
+ const shortcutsPlugin = createPlugin({
78
+ id: "shortcuts",
79
+ apis: [
80
+ createApiFactory({
81
+ api: shortcutsApiRef,
82
+ deps: { storageApi: storageApiRef },
83
+ factory: ({ storageApi }) => new DefaultShortcutsApi(storageApi.forBucket("shortcuts"))
84
+ })
85
+ ]
86
+ });
87
+ const Shortcuts = shortcutsPlugin.provide(
88
+ createComponentExtension({
89
+ name: "Shortcuts",
90
+ component: { lazy: () => import('./esm/Shortcuts-BtnNxS7L.esm.js').then((m) => m.Shortcuts) }
91
+ })
92
+ );
93
+
94
+ const LocalStoredShortcuts = DefaultShortcutsApi;
95
+
96
+ export { DefaultShortcutsApi, LocalStoredShortcuts, Shortcuts, shortcutsApiRef, shortcutsPlugin };
97
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/api/DefaultShortcutsApi.ts","../src/api/ShortcutApi.ts","../src/plugin.ts","../src/deprecated.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { pageTheme } from '@backstage/theme';\nimport { v4 as uuid } from 'uuid';\nimport {\n ShortcutApi,\n type Shortcut,\n} from '@backstage-community/plugin-shortcuts';\nimport type { StorageApi } from '@backstage/core-plugin-api';\nimport type { Observable } from '@backstage/types';\nimport ObservableImpl from 'zen-observable';\n\n/**\n * Default implementation of the {@link ShortcutApi} that uses the\n * {@link @backstage/core-plugin-api#StorageApi} to store shortcuts.\n *\n * @remarks\n *\n * Note that the storage API given is used directly, as in, this implementation\n * does not itself dive into a sub-bucket. So you may want to provide a bucket\n * that is scoped to the plugin (default: 'shortcuts').\n *\n * @public\n */\nexport class DefaultShortcutsApi implements ShortcutApi {\n private shortcuts: Shortcut[];\n private readonly subscribers = new Set<\n ZenObservable.SubscriptionObserver<Shortcut[]>\n >();\n\n private readonly observable = new ObservableImpl<Shortcut[]>(subscriber => {\n // forward the the latest value\n subscriber.next(this.shortcuts);\n\n this.subscribers.add(subscriber);\n return () => {\n this.subscribers.delete(subscriber);\n };\n });\n\n constructor(private readonly storageApi: StorageApi) {\n this.shortcuts = this.storageApi.snapshot<Shortcut[]>('items').value ?? [];\n this.storageApi.observe$<Shortcut[]>('items').subscribe({\n next: next => {\n this.shortcuts = next.value ?? [];\n this.notifyChanges();\n },\n });\n }\n\n shortcut$(): Observable<Shortcut[]> {\n return this.observable;\n }\n\n get() {\n return this.shortcuts;\n }\n\n async add(shortcut: Omit<Shortcut, 'id'>) {\n const shortcuts = this.sort([...this.get(), { ...shortcut, id: uuid() }]);\n\n await this.storageApi.set('items', shortcuts);\n }\n\n async remove(id: string) {\n const shortcuts = this.get().filter(s => s.id !== id);\n\n await this.storageApi.set('items', shortcuts);\n }\n\n async update(shortcut: Shortcut) {\n const shortcuts = this.get().filter(s => s.id !== shortcut.id);\n shortcuts.push(shortcut);\n\n await this.storageApi.set('items', shortcuts);\n }\n\n getColor(url: string) {\n const type = url.split('/')[1];\n const theme =\n this.THEME_MAP[type] ??\n (Object.keys(pageTheme).includes(type) ? type : 'tool');\n\n return pageTheme[theme].colors[0];\n }\n\n private readonly THEME_MAP: Record<string, keyof typeof pageTheme> = {\n catalog: 'home',\n docs: 'documentation',\n };\n\n private sort(shortcuts: Shortcut[]): Shortcut[] {\n return shortcuts.slice().sort((a, b) => (a.title >= b.title ? 1 : -1));\n }\n\n private notifyChanges() {\n for (const subscription of this.subscribers) {\n subscription.next(this.shortcuts);\n }\n }\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Shortcut } from '../types';\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { Observable } from '@backstage/types';\n\n/** @public */\nexport const shortcutsApiRef = createApiRef<ShortcutApi>({\n id: 'plugin.shortcuts.api',\n});\n\n/** @public */\nexport interface ShortcutApi {\n /**\n * Returns an Observable that will subscribe to changes.\n */\n shortcut$(): Observable<Shortcut[]>;\n\n /**\n * Returns an immediate snapshot of shortcuts, sorted by title\n */\n get(): Shortcut[];\n\n /**\n * Generates a unique id for the shortcut and then saves it.\n */\n add(shortcut: Omit<Shortcut, 'id'>): Promise<void>;\n\n /**\n * Removes the shortcut.\n */\n remove(id: string): Promise<void>;\n\n /**\n * Finds an existing shortcut that matches the ID of the\n * supplied shortcut and updates its values.\n */\n update(shortcut: Shortcut): Promise<void>;\n\n /**\n * Each shortcut should get a color for its icon based on the url.\n *\n * Preferably using some abstraction between the url and the actual\n * color value.\n */\n getColor(url: string): string;\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DefaultShortcutsApi, shortcutsApiRef } from './api';\nimport {\n createApiFactory,\n createComponentExtension,\n createPlugin,\n storageApiRef,\n} from '@backstage/core-plugin-api';\n\n/** @public */\nexport const shortcutsPlugin = createPlugin({\n id: 'shortcuts',\n apis: [\n createApiFactory({\n api: shortcutsApiRef,\n deps: { storageApi: storageApiRef },\n factory: ({ storageApi }) =>\n new DefaultShortcutsApi(storageApi.forBucket('shortcuts')),\n }),\n ],\n});\n\n/** @public */\nexport const Shortcuts = shortcutsPlugin.provide(\n createComponentExtension({\n name: 'Shortcuts',\n component: { lazy: () => import('./Shortcuts').then(m => m.Shortcuts) },\n }),\n);\n","/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { DefaultShortcutsApi } from './api';\n\n/**\n * @public\n * @deprecated Use {@link DefaultShortcutsApi} instead.\n */\nexport const LocalStoredShortcuts = DefaultShortcutsApi;\n"],"names":["_a","uuid"],"mappings":";;;;;;;;;;;AAsCO,MAAM,mBAA2C,CAAA;AAAA,EAgBtD,YAA6B,UAAwB,EAAA;AAAxB,IAAA,IAAA,CAAA,UAAA,GAAA,UAAA,CAAA;AAf7B,IAAQ,aAAA,CAAA,IAAA,EAAA,WAAA,CAAA,CAAA;AACR,IAAiB,aAAA,CAAA,IAAA,EAAA,aAAA,sBAAkB,GAEjC,EAAA,CAAA,CAAA;AAEF,IAAiB,aAAA,CAAA,IAAA,EAAA,YAAA,EAAa,IAAI,cAAA,CAA2B,CAAc,UAAA,KAAA;AAEzE,MAAW,UAAA,CAAA,IAAA,CAAK,KAAK,SAAS,CAAA,CAAA;AAE9B,MAAK,IAAA,CAAA,WAAA,CAAY,IAAI,UAAU,CAAA,CAAA;AAC/B,MAAA,OAAO,MAAM;AACX,QAAK,IAAA,CAAA,WAAA,CAAY,O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AK,WAAa,EAAA;AAC3C,MAAa,YAAA,CAAA,IAAA,CAAK,KAAK,SAAS,CAAA,CAAA;AAAA,KAClC;AAAA,GACF;AACF;;AC7FO,MAAM,kBAAkB,YAA0B,CAAA;AAAA,EACvD,EAAI,EAAA,sBAAA;AACN,CAAC;;ACEM,MAAM,kBAAkB,YAAa,CAAA;AAAA,EAC1C,EAAI,EAAA,WAAA;AAAA,EACJ,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,eAAA;AAAA,MACL,IAAA,EAAM,EAAE,UAAA,EAAY,aAAc,EAAA;AAAA,MAClC,OAAA,EAAS,CAAC,EAAE,UAAW,EAAA,KACrB,IAAI,mBAAoB,CAAA,UAAA,CAAW,SAAU,CAAA,WAAW,CAAC,CAAA;AAAA,KAC5D,CAAA;AAAA,GACH;AACF,CAAC,EAAA;AAGM,MAAM,YAAY,eAAgB,CAAA,OAAA;AAAA,EACvC,wBAAyB,CAAA;AAAA,IACvB,IAAM,EAAA,WAAA;AAAA,IACN,SAAA,EAAW,EAAE,IAAA,EAAM,MAAM,OAAO,iCAAa,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,KAAK,CAAE,CAAA,SAAS,CAAE,EAAA;AAAA,GACvE,CAAA;AACH;;ACrBO,MAAM,oBAAuB,GAAA;;;;"}
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@backstage-community/plugin-shortcuts",
3
+ "version": "0.3.24",
4
+ "description": "A Backstage plugin that provides a shortcuts feature to the sidebar",
5
+ "backstage": {
6
+ "role": "frontend-plugin"
7
+ },
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "main": "dist/index.esm.js",
11
+ "types": "dist/index.d.ts"
12
+ },
13
+ "homepage": "https://backstage.io",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/backstage/community-plugins",
17
+ "directory": "workspaces/shortcuts/plugins/shortcuts"
18
+ },
19
+ "license": "Apache-2.0",
20
+ "sideEffects": false,
21
+ "main": "dist/index.esm.js",
22
+ "types": "dist/index.d.ts",
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "scripts": {
27
+ "build": "backstage-cli package build",
28
+ "clean": "backstage-cli package clean",
29
+ "lint": "backstage-cli package lint",
30
+ "prepack": "backstage-cli package prepack",
31
+ "postpack": "backstage-cli package postpack",
32
+ "start": "backstage-cli package start",
33
+ "test": "backstage-cli package test"
34
+ },
35
+ "dependencies": {
36
+ "@backstage/core-components": "^0.14.4",
37
+ "@backstage/core-plugin-api": "^1.9.2",
38
+ "@backstage/theme": "^0.5.3",
39
+ "@backstage/types": "^1.1.1",
40
+ "@material-ui/core": "^4.12.2",
41
+ "@material-ui/icons": "^4.9.1",
42
+ "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
43
+ "react-hook-form": "^7.12.2",
44
+ "react-use": "^17.2.4",
45
+ "uuid": "^9.0.0",
46
+ "zen-observable": "^0.10.0"
47
+ },
48
+ "devDependencies": {
49
+ "@backstage/cli": "^0.26.3",
50
+ "@backstage/dev-utils": "^1.0.31",
51
+ "@backstage/test-utils": "^1.5.4",
52
+ "@testing-library/dom": "^10.0.0",
53
+ "@testing-library/jest-dom": "^6.0.0",
54
+ "@testing-library/react": "^15.0.0",
55
+ "@types/react-dom": "^18.2.19",
56
+ "@types/uuid": "^9.0.0",
57
+ "@types/zen-observable": "^0.8.2",
58
+ "canvas": "^2.11.2",
59
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
60
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
61
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
62
+ },
63
+ "peerDependencies": {
64
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
65
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
66
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
67
+ },
68
+ "module": "./dist/index.esm.js"
69
+ }