mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
URL service docs (#125697)
* improve sharing menu docs * improve locator docs * improve locator docs * add short URL docs * add tsconfig * update plugin list * add share plugin readme to dev docs * fix linter errors * update docs list Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
cc8b949b62
commit
6ee93e9470
9 changed files with 335 additions and 26 deletions
3
examples/share_examples/README.md
Normal file
3
examples/share_examples/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Share plugin examples
|
||||
|
||||
Small demos of share plugin usage.
|
14
examples/share_examples/kibana.json
Normal file
14
examples/share_examples/kibana.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"id": "shareExamples",
|
||||
"kibanaVersion": "kibana",
|
||||
"version": "0.0.1",
|
||||
"server": false,
|
||||
"ui": true,
|
||||
"owner": {
|
||||
"name": "App Services",
|
||||
"githubTeam": "kibana-app-services"
|
||||
},
|
||||
"description": "Small demos of share plugin usage",
|
||||
"requiredPlugins": ["share"],
|
||||
"optionalPlugins": []
|
||||
}
|
11
examples/share_examples/public/index.ts
Normal file
11
examples/share_examples/public/index.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { ShareDemoPlugin } from './plugin';
|
||||
|
||||
export const plugin = () => new ShareDemoPlugin();
|
42
examples/share_examples/public/plugin.tsx
Normal file
42
examples/share_examples/public/plugin.tsx
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
import { SharePluginStart, SharePluginSetup } from '../../../src/plugins/share/public';
|
||||
import { Plugin, CoreSetup, CoreStart } from '../../../src/core/public';
|
||||
|
||||
interface SetupDeps {
|
||||
share: SharePluginSetup;
|
||||
}
|
||||
|
||||
interface StartDeps {
|
||||
share: SharePluginStart;
|
||||
}
|
||||
|
||||
export class ShareDemoPlugin implements Plugin<void, void, SetupDeps, StartDeps> {
|
||||
public setup(core: CoreSetup<StartDeps>, { share }: SetupDeps) {
|
||||
share.register({
|
||||
id: 'demo',
|
||||
getShareMenuItems: (context) => [
|
||||
{
|
||||
panel: {
|
||||
id: 'demo',
|
||||
title: 'Panel title',
|
||||
content: 'Panel content',
|
||||
},
|
||||
shareMenuItem: {
|
||||
name: 'Demo list item (from share_example plugin)',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
public start(core: CoreStart, { share }: StartDeps) {}
|
||||
|
||||
public stop() {}
|
||||
}
|
18
examples/share_examples/tsconfig.json
Normal file
18
examples/share_examples/tsconfig.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./target/types"
|
||||
},
|
||||
"include": [
|
||||
"index.ts",
|
||||
"public/**/*.ts",
|
||||
"public/**/*.tsx",
|
||||
"server/**/*.ts",
|
||||
"../../typings/**/*"
|
||||
],
|
||||
"exclude": [],
|
||||
"references": [
|
||||
{ "path": "../../src/core/tsconfig.json" },
|
||||
{ "path": "../../src/plugins/share/tsconfig.json" },
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue